mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 00:56:34 -05:00
47 lines
1.4 KiB
HTML
47 lines
1.4 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 block-center'>
|
|
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 }}
|
|
<div class="bloglist-item">
|
|
<p><a href="{{ .Permalink }}">{{ .Title }}</a></p>
|
|
<p class="bloglist-item-tag">
|
|
{{ range .Params.tags }}
|
|
{{ $name := . }}
|
|
{{ with $.Site.GetPage (printf "/tags/%s" (. | urlize)) }}
|
|
<span><a href="{{ .Permalink }}">#{{ $name }}</a> </span>
|
|
{{ end }}
|
|
{{ end }}
|
|
</p>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</main>
|
|
{{ partial "footer.html" . }}
|
|
{{ end }}
|