website/layouts/partials/nav.html
2022-11-28 18:32:29 +01:00

28 lines
784 B
HTML

{{ $currentPage := . }}
<nav id="sidebar">
<header>
<p id="name">Vri 🌈</p>
<p id="information">
<span>@vrifox</span>
</p>
</header>
<section id="sidebar-menu">
<ul>
{{- range .Site.Menus.main }}
{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
<li class="active"><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ else }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{- end }}
</ul>
</section>
{{/*- if .IsTranslated */}}
<aside>
{{- range .Translations }}
<a href="{{ .Permalink }}">{{ .Site.Params.languageName }}</a>
{{- end }}
</aside>
{{/*- end */}}
</nav>