blog/themes/angels-ladder/layouts/index.html

43 lines
1.5 KiB
HTML
Raw Normal View History

2019-03-31 11:00:21 +00:00
{{ partial "header.html" . }}
<!-- Main Section Layout
-->
<main id="index" role="main">
<div class="article-header light-gray"><h1>Recent Articles</h1></div>
2020-01-19 06:24:38 +00:00
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") }}
2019-03-31 11:00:21 +00:00
{{ range $paginator.Pages }}
2020-01-19 06:24:38 +00:00
{{ if eq .Kind "page" }}
<div class="summary">
<h2><a href="{{ .Permalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a></h2>
<div class="meta">
{{ .Date.Format "Jan 2, 2006" }} &nbsp;
{{ range .Params.categories }}
#<a href="/categories/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}
{{ range .Params.tags }}
#<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
{{ end }}: {{ .Description }}
</div>
</div>
{{ end }}
2019-03-31 11:00:21 +00:00
{{ end }}
</main>
<!-- Paginator Section Layout
-->
<nav>
2020-01-19 06:24:38 +00:00
{{ $paginator := .Paginate (where .Site.Pages "Type" "post") }}
2019-03-31 11:00:21 +00:00
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">Prev</a>
{{ end }}
<span class="">Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
{{ if .Paginator.HasNext }}
<a href="{{ .Paginator.Next.URL }}">Next</a>
{{ end }}
</nav>
{{ partial "footer.html" . }}