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

@ -8,6 +8,7 @@
.hero-icon-container {
padding: 1rem;
margin: auto;
}
.hero-button {

View file

@ -287,10 +287,16 @@ button {
}
.services {
display: inherit;
display: flex;
align-items: center;
padding: 1.5rem 0rem;
}
.services-section-content {
display: flex;
align-items: center;
}
.service-icon-container {
padding: 1.5rem;
margin: auto;
@ -299,6 +305,7 @@ button {
.service-icon {
width: 100%;
height: auto;
object-fit: contain;
}
.service-button {

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 }}

View file

@ -1,7 +1,11 @@
{{ define "main" }}
{{ with .Params.image }}
{{ if .url }}
<img class="coverimage" src="{{ .url }}" />
{{ else }}
<img class="coverimage" src="{{ . }}" />
{{ end }}
{{ end }}
<div class="content">
{{ with .Title }}
<div class="title">

View file

@ -0,0 +1,27 @@
{{ define "main" }}
<div class="content">
<article>
<div class="title">
<h1 class="content-title">{{ .Title }}</h1>
<div class="divider"></div>
</div>
{{.Content}}
</article>
<div class="cardList">
{{ range .Pages }}
<a href="{{.Permalink}}">
<div class="card">
{{ if .Params.image }}
<img class="cardImage" src="{{ .Params.image }}" />
{{ else }}
<img class="cardImage" src="{{ $.Site.Params.defaultimage }}" />
{{ end }}
<div class="cardTitle">{{.Title}}</div>
<div class="cardDescription">{{ .Content | safeHTML | truncate 250 }}</div>
<div class="cardDetail">{{.Date.Format "02.01.2006"}} | {{.ReadingTime}} Minuten</div>
</div>
</a>
{{ end }}
</div>
</div>
{{ end }}

View file

@ -13,7 +13,7 @@
<link rel="stylesheet" type="text/css" href="{{ $index.RelPermalink }}">
{{ end }}
<div id="{{ $id }}" class="section {{if eq $odd 0}} section-even {{end}} row hero">
<div class="section-content">
<div class="section-content services">
<div class="hero-description col-5">
<div class="title">
<h1 class="content-title">{{ $hero.title }}</h1>