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

archive.html « _default « layouts - github.com/zhaohuabing/hugo-theme-cleanwhite.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8e46cb5ea9032190047d702fe53e0f3ec1bb26d0 (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
{{ define "main" }}
{{ $pages := (where (where .Site.Pages "Type" "post") "IsPage" true) }}

<div data-pagefind-ignore="all" class="container">
    <div class="row">
   	    <div class="
            col-lg-8 col-lg-offset-1
            col-md-8 col-md-offset-1
            col-sm-12
            col-xs-12
            post-container
        ">
            <div class="archive-list">
                {{ range ($pages.GroupByDate "2006") }}
                {{ if gt .Key 1 }}
                    {{ $.Scratch.Set "count" 1 }}
                    {{ range .Pages  }}
                        {{ if (eq ($.Scratch.Get "count") 1) }}
                            {{ $.Scratch.Set "count" 0 }}
                            <h1 class="title is-4 has-text-weight-normal">{{ .Date.Format "2006" }}</h1>
                        {{ end }}
                    {{ end }}

                    <ul>
                    {{ range .Pages }}
                        <li>
                            <span>{{ .Date.Format "01/02" }}</span> — 
                            <a href="{{ .RelPermalink }}">
                                {{ .Title }}
                            </a>
                        </li>
                    {{ end }}
                    </ul>

                {{ end }}
                {{ end }}
            </div>
       	</div>
        {{ partial "sidebar.html" . }}
	</div>
</div>


<hr />
{{ end }}