mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 15:56:29 -05:00
37 lines
1.1 KiB
HTML
37 lines
1.1 KiB
HTML
{{ define "main"}}
|
|
{{ partial "header.html" . }}
|
|
<main>
|
|
{{ partial "search.html" . }}
|
|
{{ partial "tags/all.html" . }}
|
|
|
|
<br/>
|
|
{{ $posts := where site.RegularPages "Type" "blog" }}
|
|
{{ $postCount := len $posts }}
|
|
{{ range last 1 $posts }}
|
|
{{ $tags := .Site.Taxonomies.tags }}
|
|
<div class='bloglist-teaser'>
|
|
Hello! This page contains <strong>{{ $postCount | lang.NumFmt 0 }} posts</strong>
|
|
written in the past <strong>{{ div (sub now.Unix .Date.Unix) 31536000 }} years</strong>
|
|
spanning
|
|
{{ len $tags }} topics within the dropdown above.
|
|
</div>
|
|
{{ end }}
|
|
|
|
|
|
|
|
<!-- contents -->
|
|
<div class="bloglist">
|
|
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}
|
|
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
|
|
{{ if (ne $index 0) }}
|
|
<hr class="separator">
|
|
{{ end }}
|
|
<p class="bloglist-date">{{ .Key }}</p>
|
|
{{ range .Pages }}
|
|
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</main>
|
|
{{ partial "footer.html" . }}
|
|
{{ end }}
|