{{ define "main" }}
<main id="main">
    {{ .Content }}
    {{ $paginator := .Paginate (where .Pages ".Params.date" "!=" nil) 1 }}
    {{ range $paginator.Pages.ByWeight }}
    <p class="date">{{ .Date.Format "January 2, 2006" }}</p>
    {{ .Content }}
    {{ end }}
    {{ partial "pagination.html" . }}
    {{ if (isset .Params "back") }}
    <div style="text-align: center;"><a href="{{ .Params.back }}" class="pulse">&laquo; back to where we left off</a></div>
    {{ end }}
</main>
{{end}}
