hugo-theme-relearn/layouts/partials/bodys/term.html
Sören Weber 9f9e449be8
theme: remove whitespace from article #891
to avoid to be interpreted as indented code in some scenarios
2024-10-11 16:46:42 +02:00

34 lines
No EOL
1.1 KiB
HTML

<article>
<header class="headline">
</header>
{{- $title := partial "title.gotmpl" (dict "page" .) }}
<h1 id="{{ $title | plainify | anchorize }}">{{ $title }}</h1>
{{- .Content }}
{{- $lastCapital := "" }}
{{- $pages := partialCached "partials/_relearn/pagesTerm.gotmpl" . .Path }}
{{- range $pages }}
{{- $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 }}
{{- /* display pages of a term */}}
{{- $breadcrumb := "" }}
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
{{- $breadcrumb = trim (partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true) | plainify | htmlUnescape) "\n\r\t " }}
{{- end }}
<li><a href="{{ partial "permalink.gotmpl" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<div class="breadcrumbs highlightable" title="{{ . }}">{{ . }}</div>{{ end }}</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}
</ul>
{{- end }}
<footer class="footline">
</footer>
</article>