From 57e72154a5d5f3b081fe034bce691aeec84662b1 Mon Sep 17 00:00:00 2001 From: Hoernschen Date: Fri, 15 Mar 2024 17:37:03 +0100 Subject: [PATCH] ADD quote and default section, ADD cover images to lists, FIX contact section --- assets/scss/hero.scss | 4 ++-- assets/scss/index.scss | 24 ++++++++++++++++++++++-- layouts/_default/list.html | 13 ++++++++++++- layouts/_default/single.html | 3 +-- layouts/partials/contact.html | 5 ++++- layouts/partials/default.html | 19 +++++++++++++++++++ layouts/partials/quote.html | 13 +++++++++++++ layouts/partials/service.html | 16 +++++++++------- 8 files changed, 82 insertions(+), 15 deletions(-) create mode 100644 layouts/partials/default.html create mode 100644 layouts/partials/quote.html diff --git a/assets/scss/hero.scss b/assets/scss/hero.scss index 9b17d53..1530f57 100644 --- a/assets/scss/hero.scss +++ b/assets/scss/hero.scss @@ -1,5 +1,5 @@ .hero { - height: 700px; + min-height: 700px; {{ with .hero.background }} background-image: url({{ . }}) !important; background-size: cover; @@ -11,4 +11,4 @@ .hero-icon-container { padding: 1rem; margin: auto; -} \ No newline at end of file +} diff --git a/assets/scss/index.scss b/assets/scss/index.scss index 951409e..796baa3 100644 --- a/assets/scss/index.scss +++ b/assets/scss/index.scss @@ -346,6 +346,26 @@ button { object-fit: contain; } +.quote { + display: flex; + flex-direction: column; + text-align: center; + font-size: x-large; + font-style: italic; +} + +.quote > .icon-quote-left { + text-align: left; + margin-block-end: -0.5rem; + margin-inline-start: 0.5rem; +} + +.quote > .icon-quote-right { + text-align: right; + margin-block-start: -0.5rem; + margin-inline-end: -0.5rem; +} + .button-filled { background-color: {{ .Site.Params.color.primary }}; color: white; @@ -407,7 +427,7 @@ button { display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: flex-start; + justify-content: center; width: 100%; } @@ -536,4 +556,4 @@ button { .services { display: inline-block; } -} \ No newline at end of file +} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index dbafc46..03d6e8b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,4 +1,11 @@ {{ define "main" }} + {{ with .Params.image }} + {{ if .url }} + {{ .alt }} + {{ else }} + + {{ end }} + {{ end }} {{ if .Content }}
{{ with .Title }} @@ -32,9 +39,13 @@ {{- partial "logos.html" (dict "id" $id "logos" .Params "odd" $odd) -}} {{ else if eq .Params.type "links" }} {{- partial "links.html" (dict "id" $id "links" .Params "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}} + {{ else if eq .Params.type "quote" }} + {{- partial "quote.html" (dict "id" $id "quote" .Params "content" .Content "odd" $odd) -}} {{ else if eq .Params.type "posts" }} {{ $pages := where $.Site.RegularPages "Section" $id }} {{- partial "posts.html" (dict "id" $id "posts" .Params "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}} + {{ else if .IsPage }} + {{- partial "default.html" (dict "id" $id "params" .Params "content" .Content "odd" $odd) -}} {{ end }} {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2918eba..d39b178 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,6 @@
{{ end }} - {{ .Content }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html index c862789..51c24d4 100644 --- a/layouts/partials/contact.html +++ b/layouts/partials/contact.html @@ -10,10 +10,13 @@

{{ $contact.title }}

+ {{ if $contact.subtitle }} +

{{ $contact.subtitle }}

+ {{ end }}

{{ $content }}

- \ No newline at end of file + diff --git a/layouts/partials/default.html b/layouts/partials/default.html new file mode 100644 index 0000000..d625c62 --- /dev/null +++ b/layouts/partials/default.html @@ -0,0 +1,19 @@ +{{- $params := .params }} +{{- $odd := .odd }} +{{- $id := "section"}} +{{if $params.id}} + {{- $id = $params.id}} +{{else if .id}} + {{- $id = .id }} +{{end}} +
+
+ {{ with $params.title }} +
+

{{ . }}

+
+
+ {{ end }} + {{ .content }} +
+
diff --git a/layouts/partials/quote.html b/layouts/partials/quote.html new file mode 100644 index 0000000..c247501 --- /dev/null +++ b/layouts/partials/quote.html @@ -0,0 +1,13 @@ +{{- $quote := .quote }} +{{- $odd := .odd }} +{{- $id := "quote"}} +{{if .id}} + {{- $id = .id }} +{{end}} +
+
+ + {{ .content }} + +
+
diff --git a/layouts/partials/service.html b/layouts/partials/service.html index d8449ec..feb8a2e 100644 --- a/layouts/partials/service.html +++ b/layouts/partials/service.html @@ -10,15 +10,17 @@
{{if and ($service.image) (eq $service.image.direction "left")}} -
+
{{ $service.image.alt }}
{{end}} -
-
-

{{ $service.title }}

+
+ {{ with $service.title }} +
+

{{ . }}

-
+
+ {{ end }}

{{ $content }}


{{ if $service.button }} @@ -28,9 +30,9 @@ {{ end }}
{{if and ($service.image) (eq $service.image.direction "right")}} -
+
{{ $service.image.alt }}
{{end}}
-
\ No newline at end of file +