1
0
mirror of https://github.com/RivalStorm/rivalstorm.github.io synced 2024-11-23 12:09:57 +00:00
blog/layouts/index.html

31 lines
849 B
HTML
Raw Normal View History

2016-12-06 12:11:18 +00:00
{{ partial "default_head.html" . }}
<!-- Space delimited list of page types -->
{{ $paginator := .Paginate (where .Data.Pages "Type" "in" "post") }}
<div class="posts">
{{ range .Paginator.Pages }}
<div class="post">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<span class="post-date">{{ .Date.Format .Site.Params.DateForm }}</span>
{{ .Content }}
</div>
{{ end }}
</div>
<div class="pagination">
{{ if $paginator.HasNext }}
<a class="pagination-item older" href="{{ $paginator.Next.URL }}">Older</a>
{{ else }}
<span class="pagination-item older">Older</span>
{{ end }}
{{ if $paginator.HasPrev }}
<a class="pagination-item newer" href="{{ $paginator.Prev.URL }}">Newer</a>
{{ else }}
<span class="pagination-item newer">Newer</span>
{{ end }}
</div>
{{ partial "default_foot.html" . }}