41 lines
1.2 KiB
HTML
41 lines
1.2 KiB
HTML
{{ define "main" }}
|
|
{{ .Content }}
|
|
<h1 id="aktuelles">Aktuelles</h1>
|
|
{{ $pagination := .Paginate .RegularPages }}
|
|
{{ range $pagination.Pages }}
|
|
<p class="date">{{ .Date | dateFormat "Mon, 02. January 2006" }}</p>
|
|
<article class="preview">
|
|
{{ with .Resources.GetMatch "image.jpg" }}
|
|
<img alt="{{ .Title }}" src="{{ .RelPermalink }}">
|
|
{{ end }}
|
|
<section class="text">
|
|
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
|
{{ .Summary }}
|
|
{{ if .Truncated }}
|
|
<a href="{{ .RelPermalink }}">> Mehr <</a>
|
|
{{ end }}
|
|
</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 }}
|
|
<h1 id="galerie">Galerie</h1>
|
|
<section class="gallery">
|
|
{{ range first 4 (.Site.GetPage "/galerie").Pages }}
|
|
<a class="blur-on-hover" href="{{ .RelPermalink }}">
|
|
{{ with index (.Resources.ByType "image") 0 }}
|
|
<img alt="{{ .Title }}" src="{{ (.Fill "560x560").RelPermalink }}">
|
|
{{ end }}
|
|
<p>{{ .Title }}</p>
|
|
</a>
|
|
{{ end }}
|
|
</section>
|
|
{{ end }}
|