Update navigation: new menu, active page highlight, centered navbar without logo
This commit is contained in:
1 parent
41fc48b8c0
commit
a0cd55427a
4 files changed
+58
-19
No files matched your search
@@ -0,0 +1,19 @@
|
||||
{{- $page := . -}}
|
||||
{{- $bib := slice "book" "article" "inbook" "inproceedings" "phdthesis" "techreport" "websites" -}}
|
||||
<nav class="site-navbar">
|
||||
<ul id="menu" class="menu">
|
||||
{{ range .Site.Menus.main -}}
|
||||
{{- $active := false -}}
|
||||
{{- if eq .URL "/" -}}
|
||||
{{- $active = $page.IsHome -}}
|
||||
{{- else if hasPrefix $page.RelPermalink .URL -}}
|
||||
{{- $active = true -}}
|
||||
{{- else if and (eq .URL "/notes/") (in $bib $page.Section) -}}
|
||||
{{- $active = true -}}
|
||||
{{- end }}
|
||||
<li class="menu-item">
|
||||
<a class="menu-item-link{{ if $active }} active{{ end }}"{{ if $active }} aria-current="page"{{ end }} href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</nav>
|
||||
Reference in new issue
Block a user