brainbaking/themes/brainbaking-minimal/layouts/_default/terms.html

50 lines
1.1 KiB
HTML
Raw Normal View History

{{ $.Scratch.Set "curLetter" "" }}
2022-06-20 18:16:53 +02:00
{{ $offset := 1 }}
2020-05-27 20:35:46 +02:00
{{ partial "header" . }}
<a id="top"></a>
<main class="list">
2020-05-27 20:35:46 +02:00
<header>
2022-10-21 07:53:23 +02:00
<h1 id="header" class="p-name">
<svg class='icon'><use xlink:href="#{{ .Params.icontag }}"></use></svg>&nbsp;{{ .Title }}
</h1>
</header>
2020-05-27 20:35:46 +02:00
2020-05-27 21:20:01 +02:00
{{ with .Content }}
<article>
2020-05-27 21:20:01 +02:00
{{ . }}
</article>
2020-05-27 21:20:01 +02:00
{{ end }}
<article class="tagindex">
<div class="taggrid">
{{range $name, $taxonomy := .Site.Taxonomies.tags}}
{{ $cnt := .Count }}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
{{ $firstChar := substr $name 0 1 | upper }}
{{ $curLetter := $.Scratch.Get "curLetter" }}
{{ if ne $firstChar $curLetter }}
{{ if ne $curLetter "" }}
</ul>
</div>
{{ end }}
{{ $.Scratch.Set "curLetter" $firstChar }}
<div style="margin-block-start: 0.6rem;">
<h3>{{ $firstChar }}</h3>
<ul>
{{ end }}
2022-06-20 18:16:53 +02:00
{{ if gt $cnt $offset }}
<li>
<a href={{ .RelPermalink }} title="All pages with tag {{$name}}">{{.Title}}</a> ({{$cnt}})
</li>
2022-06-20 18:16:53 +02:00
{{ end }}
{{end}}
{{end}}
</div>
</article>
2020-05-27 21:20:01 +02:00
</main>
2020-05-27 20:35:46 +02:00
{{ partial "footer" . }}