Sync dev with master #253

Manually merged
Denys Konovalov merged 157 commits from master into dev 2023-12-24 14:26:06 +01:00
3 changed files with 27 additions and 2 deletions
Showing only changes of commit da0484c29a - Show all commits

@ -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 {

@ -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 }}