Blog/themes/papercut/layouts/_default/terms.html

29 lines
1022 B
HTML
Raw Permalink Normal View History

2022-09-02 23:51:32 +03:00
{{- define "main" }}
<div class="container">
<main>
<section class="bg-white border rounded shadow-sm p-3 mb-3 text-center">
2022-09-03 00:12:19 +03:00
<nav aria-label="breadcrumb">
<ol class="breadcrumb m-0">
<li class="breadcrumb-item"><a href="/">Главная</a></li>
<li class="breadcrumb-item"><a href="/posts/">Посты</a></li>
<li class="breadcrumb-item active" aria-current="page">Теги</li>
</ol>
</nav>
2022-09-02 23:51:32 +03:00
</section>
2022-12-24 03:06:29 +03:00
<section class="tags-justify bg-white border rounded shadow-sm p-3 mb-3 text-justify">
2022-09-02 23:51:32 +03:00
{{- $type := .Type }}
{{- range $key, $value := .Data.Terms.Alphabetical }}
{{- $name := .Name }}
{{- $count := .Count }}
{{- with site.GetPage (printf "/%s/%s" $type $name) }}
<a class="btn btn-sm btn-outline-dark position-relative m-2" href="{{ .Permalink }}">{{ .Name }}
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">{{ $count }}</span>
</a>
{{- end }}
{{- end }}
</section>
</main>
</div>
{{ end }}