Theme changes and misc

This commit is contained in:
Mikołaj Aleksandrzak 2018-10-03 16:42:13 +02:00
parent 2d0a5217e9
commit fd48b7752c
21 changed files with 46 additions and 483 deletions

View File

@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2018 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,2 +0,0 @@
# hugo-labs

View File

@ -1,2 +0,0 @@
+++
+++

View File

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>
{{ block "title" . }}
{{ .Title}}{{ if ne .Title .Site.Title }} | {{ .Site.Title }}{{ end }}
{{ end }}
</title>
<link rel="stylesheet" href="https://static.wmi.amu.edu.pl/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/labs.css">
</head>
<body>
{{ block "navbar" . }}
{{ partial "navbar" . }}
{{ end }}
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 collapse sidebar">
{{ block "sidebar" . }}
{{ partial "sidebar" . }}
{{ end }}
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .RelPermalink }}">{{ .Site.Language.LanguageName }}: {{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
{{ block "main" . }}
{{ end }}
</div>
</div>
</div>
<script src="https://static.wmi.amu.edu.pl/jquery/1.12.4/jquery.min.js"></script>
<script src="https://static.wmi.amu.edu.pl/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="/js/fix.js"></script>
</body>
</html>

View File

@ -1,4 +0,0 @@
{{ $dateFormat := default "02-01-2006 15:04" (index .Site.Params "date_format") }}
<h2><b>{{ .Title | markdownify }}{{ if not .Date.IsZero }} <small>{{ .Date.Format $dateFormat }}</small>{{ end }}</b></h2>
{{ .Content }}

View File

@ -1,8 +0,0 @@
{{ define "main" }}
{{ range .Pages }}
{{ .Render "content" }}
{{ end }}
{{ end }}

View File

@ -1,3 +0,0 @@
{{ define "main" }}
{{ .Content }}
{{ end }}

View File

@ -1,17 +0,0 @@
{{ define "main" }}
<h1><b>{{ .Site.Title }}</b></h1>
<hr />
<div class="row">
<div class="col-sm-9">
{{ block "news" . }}
{{ range first 3 (where .Pages "Section" "wiadomosci")}}
{{ .Render "content" }}
{{ end }}
{{ end }}
</div>
<div class="col-sm-3">
{{ .Content }}
</div>
</div>
{{ end }}

View File

@ -1,30 +0,0 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle sidebar-toggle" data-toggle="sidebar" data-target=".sidebar">
<span class="sr-only">Toggle sidebar</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<button type="button" class="btn-default btn-sm navbar-toggle" data-toggle="collapse" data-target="#search">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-search"></span>
</button>
<a class="navbar-brand" href="/">
{{ .Site.Title }}
</a>
</div>
<div class="collapse navbar-collapse" id="search">
<form class="navbar-form navbar-right" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
<div class="input-group">
<input type="text" class="form-control" name="q" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
</div>
</div>
</div>

View File

@ -1,32 +0,0 @@
{{ $currentPage := . }}
<ul>
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="item {{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
<li class="sub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
<li class="subsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a>
{{ if or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .) }}
<ul>
{{ range .Children }}
<li class="subsubsub-item{{ if $currentPage.IsMenuCurrent "main" . }} active{{ end }}"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>

View File

