blob: 4a1bbf0b31aebd4328c4deffa6eff2c89ada0c11 (
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 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 }}
|