add tags
This commit is contained in:
parent
772a66834c
commit
23fb7fb982
22
themes/papercut/layouts/_default/terms.html
Normal file
22
themes/papercut/layouts/_default/terms.html
Normal file
@ -0,0 +1,22 @@
|
||||
{{- define "main" }}
|
||||
<div class="container">
|
||||
<main>
|
||||
<section class="bg-white border rounded shadow-sm p-3 mb-3 text-center">
|
||||
<h3 class="m-0">Теги</h3>
|
||||
</section>
|
||||
|
||||
<section class="bg-white border rounded shadow-sm p-3 mb-3">
|
||||
{{- $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 }}
|
@ -9,6 +9,7 @@
|
||||
</div>
|
||||
<div class="col-4 d-flex justify-content-end align-items-center">
|
||||
<a class="btn btn-sm btn-outline-light" href="/posts/" target="_blank">Blog</a>
|
||||
<a class="btn btn-sm btn-outline-light" href="/tags/" target="_blank">Tags</a>
|
||||
💀 🔵 🔴
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user