Highlight active menu entry
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
74dfb1baa2
commit
0e009975d9
|
@ -1,2 +1,4 @@
|
||||||
$background: #100e23;
|
$background: #100e23;
|
||||||
$text-color: #ffffff;
|
$text-color: #ffffff;
|
||||||
|
|
||||||
|
$highlight: #05b9ec;
|
||||||
|
|
|
@ -115,6 +115,7 @@ figure {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
|
|
||||||
&.nav-link-active {
|
&.nav-link-active {
|
||||||
|
color: $highlight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{ $currentPage := . }}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.Language.Lang }}">
|
<html lang="{{ .Site.Language.Lang }}">
|
||||||
<head>
|
<head>
|
||||||
|
@ -20,7 +21,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<hr>
|
<hr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $currentPage := . }}
|
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<footer>
|
<footer>
|
||||||
{{ i18n "last_change" . }}: {{ .Lastmod }}
|
{{ i18n "last_change" . }}: {{ .Lastmod.Format "2006-01-02 15:04:05 -0700" }}
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
{{ range .Site.Menus.footer }}
|
{{ range .Site.Menus.footer }}
|
||||||
<a class="nav-link" href="{{ .URL }}">{{ .Name }}</a>
|
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue