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;
|
||||
$text-color: #ffffff;
|
||||
|
||||
$highlight: #05b9ec;
|
||||
|
|
|
@ -115,6 +115,7 @@ figure {
|
|||
padding: 0.5em;
|
||||
|
||||
&.nav-link-active {
|
||||
color: $highlight;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{ $currentPage := . }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
<head>
|
||||
|
@ -20,7 +21,6 @@
|
|||
{{ end }}
|
||||
<hr>
|
||||
{{ end }}
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
|
@ -29,10 +29,10 @@
|
|||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
<footer>
|
||||
{{ i18n "last_change" . }}: {{ .Lastmod }}
|
||||
{{ i18n "last_change" . }}: {{ .Lastmod.Format "2006-01-02 15:04:05 -0700" }}
|
||||
<nav class="nav">
|
||||
{{ 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 }}
|
||||
</nav>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in New Issue