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: 18ce343361c0461d5b91383d78ba24b7ed7648f1 (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
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}

<body>
  <div id="main">
    {{- partial "nav.html" . -}}
    {{- 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 section">
    <div class="content">
      <p>本博客共 {{len (where (where .Site.Pages "Type" "post") "Kind" "page")}} 篇博文</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>
</div>
{{ end }}