FIX image display in hero section; ADD template for tag display

This commit is contained in:
Hoernschen 2022-06-29 13:03:51 +02:00
parent 849e66eafc
commit d9d8befe21
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
6 changed files with 54 additions and 10 deletions

View file

@ -1,11 +1,17 @@
{{ define "main" }}
{{ if .Params.id }}
{{- partial "hero.html" (dict "hero" .Params "color" .Site.Params.color "odd" 0) -}}
{{ end }}
{{.Content}}
<div>
{{ if .Content }}
<div class="content">
{{ with .Title }}
<div class="title">
<h1 class="content-title">{{ . }}</h1>
<div class="divider"></div>
</div>
{{ end }}
{{.Content}}
</div>
{{ end }}
{{- range $index, $page := .Pages }}
{{ $odd := mod (add $index 1) 2 }}
{{ $odd := mod $index 2 }}
{{ if eq .Params.type "slider" }}
{{- partial "slider.html" (dict "id" $page.File.ContentBaseName "slider" .Params "color" $.Site.Params.color "odd" $odd) -}}
{{ else if eq .Params.type "hero" }}
@ -22,5 +28,4 @@
{{- partial "links.html" (dict "id" $page.File.ContentBaseName "links" .Params "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
{{ end }}
{{ end }}
</div>
{{ end }}