Sync dev with master #253
@ -429,6 +429,8 @@ details[open] summary {
|
||||
padding: 5px 10px;
|
||||
background: var(--bs-secondary-bg);
|
||||
color: var(--bs-secondary-color);
|
||||
height: fit-content;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.tag-list a:hover {
|
||||
|
18
layouts/_default/terms.html
Normal file
18
layouts/_default/terms.html
Normal file
@ -0,0 +1,18 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<section class="section" data-pagefind-body>
|
||||
<div class="container">
|
||||
<div class="tag-list">
|
||||
{{ $transliterations := site.Data.transliterations.transliterations }}
|
||||
{{ range $name, $items := .Data.Terms }}
|
||||
{{ if eq $.Data.Plural "tags" }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
|
||||
{{ else if eq $.Data.Plural "categories" }}
|
||||
<a href="{{ `categories/` | relURL }}{{ $name | urlize | lower }}">{{ if (index $transliterations $name) }}{{ index $transliterations $name }}{{ else }}{{ $name | title }}{{end}}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ end }}
|
@ -13,12 +13,17 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<h4 class="mb-4">Tags</h4>
|
||||
<h4 class="mb-4"><a href="{{ `tags/` | relURL }}">Tags</a></h4>
|
||||
{{ if isset .Site.Taxonomies "tags" }}
|
||||
{{ if not (eq (len .Site.Taxonomies.tags) 0) }}
|
||||
<div class="tag-list">
|
||||
{{ range $name, $items := .Site.Taxonomies.tags }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
|
||||
{{ $pages := sort $items "Params.date" "desc" }}
|
||||
{{ if or (gt (len $pages) 2) (gt ((index $pages 0).Params.date | time.AsTime).Unix (sub now.Unix 7889229)) }}
|
||||
{{ $size := "1rem" }}
|
||||
{{ if gt (len $pages) 3 }}{{ $size = "1.25rem" }}{{ else if lt (len $pages) 2 }}{{ $size = ".75rem" }}{{ end }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}" style="font-size: {{ $size }};">{{ $name }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user