www.kontakt-bamberg.de/layouts/index.html

31 lines
1.3 KiB
HTML
Raw Normal View History

2023-03-11 11:41:19 +01:00
{{ define "main" }}
{{ .Content }}
{{ $pagination := .Paginate .RegularPages }}
2023-03-11 16:04:10 +01:00
{{ $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" }}
2023-03-11 11:41:19 +01:00
{{ range $pagination.Pages }}
2023-03-11 16:04:10 +01:00
<p class="date">{{ index $days (.Date.Format "Monday") }}, {{ .Date.Format "02" }}. {{ index $months (.Date.Format "January") }} {{ .Date.Format "2006" }}</p>
<article class="preview">
{{ with .Resources.GetMatch "image.jpg" }}
<section class="image"><img alt="{{ .Title }}" src="{{ .RelPermalink }}"></section>
{{ end }}
<section class="text">
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">> Mehr &lt;</a>
{{ end }}
2023-03-11 16:04:10 +01:00
</section>
</article>
2023-03-11 11:41:19 +01:00
{{ end }}
{{ with $pagination }}
{{ if gt .TotalPages 1 }}
<nav class="pagination">
{{ if .HasPrev }}<a href="{{ .Prev.URL }}">&lt; Neuere Posts</a>{{ end }}
<span>{{ .PageNumber }}/{{ .TotalPages }}</span>
{{ if .HasNext }}<a href="{{ .Next.URL }}">Ältere Posts &gt;</a>{{ end }}
</nav>
{{ end }}
{{ end }}
{{ end }}