blob: d249f23ee0ddc47633032d5d37aec14cab4ff25d (
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
|
{{ define "hero" }}
{{ end }}
{{ define "main" }}
<div class="max-w-screen-md mx-auto px-1 mv4">
<h1 class="text-center baskerville">{{ .Title }}</h1>
<p class="text-xl 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="baskerville">{{ T "recent_pages" }}</h3>
<ul class="">
{{ range first 10 $query }}
<li
class="transition hover:scale-105 odd:bg-white even:bg-gray-200 p-2"
>
<a class="hover:opacity-50 block" href="{{ .RelPermalink }}">
{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
<time
datetime="{{ .Date.Format "2006-01-02" }}"
class="text-sm float-right ml-2"
>
<i class="far fa-calendar"></i>
{{ time.Format $dateFormat .Date }}
</time>
{{ .Title }}
<sup class="bg-lime-500 text-white uppercase p-1 rounded-full"
>{{ .Section }}</sup
>
</a>
</li>
{{ end }}
</ul>
{{ end }}
<a href="/search" class="hover:opacity-50">
<h3 class="baskerville">
<i class="fas fa-magnifying-glass"></i>
{{ T "try_search" }}
</h3>
</a>
</div>
{{ end }}
|