diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/404.html | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 3 | ||||
-rw-r--r-- | layouts/partials/nav.html | 37 |
3 files changed, 18 insertions, 25 deletions
diff --git a/layouts/404.html b/layouts/404.html index 31808d1..c0242ed 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -15,7 +15,8 @@ {{- $header := resources.Get "header.css" -}} {{- $home := resources.Get "home.css" -}} {{- $pagination := resources.Get "pagination.css" -}} - {{- $allCss := slice $base $code $footer $header $home $pagination | resources.Concat "static/all.css" | fingerprint | minify -}} + {{- $responsive := resources.Get "responsive.css" -}} + {{- $allCss := slice $base $code $footer $header $home $pagination $responsive | resources.Concat "static/all.css" | fingerprint | minify -}} <link rel="stylesheet" href="{{ $allCss.Permalink }}"> {{ range .AlternativeOutputFormats -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 201d609..c05ed38 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -15,7 +15,8 @@ {{- $header := resources.Get "header.css" -}} {{- $home := resources.Get "home.css" -}} {{- $pagination := resources.Get "pagination.css" -}} - {{- $allCss := slice $base $code $footer $header $home $pagination | resources.Concat "static/all.css" | fingerprint | minify -}} + {{- $responsive := resources.Get "responsive.css" -}} + {{- $allCss := slice $base $code $footer $header $home $pagination $responsive | resources.Concat "static/all.css" | fingerprint | minify -}} <link rel="stylesheet" href="{{ $allCss.Permalink }}"> {{ range .AlternativeOutputFormats -}} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 5abfc6f..9a63b34 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,29 +1,13 @@ <header> <nav> - <ul> - <li class="nav-menu-title{{if .IsHome}} nav-menu-active{{end}}"><a href="/">{{ .Site.Title }}</a></li> - <li> - <select id="themes" class="nav-menu-magin-left" onchange="setTheme()"> - <option value="black-theme">Black</option> - <option value="dark-theme">Dark</option> - <option value="light-theme">Light</option> - </select> + <ol> + <li id="title"{{if .IsHome}} class="nav-menu-active"{{end}}> + <a href="/">{{ .Site.Title }}</a> </li> + </ol> + <ol id="nav-menu"> {{- $p := . -}} - - {{- range first 1 .Site.Menus.main.ByWeight -}} - {{- $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}} - {{- with .Page -}} - {{- $active = or $active ( $.IsDescendant .) -}} - {{- end -}} - {{- $url := urls.Parse .URL -}} - {{- $baseurl := urls.Parse $.Site.Params.Baseurl -}} - <li class="nav-menu-margin-left{{if $active }} nav-menu-active{{end}}"> - <a href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ .Name }}</a> - </li> - {{ end }} - - {{- range after 1 .Site.Menus.main.ByWeight -}} + {{- range .Site.Menus.main.ByWeight -}} {{- $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}} {{- with .Page -}} {{- $active = or $active ( $.IsDescendant .) -}} @@ -34,6 +18,13 @@ <a href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"{{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ .Name }}</a> </li> {{ end }} - </ul> + <li> + <select id="themes" class="nav-menu-magin-left" onchange="setTheme()"> + <option value="black-theme">Black</option> + <option value="dark-theme">Dark</option> + <option value="light-theme">Light</option> + </select> + </li> + </ol> </nav> </header> |