{{ partial "header.html" . }}
{{ partial "navbar.html" . }}

<div class="container content page">
	{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}{{ range $paginator.Pages }}
	<div class="card">
		<div class="card-content">
			<div class="media">
				<div class="media-content">
					<a class="title is-4" href="{{ .Permalink }}">{{ .Title }}</a>
					<p class="subtitle is-6">
						{{ .Date.Format "2006-01-02" }}
					</p>
				</div>
			</div>

			<div class="content">
				{{ .Summary }}
			</div>

			<a href="{{ .Permalink }}" class="button is-primary is-outlined noshadow">
				Read more
			</a>
		</div>
	</div>
	{{ end }}

	<nav class="pagination is-centered" role="navigation" aria-label="pagination">
		{{ if .Paginator.HasPrev}}
		<a class="pagination-previous" href="{{ .Paginator.Prev.URL }}">Previous</a>
		{{ end }}
		{{ if .Paginator.HasNext }}
		<a class="pagination-next" href="{{ .Paginator.Next.URL }}">Next</a>
		{{ end }}
	</nav>
</div>

{{ partial "footer.html" . }}
