hugo-theme-termlite/layouts/partials/page/section_year_nav.html
Eryn Wells 59ff58e159 Break section template into first and descendent sections
First section templates render the most recent $n yearly subsections as a list of
articles.

Descendent sections render just the content of those subsections.
2024-10-23 11:17:30 -07:00

13 lines
527 B
HTML

{{- $years := .years -}}
{{- $includeCollapsedYearItem := .includeCollapsedYearItem -}}
<nav class="year-nav tag">
<span class="tag__name">{{ i18n "yearsTagTitle" }}</span>
<ul class="tag__value--list">
{{ range $years -}}
<li class="tag__value__list-item"><a href="#{{ .Date | time.Format "2006" }}">{{ .LinkTitle }}</a></li>
{{ end }}
{{ if $includeCollapsedYearItem -}}
<li class="tag__value__list-item"><a href="#older">{{ i18n "olderPagesSectionTitle" }}</a></li>
{{ end }}
</ul>
</nav>