blob: e7fc88414684a9294e613cb375ac830fcf420eef (
plain) (
blame)
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
|
{{ define "main" }}
<header>
<a href= /><code>cd ~</code></a>
</header>
<hr>
<main>
{{ if .Data.Singular }}
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
<small><a href={{ "blog" | relURL }}>Remove filter</a></small>
{{ end }}
{{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }}
{{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }}
{{ $postPages := ($allPosts | complement $excludePosts) }}
<ul class=blog-posts>
{{ $currentYear := 0 }}
{{ range $postPages }}
{{ $year := .Date.Year }}
<li>
<span class="post-link-wrapper">
<a href="{{ .RelPermalink }}" class="post-title">{{ .Title }}</a>
</span>
<time datetime="{{ .Date.Format " 2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
</li>
{{ end }}
</ul>
{{ if not .Data.Singular }}
<footer>
<nav class=tags>
{{ range .Site.Taxonomies.tags }}
<a href={{ .Page.Permalink }}>#{{ .Page.Title }}</a>
{{ end }}
</nav>
</footer>
{{ end }}
</main>
{{ end }}
|