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

single.html « archives « layouts - github.com/wlh320/hugo-theme-hulga.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9cec5f76597bc6d29f54bccdbff3b5090493e32c (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
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}

<body>
  <div id="main">
    {{- partial "header.html" . -}}
    <section class="section">
    {{- block "archives-main" . }}{{- end }}
    </section>
  </div>
  {{- partial "footer.html" . -}}
  {{- partial "backtotop.html" . -}}
  {{- block "script" . }}{{- end }}
</body>

</html>

{{ define "archives-main" }}
<div class="container">
  <div class="box content">
    {{ $count := len (where (where .Site.Pages "Type" "post") "Kind" "page") }}
    <p>{{ i18n "archives" (dict "Count" $count) }}</p>
    <div class="post-archive">
      {{ range (where (where .Site.Pages "Type" "post") "Kind" "page").GroupByDate "2006" }}
      <h2>{{ .Key }}</h2>
      <ul class="listing">
        {{ range .Pages }}
        <li>
          <span class="date">{{ .Date.Format "2006/01/02" }} </span>
          <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
        </li>
        {{ end }}
      </ul>
      {{ end }}
    </div>
  </div>
</div>
{{ end }}