hugo-theme-relearn/layouts/partials/_taxonomy.html

35 lines
1.2 KiB
HTML
Raw Normal View History

{{- partialCached "page-meta.hugo" . .RelPermalink }}
2022-04-11 21:04:49 +00:00
{{- partial "header.html" . }}
<article>
{{- $page := . }}
2022-04-11 21:04:49 +00:00
2022-11-13 21:33:55 +00:00
{{- $title := "" }}
{{- if eq .Kind "term" }}
{{- $title = printf "%s %s " (.Data.Singular | humanize) (default "::" .Site.Params.titleSeparator) }}
{{- end }}
{{- $title = printf "%s%s" $title .Title }}
<h1 id="{{ $title | urlize }}">{{ $title }}</h1>
2022-04-11 21:04:49 +00:00
<ul>
{{- range .Data.Terms.Alphabetical }}
{{- $len := 0 }}
{{- range .Pages }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
{{- $len = add $len 1 }}
{{- end }}
{{- end }}
{{- if $len }}
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Page.Title }}</a> ({{ $len }})</li>
2022-04-11 21:04:49 +00:00
{{- end }}
{{- else }}
{{- range sort .Pages "Title" }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a></li>
2022-04-11 21:04:49 +00:00
{{- end }}
{{- end }}
{{- end }}
</ul>
<footer class="footline">
</footer>
</article>
{{- partial "footer.html" . }}