@ -1,253 +0,0 @@
BODY {
padding-top: 75px;
/* font-family: "Work Sans","Source Sans Pro","Open Sans","Helvetica Neue","Helvetica","Tahoma","Geneva","Arial",sans-serif;
*/
letter-spacing: +.02rem;
font-weight: 300;
font-size: 1.8rem;
line-height: 2;
color: #4d5363;
}
code {
color: f00;
font-size: 1.7rem;
}
h1 {
text-align: center;
font-size: 4rem;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Open Sans","Helvetica","Tahoma","Geneva","Arial",sans-serif;
/*font-family: "Lato","Open Sans","Helvetica","Tahoma","Geneva","Arial",sans-serif;*/
text-rendering: optimizeLegibility;
line-height: 100%;
letter-spacing: 0;
}
h2 {
font-size: 3rem;
}
h3 {
font-size: 2.6rem;
}
h4 {
font-size: 2.2rem;
}
img{
max-width: 500px;
height: auto;
}
video {
max-width: 100%;
height: auto;
}
pre {
font-size: 1.7rem;
line-height: 1.7;
}
.navbar {
padding-left: 0px;
padding-right: 20px;
/*background-color: #ba3232;
border-right: 20px solid #fff;
*/letter-spacing: +.05rem;
font-weight: bold;
font-size: 2rem;
}
a:link {
color: #e00;
}
a:visited {
color: #e00;
}
a:hover {
color: #000;
}
.navbar a:link{
color: #ba3232;
font-size: 2rem;
}
.navbar a:visited {
color: #ba3232;
font-size: 2rem;
}
.navbar a:hover {
color: #ba3232;
font-size: 2rem;
}
.sidebar-toggle {
float: left;
margin-left: 15px;
}
.sidebar {
/*padding-top: 100px;
*/margin-top: 5px;
/*display: none;
*/position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1050;
padding-left: 20px;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: #292929;
border-right: 1px solid #eee;
/*letter-spacing: +.05rem;*/
font-weight: 400;
font-size: 1.6rem;
line-height: 1.55;
}
.sidebar.active {
display: block;
}
@media (min-width: 768px) {
.sidebar {
display: block;
}
}
.sidebar a {
display: block;
padding: 10px 20px;
text-decoration: none;
color: #ccc;
}
.sidebar ul {
list-style-type: none;
padding: 0;
}
.sidebar > ul {
margin-right: -21px; /* 20px padding + 1px border */
margin-bottom: 20px;
margin-left: -20px;
}
.sidebar .sub-item > a{
padding-left: 40px;
background-color: #111;
}
.sidebar .subsub-item > a{
padding-left: 60px;
background-color: #111;
}
.sidebar .subsubsub-item > a{
padding-left: 80px;
background-color: #111;
}
.sidebar .active > a {
color: #fff;
background-color: #ba3232;
font-weight: bold;
}
.sidebar a:hover {
color: #fff;
/* background-color: #ba3232;
*/ font-weight: bold;
}
.main {
padding: 20px;
}
@media (min-width: 768px) {
.main {
padding-right: 80px;
padding-left: 80px;
}
}
.main .page-header {
margin-top: 0;
}
.property-name {
font-weight: bold;
}
.bs-callout {
padding: 20px;
margin: 20px 0;
border: 1px solid #eee;
border-left-width: 5px;
border-radius: 3px;
}
.bs-callout:first-child {
margin-top: 0;
}
.bs-callout h4 {
margin-top: 0;
margin-bottom: 5px;
}
.bs-callout p:last-child {
margin-bottom: 0;
}
.bs-callout code {
border-radius: 3px;
}
.bs-callout+.bs-callout {
margin-top: -5px;
}
.bs-callout-default {
border-left-color: #777;
}
.bs-callout-default h4 {
color: #777;
}
.bs-callout-primary {
border-left-color: #428bca;
}
.bs-callout-primary h4 {
color: #428bca;
}
.bs-callout-success {
border-left-color: #5cb85c;
}
.bs-callout-success h4 {
color: #5cb85c;
}
.bs-callout-danger {
border-left-color: #d9534f;
}
.bs-callout-danger h4 {
color: #d9534f;
}
.bs-callout-warning {
border-left-color: #f0ad4e;
}
.bs-callout-warning h4 {
color: #f0ad4e;
}
.bs-callout-info {
border-left-color: #5bc0de;
}
.bs-callout-info h4 {
color: #5bc0de;
}

View File

@ -1 +0,0 @@
$(function() { $('table').addClass('table table-striped'); })

View File

@ -1,21 +0,0 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "Hugo Labs"
license = "MIT"
licenselink = "https://git.wmi.amu.edu.pl/labs/hugo-labs/raw/master/LICENSE"
description = ""
homepage = "https://laboratoria.wmi.amu.edu.pl"
tags = []
features = []
min_version = "0.38"
[author]
name = "Mateusz Hromada"
homepage = "https://blog.ruanda.pl"
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""

