Welcome to mirror list, hosted at ThFree Co, Russian Federation.

term.html « _default « layouts - github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b3d2cce796b81fe7e4550fe1fdbc442beb21a5e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{ define "body_class" }}2-column{{ end }}
{{ define "main" }}
<div class="container extended flex on-phone--column">
    {{ partial "sidebar/left.html" . }}

    <main class="main">
        
        <h3 class="taxonomy-type">{{ .Type | singularize  | humanize }}</h3>
        <div class="taxonomy-card">
            <div class="taxonomy-details">
                <h3 class="taxonomy-count">{{ len .Pages }} post{{ if gt (len .Pages) 1 }}s{{ end }}</h3>
                <h1 class="taxonomy-term">{{ .Title }}</h1>
                {{ with .Params.description }}
                    <h2 class="taxonomy-description">{{ . }}</h2>
                {{ end }}
            </div>

            {{ $image := partial "helper/image" (dict "Context" .) }}
            {{ if $image.exists }}
                <div class="taxonomy-image">
                    {{ if $image.resource }}   
                        {{- $thumbnail := $image.resource.Fill "120x120" -}}
                        <img src="{{ $thumbnail.RelPermalink }}" width="{{ $thumbnail.Width }}"
                            height="{{ $thumbnail.Height }}" loading="lazy">
                    {{ else }}
                        <img src="{{ $image.permalink }}" loading="lazy">
                    {{ end }}
                </div>
            {{ end }}
        </div>
        
        <section class="article-list--compact">
            {{ $v2 := where .Pages "Params.hidden" "!=" true }}
            {{ $pag := .Paginate (.Pages) }}
            {{ range $pag.Pages }}
                {{ partial "article-list/compact" . }}
            {{ end }}
        </section>
        
        {{- partial "pagination.html" . -}}

        {{ partial "footer" . }}
    </main>
</div>
{{ end }}