44 lines
1.1 KiB
HTML
44 lines
1.1 KiB
HTML
|
|
{{ define "main" }}
|
|
{{ if .Title }}
|
|
<header>
|
|
<h1 class="main-title">{{ .Title }}</h1>
|
|
</header>
|
|
{{ end }}
|
|
|
|
{{ $pages := union .RegularPages .Sections }}
|
|
{{ if .IsHome }}
|
|
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
|
|
|
<ul class="post-list">
|
|
{{ $paginator := .Paginate $pages }}
|
|
{{ range $index, $page := $paginator.Pages }}
|
|
<li class="post-entry">
|
|
<header>
|
|
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
|
<div class="post-date">
|
|
<time class="nobreak" datetime="{{ .Date | time.Format " 2006-01-02" }}">{{ .Date | time.Format "January 2, 2006" }}</time>
|
|
</div>
|
|
{{ partial "development/draft_tag.html" . }}
|
|
</header>
|
|
{{ if .Description }}
|
|
<article>{{ .Description }}</article>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
{{ if gt $paginator.TotalPages 1 }}
|
|
<nav class="main-nav">
|
|
{{ if $paginator.HasPrev }}
|
|
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
|
|
{{ end }}<!---->
|
|
{{ if $paginator.HasNext }}
|
|
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a>
|
|
{{ end }}
|
|
</nav>
|
|
{{ end }}
|
|
{{ end }}
|