diff options
Diffstat (limited to 'layouts/index.html')
-rwxr-xr-x | layouts/index.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100755 index 0000000..43a3508 --- /dev/null +++ b/layouts/index.html | |||
@@ -0,0 +1,37 @@ | |||
1 | <html lang="en"> | ||
2 | {{ partial "header.html" . }} | ||
3 | <body> | ||
4 | <div class="content"> | ||
5 | {{ partial "head.html" . }} | ||
6 | <main class="list"> | ||
7 | <div class="site-description"> | ||
8 | {{- if isset .Site.Params "subtitle" -}} | ||
9 | <p>{{ .Site.Params.Subtitle | markdownify }}</p> | ||
10 | {{- end -}} | ||
11 | </div> | ||
12 | {{- if isset .Site.Params "note" -}} | ||
13 | {{ .Site.Params.Note | markdownify }} | ||
14 | {{- end -}} | ||
15 | |||
16 | {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} | ||
17 | {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} | ||
18 | {{ range $paginator.Pages }} | ||
19 | <section class="list-item"> | ||
20 | <h1 class="title"><a href="{{ .RelPermalink }}">{{.Title}}</a></h1> | ||
21 | <time>{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</time> | ||
22 | <br><div class="description"> | ||
23 | {{ if isset .Params "description" }} | ||
24 | {{ .Description }} | ||
25 | {{ else }} | ||
26 | {{ .Summary }}… | ||
27 | {{ end }} | ||
28 | </div> | ||
29 | <a href="{{ .RelPermalink }}">Read more ⟶</a> | ||
30 | </section> | ||
31 | {{ end }} | ||
32 | {{ template "partials/paginator.html" . }} | ||
33 | </main> | ||
34 | {{ partial "footer.html" . }} | ||
35 | </div> | ||
36 | </body> | ||
37 | </html> | ||