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

term.html « _default « layouts - github.com/wlh320/hugo-theme-hulga.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d55f6746300638043db4bc57159c79f6e760510d (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
{{ define "main" }}
{{- partial "header.html" . -}}
{{- $ctx := . -}}
<section class="section">
  <div class="container">
    <div class="columns">
      <div class="column is-2"></div>
      <div class="column is-8">
        {{ if eq .Data.Singular "category" }}
        <nav class="breadcrumb is-centered is-medium" aria-label="breadcrumbs">
          <ul>
            <li><a href={{"categories" | absURL}}>{{- i18n "categories" -}}</a></li>
            <li class="is-active"><a href="#">{{ .Data.Term }}</a></li>
          </ul>
        </nav>
        {{ else if eq .Data.Singular "tag" }}
        <nav class="breadcrumb is-centered is-medium" aria-label="breadcrumbs">
          <ul>
            <li><a href="{{"tags" | absURL }}">{{- i18n "tags" -}}</a></li>
            <li class="is-active"><a href="#">{{ .Data.Term }}</a></li>
          </ul>
        </nav>
        {{ end }}
        <div class="post-lists">
          {{ $paginator := .Paginate (where .Data.Pages "Type" "post") (.Site.Params.termPaginate | default 10) }}
          {{ range $paginator.Pages }}
              <div class="box post-box">
                <div class="post-box-title">
                  <a href="{{.Permalink }}" class="title is-size-5">{{ .Title }}</a>
                </div>
                <div class="post-box-meta">
                  {{ .Date.Format "2006/01/02" }}
                  {{ with .Params.Categories }} ・
                  {{ range .}}
                  <span class="post-tag post-box-category">
                    <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a>
                  </span>
                  {{ end }}
                  {{ end }}
                </div>
                {{ with .Params.Tags }}
                <div class="post-box-tags">
                  {{ range .}}
                  <span class="post-tag post-box-tag">
                    <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}/">#{{ . }}</a>
                  </span>
                  {{ end }}
                </div>
                {{ end }}
              </div>
          {{ end }}
          {{ partial "paginator.html" . }}
        </div>
      </div>
      <div class="column is-2"></div>
    </div>
  </div>
</section>
{{ end }}