hackertours-theme/layouts/partials/sidebar.html
2023-01-18 10:03:53 +01:00

15 lines
586 B
HTML

{{ $currentSection := .Section -}}
{{ $currentID := "" -}}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end -}}
<aside class="sidebar layout__second-sidebar">
{{ range site.Sections -}}
<section class="menu">
<p class="title"><strong><a href="{{ .RelPermalink }}"{{ if eq $currentSection .Section }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></strong></p>
<ul>
{{ range .Pages -}}
<li><a href="{{ .RelPermalink }}"{{ if eq $currentID .File.UniqueID }} class="active" aria-current="page"{{ end }}>{{ .Title }}</a></li>
{{ end -}}
</ul>
</section>
{{ end -}}
</aside>