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

46 lines
1.6 KiB
HTML

{{ define "main" }}
<a name="top">
<h1>{{ .Title }}</h1>
</a>
<div class="news-blog">
{{ range (.Paginate (first 30 ( where .Site.RegularPages "Section" "==" "news")) 10 ).Pages }}
{{ $urlBlogEntry := .RelPermalink}}
<div class="blog-entry">
<div class="header">
{{ .Date.Format "02.01.2006" }}
<a href="{{ $urlBlogEntry }}">{{ .Title }}</a>
</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 }}
<a href="{{ $urlBlogEntry }}">
<img src="{{ (.Fit "290x190 webp").RelPermalink }}">
</a>
{{ end }}
{{ end }}
</div>
<div class="right-side">
<div class="intro">
{{ with .Summary }}
{{ . }}
{{ end }}
</div>
<div class="more"><a href="{{ $urlBlogEntry }}">MEHR...</a></div>
</div>
</div>
</div>
{{ end }}
{{ template "_internal/pagination.html" . }}
</div>
{{ .Content }}
{{ partial "totop" }}
{{ end }}