hugo-page-test/themes/tsc_vfl/layouts/_default/home.html

41 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2023-10-08 18:10:42 +00:00
{{ define "main" }}
<a name="top">
<h1>{{ .Title }}</h1>
</a>
<div class="news-blog">
{{ range (.Paginate (first 30 ( where .Site.RegularPages "Section" "==" "news")) 10 ).Pages }}
2023-10-25 12:38:54 +00:00
{{ $urlBlogEntry := .RelPermalink}}
2023-10-08 18:10:42 +00:00
<div class="blog-entry">
<div class="header">
{{ .Date.Format "02.01.2006" }}
2023-10-25 12:38:54 +00:00
<a href="{{ $urlBlogEntry }}">{{ .Title }}</a>
2023-10-08 18:10:42 +00:00
</div>
<div class="details">
<div class="teaser-image">
{{ $page := . }}
{{ if .Params.Image }}
2023-10-25 12:38:54 +00:00
{{ with (.Resources.GetMatch (.Params.Image)).Fit "290x190 webp" }}
<a href="{{ $urlBlogEntry }}">
<img src="{{ .RelPermalink }}">
</a>
2023-10-08 18:10:42 +00:00
{{ end }}
{{ end }}
</div>
2023-10-25 12:38:54 +00:00
<div class="right-side">
<div class="intro">
{{ with .Summary }}
{{ . }}
{{ end }}
</div>
<div class="more"><a href="{{ $urlBlogEntry }}">MEHR...</a></div>
</div>
2023-10-08 18:10:42 +00:00
</div>
</div>
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
{{ .Content }}
{{ partial "totop" }}
{{ end }}