hugo-code-editor-theme/layouts/partials/menu.html

34 lines
1.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<nav class="col-md-3">
<h3 class="home-link"><a href="/">{{ ( index $.Site.Data.translations $.Site.Params.locale ).root }}</a></h3>
<div id="last-posts" class="open">
<h3 data-open="last-posts">{{ .Site.Title }} - {{ ( index $.Site.Data.translations $.Site.Params.locale ).mostrecentposts }}</h3>
<ul>
{{ range last 10 .Site.Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
</div>
{{ with .Site.Taxonomies.tags }}
<div id="tags" class="open">
<h3 data-open="tags">{{ ( index $.Site.Data.translations $.Site.Params.locale ).tags }}</h3>
<ul class="tags">
{{ range $name, $taxonomy := . }}
<li><a href="/tags/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ with .Site.Taxonomies.categories }}
<div id="categories" class="open">
<h3 data-open="categories">{{ ( index $.Site.Data.translations $.Site.Params.locale ).categories }}</h3>
<ul class="categories">
{{ range $name, $taxonomy := . }}
<li><a href="/categories/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
</nav>