mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
45 lines
No EOL
1.5 KiB
HTML
45 lines
No EOL
1.5 KiB
HTML
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
|
{{- partial "header.html" . }}
|
|
<article>
|
|
<header class="headline">
|
|
</header>
|
|
{{- $page := . }}
|
|
|
|
{{- $title := default (default .Data.Plural (i18n .Data.Plural)) .Title }}
|
|
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
|
|
{{- .Content }}
|
|
{{- $lastCapital := "" }}
|
|
{{- $pages := slice }}
|
|
{{- range .Data.Terms }}
|
|
{{- $len := 0 }}
|
|
{{- range .Pages }}
|
|
{{- $c:=""}}{{/* count pages of term */}}
|
|
{{- if and .Title .RelPermalink (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
|
|
{{- $len = add $len 1 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if $len }}
|
|
{{- $pages = $pages| append (dict "Title" (default .Page.Data.Term .Page.Title) "Page" . "Len" $len )}}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- range sort $pages ".Title" }}
|
|
{{- $capital := substr .Title 0 1 | upper }}
|
|
{{- if ne $lastCapital $capital }}
|
|
{{- if ne $lastCapital "" }}
|
|
</ul>
|
|
{{- end }}
|
|
<h2 id="{{ $capital | plainify | anchorize }}">{{ $capital }}</h2>
|
|
<ul class="columnize">
|
|
{{- end }}
|
|
{{- $c:=""}}{{/* display terms of a taxonomy */}}
|
|
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page.Page) }}">{{ .Title }}</a> ({{ .Len }})</li>
|
|
{{- $lastCapital = $capital }}
|
|
{{- end }}
|
|
{{- if ne $lastCapital "" }}
|
|
</ul>
|
|
{{- end }}
|
|
|
|
<footer class="footline">
|
|
</footer>
|
|
</article>
|
|
{{- partial "footer.html" . }} |