29 lines
1.2 KiB
HTML
29 lines
1.2 KiB
HTML
{{ define "main" }}
|
|
{{ .Content }}
|
|
{{ $pagination := .Paginate .RegularPages }}
|
|
{{ $days := dict "Monday" "Mo" "Tuesday" "Di" "Wednesday" "Mi" "Thursday" "Do" "Friday" "Fr" "Saturday" "Sa" "Sunday" "So" }}
|
|
{{ $months := dict "January" "Januar" "February" "Februar" "March" "März" "April" "April" "May" "Mai" "June" "Juni" "July" "Juli" "August" "August" "September" "September" "October" "Oktober" "November" "November" "December" "Dezember" }}
|
|
{{ range $pagination.Pages }}
|
|
<p class="date">{{ index $days (.Date.Format "Monday") }}, {{ .Date.Format "02" }}. {{ index $months (.Date.Format "January") }} {{ .Date.Format "2006" }}</p>
|
|
{{ $page := . }}
|
|
<article class="preview">
|
|
{{ with .Resources.GetMatch "image.jpg" }}
|
|
<section class="image"><img alt="{{ .Title }}" src="{{ .RelPermalink }}"></section>
|
|
{{ end }}
|
|
<section class="text">
|
|
<h2><a href="{{ $page.RelPermalink }}">{{ $page.Title }}</a></h2>
|
|
{{ $page.Summary }}
|
|
</section>
|
|
</article>
|
|
{{ end }}
|
|
{{ with $pagination }}
|
|
{{ if gt .TotalPages 1 }}
|
|
<nav class="pagination">
|
|
{{ if .HasPrev }}<a href="{{ .Prev.URL }}">< Neuere Posts</a>{{ end }}
|
|
<span>{{ .PageNumber }}/{{ .TotalPages }}</span>
|
|
{{ if .HasNext }}<a href="{{ .Next.URL }}">Ältere Posts ></a>{{ end }}
|
|
</nav>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|