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

category.terms.html « taxonomy « layouts - github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9affa3a431ab17329cd2fd37b2213c4c1a98fb08 (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
{{ partial "general-title" . }}

{{ partial "header" . }}
{{ partial "navbar" . }}
<!-- Main -->
<div id="main">
  {{ if .Site.Params.categoriesByCount }}
    {{ $.Scratch.Set "categories" .Data.Terms.ByCount }}
  {{ else }}
    {{ $.Scratch.Set "categories" .Data.Terms.Alphabetical }}
  {{ end }}

  <ul class="posts">
    <header>
      <h1>{{ .Data.Plural }}</h1>
    </header>
    {{ $data := .Data }}
    {{ range $key, $value := $.Scratch.Get "categories" }}
      <li>
        <article>
          <header>
            <a href="/{{ $data.Plural }}/{{ $value.Name | urlize }}">{{ $value.Name }}</a>
            <span style="float:right;">{{ $value.Count }}</span>
          </header>
        </article>
      </li>
    {{ end }}
  </ul>
</div>

{{ $.Scratch.Set "showCategories" false }}
{{ partial "sidebar" . }}
{{ partial "footer" . }}