Add 'more' link when content is truncated

This commit is contained in:
Luca 2023-03-11 16:22:38 +01:00
parent 5b778111cf
commit c2add684b2
1 changed files with 5 additions and 3 deletions

View File

@ -5,14 +5,16 @@
{{ $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 }}
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">> Mehr &lt;</a>
{{ end }}
</section>
</article>
{{ end }}