View File

@ -12,22 +12,32 @@
<link rel="stylesheet" href="/css/labs.css">
</head>
<body>
{{ block "navbar" . }}
{{ partial "navbar" . }}
{{ end }}
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
{{ block "sidebar" . }}
{{ partial "sidebar" . }}
{{ end }}
{{ block "navbar" . }}
{{ partial "navbar" . }}
{{ end }}
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 collapse sidebar">
{{ block "sidebar" . }}
{{ partial "sidebar" . }}
{{ end }}
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .RelPermalink }}">{{ .Site.Language.LanguageName }}: {{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
{{ block "main" . }}
{{ end }}
</div>
</div>
</div>
</div>
<script src="https://static.wmi.amu.edu.pl/jquery/1.12.4/jquery.min.js"></script>
<script src="https://static.wmi.amu.edu.pl/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="/js/fix.js"></script>

View File

@ -1,13 +1,3 @@
{{ define "main" }}
{{ .Content }}
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .RelPermalink }}">{{ .Lang }}: {{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ end }}

View File

@ -1,29 +1,28 @@
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle sidebar-toggle" data-toggle="sidebar">
<button type="button" class="navbar-toggle sidebar-toggle" data-toggle="sidebar" data-target=".sidebar">
<span class="sr-only">Toggle sidebar</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<button type="button" class="btn-default btn-sm navbar-toggle" data-toggle="collapse" data-target="#search">
<span class="sr-only">Toggle navigation</span>
<span class="glyphicon glyphicon-search"></span>
</button>
<a class="navbar-brand" href="/">
{{ .Site.Title }}
</a>
</div>
<div class="collapse navbar-collapse">
<div class="collapse navbar-collapse" id="search">
<form class="navbar-form navbar-right" action="https://szukaj.wmi.amu.edu.pl/search/" method="GET">
<div class="input-group">
<input type="text" class="form-control" name="q" placeholder="Search">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</span>
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
</div>

View File

@ -16,18 +16,19 @@ code {
h1 {
text-align: center;
font-size: 5.5rem;
font-size: 4rem;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Lato","Open Sans","Helvetica","Tahoma","Geneva","Arial",sans-serif;
font-family: "Open Sans","Helvetica","Tahoma","Geneva","Arial",sans-serif;
/*font-family: "Lato","Open Sans","Helvetica","Tahoma","Geneva","Arial",sans-serif;*/
text-rendering: optimizeLegibility;
line-height: 150%;
line-height: 100%;
letter-spacing: 0;
}
h2 {
font-size: 3.5rem;
font-size: 3rem;
}
h3 {
@ -78,17 +79,17 @@ a:hover {
.navbar a:link{
color: #ba3232;
font-size: 4rem;
font-size: 2rem;
}
.navbar a:visited {
color: #ba3232;
font-size: 4rem;
font-size: 2rem;
}
.navbar a:hover {
color: #ba3232;
font-size: 4rem;
font-size: 2rem;
}
.sidebar-toggle {
@ -99,8 +100,8 @@ a:hover {
.sidebar {
/*padding-top: 100px;
*/margin-top: 5px;
display: none;
position: fixed;
/*display: none;
*/position: fixed;
top: 51px;
bottom: 0;
left: 0;
@ -110,16 +111,17 @@ a:hover {
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: #292929;
border-right: 1px solid #eee;
letter-spacing: +.05rem;
font-weight: 300;
font-size: 1.55rem;
line-height: 1.8;
/*letter-spacing: +.05rem;*/
font-weight: 400;
font-size: 1.6rem;
line-height: 1.55;
}
.sidebar.active {
display: block;
}
@media (min-width: 768px) {
.sidebar {
display: block;
@ -178,8 +180,8 @@ a:hover {
}
@media (min-width: 768px) {
.main {
padding-right: 40px;
padding-left: 40px;
padding-right: 80px;
padding-left: 80px;
}
}
.main .page-header {