2022-06-27 14:09:44 +00:00
|
|
|
{{- $posts := .posts }}
|
|
|
|
{{- $pages := .pages }}
|
|
|
|
{{- $defaultimage := .defaultimage }}
|
|
|
|
{{- $odd := .odd }}
|
|
|
|
{{- $id := "posts"}}
|
|
|
|
{{if $posts.id}}
|
|
|
|
{{- $id := $posts.id}}
|
|
|
|
{{else if .id}}
|
|
|
|
{{- $id := .id }}
|
|
|
|
{{end}}
|
|
|
|
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}}">
|
|
|
|
<div class="section-content posts">
|
|
|
|
<div class="title">
|
|
|
|
<h1 class="content-title">{{ $posts.title }}</h1>
|
|
|
|
<div class="divider"></div>
|
|
|
|
</div>
|
|
|
|
<div class="cardList">
|
|
|
|
{{ range first 3 $pages }}
|
2022-07-08 15:01:05 +00:00
|
|
|
<div class="card">
|
|
|
|
<a href="{{.Permalink}}">
|
|
|
|
<div class="cardContent">
|
|
|
|
{{ if .Params.image }}
|
2022-07-08 15:35:15 +00:00
|
|
|
<img class="cardImage {{ if eq .Params.image.cover false }} noCover {{ end }}" alt="{{ .Params.image.alt }}" src="{{ .Params.image.url }}" />
|
2022-07-08 15:01:05 +00:00
|
|
|
{{ else }}
|
2022-07-08 15:35:15 +00:00
|
|
|
<img class="cardImage" src="{{ $defaultimage }}" alt="Defaul Image" />
|
2022-07-08 15:01:05 +00:00
|
|
|
{{ end }}
|
|
|
|
<div class="cardTitle">{{.Title}}</div>
|
2022-07-25 08:19:53 +00:00
|
|
|
<div class="cardDescription">{{ .Summary | safeHTML | truncate 320 }}</div>
|
2022-07-08 15:01:05 +00:00
|
|
|
<div class="cardDetail">{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
2022-06-27 14:09:44 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="more-button"><a href="{{ $posts.id }}"> {{ $posts.moretext }} </a></div>
|
|
|
|
</div>
|
|
|
|
</div>
|