blob: 2d722bb14b07e4febf5e1f3b2c66c1dbf8d8e968 (
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
|
{{ define "hero" }}
{{ end }}
{{ define "main" }}
<div class="max-w-screen-md mx-auto px-1 mv4">
<h1 class="f1 tc title baskerville">{{ .Title }}</h1>
<p class="f4 baskerville">{{ T "maybe_look" }}</p>
{{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }}
{{ $count := len $query }}
{{ if gt $count 0 }}
<h3 class="lh-title text-2xl baskerville">{{ T "recent_pages" }}</h3>
<ul class="list">
{{ range first 10 $query }}
<li class="lh-copy grow stripe-dark p-2">
<a class="dim color-inherit block" href="{{ .RelPermalink }}">
{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
<time
datetime="{{ .Date.Format "2006-01-02" }}"
class="f6 fw3 fr ml-2"
>
<i class="far fa-calendar"></i>
{{ time.Format $dateFormat .Date }}
</time>
{{ .Title }}
<sup class="w3-theme ttu p-1 br-pill">{{ .Section }}</sup>
</a>
</li>
{{ end }}
</ul>
{{ end }}
<a href="/search" class="color-inherit dim">
<h3 class="lh-title text-2xl baskerville">
<i class="fas fa-magnifying-glass"></i>
{{ T "try_search" }}
</h3>
</a>
</div>
{{ end }}
|