summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/_default/taxonomy.html
blob: b7a38c8477c6b78c574374047c3a79eaf075902a (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{{ define "main" }}

{{ .Scratch.Set "scope" "list" }}
{{ if .Site.Params.taxonomy.showHero | default false }}
{{ $heroStyle := print "partials/hero/" .Site.Params.taxonomy.heroStyle ".html" }}
{{ if templates.Exists $heroStyle }}
{{ partial $heroStyle . }}
{{ else }}
{{ partial "partials/hero/basic.html" . }}
{{ end }}
{{- end -}}

{{ $toc := and (.Params.showTableOfContents | default (.Site.Params.taxonomy.showTableOfContents | default false)) (in
.TableOfContents "<ul") }} 

  <header>
    {{ if .Params.showBreadcrumbs | default (.Site.Params.taxonomy.showBreadcrumbs | default false) }}
      {{ partial "breadcrumbs.html" . }}
    {{ end }}
    <h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .Title }}</h1>
    <div class="mt-1 mb-2 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
      {{ partial "article-meta/taxonomy.html" (dict "context" . "scope" "single") }}
    </div>
  </header>
  {{ if .Content }}
    <section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
      <div class="min-w-0 min-h-0 max-w-prose">
        {{ .Content }}
      </div>
    </section>
  {{ end }}
  <script>
    var oid = "views_taxonomy_{{ .Data.Plural }}"
    var oid_likes = "likes_taxonomy_{{ .Data.Plural }}"
  </script>
  {{ $jsPage := resources.Get "js/page.js" }}
  {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint "sha512" }}
  <script type="text/javascript" src="{{ $jsPage.RelPermalink }}" integrity="{{ $jsPage.Data.Integrity }}"></script>
  

  {{ if .Site.Params.taxonomy.cardView }}

  <section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
    {{ range .Data.Terms }}
    {{ partial "term-link/card.html" . }}
    {{ end }}
  </section>

  {{ else }}

  <section class="flex flex-wrap max-w-prose -mx-2 overflow-hidden">
    {{ range .Data.Terms }}
      {{ partial "term-link/text.html" . }}
    {{ end }}
  </section>

  {{ end }}


{{ end }}