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

46 lines
1.6 KiB
HTML
Raw 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 }}
{{ $resImage := resources.GetMatch (.Params.Image) }}
{{ with .Resources.GetMatch (.Params.Image) }}
{{ $resImage = . }}
{{ end }}
{{/* {{ with ($resImage).Fit "290x190 webp" }} */}}
{{ with $resImage }}
2023-10-25 12:38:54 +00:00
<a href="{{ $urlBlogEntry }}">
<img src="{{ (.Fit "290x190 webp").RelPermalink }}">
2023-10-25 12:38:54 +00:00
</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 }}