From 0cf02020354e42e1e1f7f16633d0984c5f0666ad Mon Sep 17 00:00:00 2001 From: Hoernschen Date: Mon, 27 Jun 2022 16:09:44 +0200 Subject: [PATCH] Extend Theme --- assets/scss/footer.scss | 12 +- .../css/header.css => assets/scss/header.scss | 33 ++- assets/scss/hero.scss | 24 ++ assets/scss/index.scss | 269 +++++++++++++++--- assets/scss/progressbar.scss | 3 +- assets/scss/slider.scss | 8 +- assets/scss/totop.scss | 3 +- layouts/404.html | 10 +- layouts/_default/baseof.html | 39 +++ layouts/_default/list.html | 26 ++ layouts/_default/single.html | 25 +- layouts/_default/terms.html | 20 ++ layouts/index.html | 48 ++-- layouts/partials/contact.html | 8 +- layouts/partials/footer.html | 5 +- layouts/partials/head.html | 28 -- layouts/partials/header.html | 36 ++- layouts/partials/hero.html | 31 ++ layouts/partials/links.html | 37 +++ layouts/partials/logos.html | 8 +- layouts/partials/posts.html | 35 +++ layouts/partials/service.html | 25 +- layouts/partials/slider.html | 13 +- layouts/partials/team.html | 57 ++-- layouts/partials/video.html | 8 +- layouts/posts/list.html | 29 ++ layouts/posts/single.html | 47 +++ layouts/team/list.html | 38 +++ layouts/team/single.html | 46 +++ 29 files changed, 802 insertions(+), 169 deletions(-) rename static/css/header.css => assets/scss/header.scss (78%) create mode 100644 assets/scss/hero.scss create mode 100644 layouts/_default/terms.html delete mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/hero.html create mode 100644 layouts/partials/links.html create mode 100644 layouts/partials/posts.html create mode 100644 layouts/posts/list.html create mode 100644 layouts/posts/single.html create mode 100644 layouts/team/list.html create mode 100644 layouts/team/single.html diff --git a/assets/scss/footer.scss b/assets/scss/footer.scss index 77d196f..58b0039 100644 --- a/assets/scss/footer.scss +++ b/assets/scss/footer.scss @@ -1,5 +1,3 @@ -$color: {{ .Param "color" }}; - .footer { margin: auto; padding: 1.5rem 0rem; @@ -16,7 +14,11 @@ $color: {{ .Param "color" }}; justify-content: center; flex-wrap: wrap; font-size: 2em; - color: $color; + color: {{ .Site.Params.color.primary }}; +} + +.social-media-footer a { + color: {{ .Site.Params.color.primary }}; } .links { @@ -36,6 +38,10 @@ $color: {{ .Param "color" }}; padding: 0px 24px; } +.link a { + color: inherit; +} + .copyright { margin-top: 2rem; width: 100%; diff --git a/static/css/header.css b/assets/scss/header.scss similarity index 78% rename from static/css/header.css rename to assets/scss/header.scss index 8611559..45b13f5 100644 --- a/static/css/header.css +++ b/assets/scss/header.scss @@ -39,16 +39,21 @@ .menu-icon { display: none; font-size: larger; + color: inherit; } .header-items { margin: auto; - margin-left: 0px; + margin-right: 0px; + padding-right: 24px; display: flex; + justify-content: center; } .header-item { - margin-left: 2.5rem + margin: auto; + margin-left: 2.5rem; + color: inherit; } .dropdown { @@ -73,6 +78,7 @@ .dropdown-content a { padding: 0.5rem 1rem; display: block; + color: inherit; } .dropdown-content a:hover { @@ -83,7 +89,24 @@ display: block; } +.header-contact-button { + background-color: {{ .Site.Params.color.primary }}; + color: white; + border-radius: 4px; + padding: 0.5rem 1.5rem; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 1rem; + margin-left: 2.5rem +} + @media screen and (max-width: 600px) { + .header { + padding: 0.5rem; + padding-right: 0.5rem; + } + .header-container { display: block; } @@ -117,6 +140,7 @@ display: block; text-align: left; margin-top: 0.5rem; + padding-right: 0rem; } .header-items.responsive .header-item { @@ -126,6 +150,11 @@ padding-top: 0.5rem; } + .header-items.responsive .header-contact-button { + display: block; + margin-left: 0rem; + } + .header-items.responsive .icon { position: absolute; right: 0; diff --git a/assets/scss/hero.scss b/assets/scss/hero.scss new file mode 100644 index 0000000..e3f36bb --- /dev/null +++ b/assets/scss/hero.scss @@ -0,0 +1,24 @@ +.hero { + height: 700px; + background-image: url({{ .hero.background }}) !important; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; +} + +.hero-icon-container { + padding: 1rem; +} + +.hero-button { + background-color: {{ .color.primary }}; + color: white; + border: 2px solid {{ .color.primary }}; + border-radius: 4px; + padding: 0.5rem 1.5rem; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 1rem; + margin-top: 1rem; +} \ No newline at end of file diff --git a/assets/scss/index.scss b/assets/scss/index.scss index 9d471bb..d40fae0 100644 --- a/assets/scss/index.scss +++ b/assets/scss/index.scss @@ -1,4 +1,3 @@ -$color: {{ .Param "color" }}; $font: {{ .Param "font" }}; @font-face { @@ -8,6 +7,10 @@ $font: {{ .Param "font" }}; font-style: normal; } +* { + box-sizing: border-box; +} + html { scroll-behavior: smooth; } @@ -39,7 +42,7 @@ p { a { text-decoration: none; - color: inherit; + color: {{ .Site.Params.color.secondary }}; } button { @@ -66,14 +69,6 @@ button { [class*="col-"] { float: left; - padding: 1.5rem 1.5rem; -} - -@media screen and (max-width: 600px) { - [class*="col-"] { - width: 100%; - max-width: 100%; - } } .row { @@ -89,10 +84,15 @@ button { margin: 0; } +.content p img { + width: 100%; + // height: 500px; +} + .divider { height: 3px; border-radius: 50px; - background: $color; + background: {{ .Site.Params.color.primary }}; width: 60px; } @@ -111,7 +111,7 @@ button { .video { position: absolute; margin: 0 auto; - border: 5px dotted $color; + border: 5px dotted {{ .Site.Params.color.primary }}; top: 0; left: 0; width: 100%; @@ -134,25 +134,43 @@ button { } .section-highlight { - background-color: $color; + background-color: {{ .Site.Params.color.primary }}; } .section-content { - /* width: 100%; */ + width: 100%; max-width: 1152px; margin: auto; justify-content: center; } -.article { +.content { padding-top: 9rem; padding-bottom: 2rem; - // padding-right: 1.5rem; - // padding-left: 1.5rem; - max-width: 1152px; + padding-right: 1.5rem; + padding-left: 1.5rem; width: 100%; + max-width: 1152px; margin: 0; align-self: center; + flex-grow: 1; +} + +.notfound { + display: flex; + padding-right: 1.5rem; + padding-left: 1.5rem; + width: 100%; + max-width: 1152px; + margin: 0; + align-self: center; + justify-content: center; + flex-grow: 1; +} + +.notfoundimage { + width: 100%; + max-width: 912px; } /* Team */ @@ -162,19 +180,38 @@ button { text-align: center; } +.team-list { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +.team-list a { + color: inherit; +} + .teammember { display: inline-block; align-items: center; text-align: center; margin: 0 auto; - padding: 1.5rem; + padding: 1rem; } .avatar { width: 15rem; height: 15rem; border-radius: 50%; - border: 2px solid $color; + border: 2px solid {{ .Site.Params.color.primary }}; + object-fit: cover; + margin: 0 auto; +} + +.avatar-small { + width: 10rem; + height: 10rem; + border-radius: 50%; + border: 2px solid {{ .Site.Params.color.primary }}; object-fit: cover; margin: 0 auto; } @@ -184,31 +221,79 @@ button { padding-bottom: 0.1rem; } -.social-media { +.teammember-header { + display: flex; + justify-content: left; + margin-bottom: 2rem; +} + +.teammember-header-avatar { + width: 10rem; + height: 10rem; + border-radius: 50%; + border: 2px solid {{ .Site.Params.color.primary }}; + object-fit: cover; +} + +.teammember-header-title { + font-size: x-large; + padding-bottom: 0.1rem; + margin: auto 1rem; +} + +.teammember-header-social-media { display: flex; - justify-content: center; flex-wrap: wrap; - font-size: 1.5em; - padding-top: 1rem; color: #333; - min-height: 2em; + margin-top: -0.5rem +} + +.teammember-header-social-media a { + color: inherit; +} + +.teammember-posts { + margin-top: 2rem; +} + +.social-media { + font-size: 1.5em; +} + +.author { + width: 100%; + display: inline-block; + align-items: center; + text-align: center; + margin: 0 auto; + padding-top: 2rem; +} + +.author a { + color: inherit; +} + +.author-title { + font-size: x-large; + padding-bottom: 0.1rem; + margin: 0; } /* Funding */ .funding-logo { - width: 14rem; - padding: 1.5rem; + width: 9rem; + padding: 1rem; } .services { + display: inherit; padding: 1.5rem 0rem; } .service-icon-container { - /* min-width: 300px; */ - /* margin: 0 auto; - align-self: center; */ + padding: 1.5rem; + margin: auto; } .service-icon { @@ -218,8 +303,8 @@ button { .service-button { background-color: transparent; - color: $color; - border: 2px solid $color; + color: {{ .Site.Params.color.primary }}; + border: 2px solid {{ .Site.Params.color.primary }}; border-radius: 4px; padding: 0.5rem 1.5rem; text-align: center; @@ -230,7 +315,7 @@ button { } .service-button:hover { - background-color: $color; + background-color: {{ .Site.Params.color.primary }}; color: white; } @@ -247,7 +332,7 @@ button { .contact-button { background-color: white; - color: $color; + color: {{ .Site.Params.color.primary }}; border-radius: 4px; padding: 0.5rem 1.5rem; text-align: center; @@ -260,4 +345,120 @@ button { .contact-text { text-align: center; color: white; +} + +.cardList { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; + width: 100%; +} + +.cardList a { + color: inherit; +} + +.smallCard { + display: flex; + flex-direction: column; + border-radius: 5px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + width: 360px; + height: 100px; + margin: 10px; + justify-content: center; +} + +.mediumCard { + display: flex; + flex-direction: column; + border-radius: 5px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + width: 360px; + height: 200px; + margin: 10px; + justify-content: center; +} + +.card { + display: flex; + flex-direction: column; + border-radius: 5px; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + max-width: 350px; + height: 400px; + margin: 5px; + justify-content: center; +} +.cardImage { + display: flex; + width: 100%; + height: 150px; + border-radius: 5px 5px 0px 0px; + object-fit: cover; + flex-shrink: 0; + flex-grow: 1; +} + +.cardIcon { + margin: auto; + font-size: 8em; + color: {{ .Site.Params.color.secondary }}; +} + +.cardTitle { + text-align: center; + font-size: 18px; + font-weight: 600; + padding-top: 1rem; + padding-bottom: 0.5rem; +} +.cardDescription { + flex-grow: 1; + overflow: hidden; + text-overflow: ellipsis; + padding: 6px; + padding-top: 0px; + word-wrap: break-word; + //white-space: -moz-pre-wrap; + //white-space: pre-wrap; + height: 100%; +} + +.cardDetail { + padding: 6px; + font-size: 12px; + text-align: right; +} + +.post-detail { + margin-top: -6px; + padding-bottom: 6px; + font-size: 14px; +} + +.coverimage { + height: 60vh; + min-width: 100%; + padding-top: 68px; + object-fit: cover; +} + +.more-button { + padding-top: 1rem; + text-align: center; + color: {{ .Site.Params.color.primary }}; +} + +@media screen and (max-width: 600px) { + [class*="col-"] { + display: block; + width: 100%; + max-width: 100%; + } + + .services { + display: inline-block; + } } \ No newline at end of file diff --git a/assets/scss/progressbar.scss b/assets/scss/progressbar.scss index 8386e00..fbaa42a 100644 --- a/assets/scss/progressbar.scss +++ b/assets/scss/progressbar.scss @@ -1,6 +1,5 @@ -$color: {{ .Param "color" }}; .progress { - background: linear-gradient(to right, $color var(--scroll), transparent 0); + background: linear-gradient(to right, {{ .Site.Params.color.primary }} var(--scroll), transparent 0); background-repeat: no-repeat; position: fixed; width: 100%; diff --git a/assets/scss/slider.scss b/assets/scss/slider.scss index f1f61e3..a57fc78 100644 --- a/assets/scss/slider.scss +++ b/assets/scss/slider.scss @@ -1,5 +1,3 @@ -$color: {{ .Param "color" }}; - * { box-sizing: border-box; } @@ -67,7 +65,7 @@ $color: {{ .Param "color" }}; display: inline-flex; width: 1rem; height: 1rem; - background: $color; + background: {{ .color.primary }}; text-decoration: none; align-items: center; justify-content: center; @@ -100,7 +98,7 @@ $color: {{ .Param "color" }}; left: 0; top: 0; z-index: 2; - color: $color; + color: {{ .color.primary }}; font-size: 3.5em; } @@ -119,7 +117,7 @@ $color: {{ .Param "color" }}; top: 0; right: 0; z-index: 2; - color: $color; + color: {{ .color.primary }}; font-size: 3.5em; } diff --git a/assets/scss/totop.scss b/assets/scss/totop.scss index 83e177c..ac56da7 100644 --- a/assets/scss/totop.scss +++ b/assets/scss/totop.scss @@ -1,7 +1,6 @@ -$color: {{ .Param "color" }}; .totop { display: inline-flex; - background-color: $color; + background-color: {{ .Site.Params.color.primary }}; color: #f2f2f2; width: 50px; height: 50px; diff --git a/layouts/404.html b/layouts/404.html index 9ac434d..25db2e6 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,5 @@ - - - - - \ No newline at end of file +{{ define "main" }} +
+ +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index e69de29..4b874c1 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -0,0 +1,39 @@ + + + + + + + + + + {{- $favIcon := .Site.Params.favIcon }} + + + {{ block "title" . }}{{ .Site.Title }}{{ end }} + + {{ $template := resources.Get "scss/index.scss" }} + {{ if $template }} + {{ $index := $template | resources.ExecuteAsTemplate "css/index.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} + + {{ end }} + {{ block "styling" . }} + {{ end }} + {{ $template := resources.Get "scss/totop.scss" }} + {{ if $template }} + {{ $totop := $template | resources.ExecuteAsTemplate "css/totop.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} + + {{ end }} + + + {{ block "header" . }} + {{- partial "header.html" . -}} + {{ end }} + {{ block "main" . }} + + {{ end }} + {{ block "footer" . }} + {{- partial "footer.html" . -}} + {{ end }} + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..62aa147 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,26 @@ +{{ define "main" }} +{{ if .Params.id }} +{{- partial "hero.html" (dict "hero" .Params "color" .Site.Params.color "odd" 0) -}} +{{ end }} +{{.Content}} +
+ {{- range $index, $page := .Pages }} + {{ $odd := mod (add $index 1) 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" }} + {{- partial "hero.html" (dict "id" $page.File.ContentBaseName "hero" .Params "color" $.Site.Params.color "odd" $odd) -}} + {{ else if eq .Params.type "video" }} + {{- partial "video.html" (dict "id" $page.File.ContentBaseName "video" .Params "odd" $odd) -}} + {{ else if eq .Params.type "service" }} + {{- partial "service.html" (dict "id" $page.File.ContentBaseName "service" .Params "content" .Content "odd" $odd) -}} + {{ else if eq .Params.type "contact" }} + {{- partial "contact.html" (dict "id" $page.File.ContentBaseName "contact" .Params "odd" $odd) -}} + {{ else if eq .Params.type "logos" }} + {{- partial "logos.html" (dict "id" $page.File.ContentBaseName "logos" .Params "odd" $odd) -}} + {{ else if eq .Params.type "links" }} + {{- partial "links.html" (dict "id" $page.File.ContentBaseName "links" .Params "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}} + {{ end }} + {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index bfc5d40..ee772a6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,18 +1,15 @@ - - - {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} - {{ block "main" . }} -
+{{ define "main" }} + {{ with .Params.image }} + + {{ end }} +
+ {{ with .Title }}
-

{{ .Title }}

+

{{ . }}

- - {{ .Content }} -
{{ end }} - {{- partial "footer.html" . -}} - - \ No newline at end of file + + {{ .Content }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..90d6075 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,20 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+
+
+
+ +
+ {{ range .Pages }} + +
+
{{.Title}}
+
+
+ {{ end }} +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 3c18038..e90803c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,24 +1,24 @@ - - - {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} - {{- range $index, $section := .Site.Params.sections }} - {{ $odd := mod $index 2 }} - {{if eq .type "slider" }} - {{- partial "slider.html" (dict "slider" $section "odd" $odd) -}} - {{ else if eq .type "video" }} - {{- partial "video.html" (dict "video" $section "odd" $odd) -}} - {{ else if eq .type "service" }} - {{- partial "service.html" (dict "service" $section "odd" $odd) -}} - {{ else if eq .type "team" }} - {{- partial "team.html" (dict "team" $section "odd" $odd) -}} - {{ else if eq .type "contact" }} - {{- partial "contact.html" (dict "contact" $section "odd" $odd) -}} - {{ else if eq .type "logos" }} - {{- partial "logos.html" (dict "logos" $section "odd" $odd) -}} - {{end}} - {{- end }} - {{- partial "footer.html" . -}} - - \ No newline at end of file +{{ define "main" }} + {{- range $index, $section := .Site.Params.sections }} + {{ $odd := mod $index 2 }} + {{ if eq .type "slider" }} + {{- partial "slider.html" (dict "slider" $section "color" $.Site.Params.color "odd" $odd) -}} + {{ else if eq .type "hero" }} + {{- partial "hero.html" (dict "hero" $section "color" $.Site.Params.color "odd" $odd) -}} + {{ else if eq .type "video" }} + {{- partial "video.html" (dict "video" $section "odd" $odd) -}} + {{ else if eq .type "service" }} + {{- partial "service.html" (dict "service" $section "content" $section.description "odd" $odd) -}} + {{ else if eq .type "team" }} + {{ $pages := where $.Site.RegularPages "Section" $section.id }} + {{- partial "team.html" (dict "team" $section "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}} + {{ else if eq .type "contact" }} + {{- partial "contact.html" (dict "contact" $section "odd" $odd) -}} + {{ else if eq .type "logos" }} + {{- partial "logos.html" (dict "logos" $section "odd" $odd) -}} + {{ else if eq .type "posts" }} + {{ $pages := where $.Site.RegularPages "Section" $section.id }} + {{- partial "posts.html" (dict "posts" $section "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}} + {{ end }} + {{- end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html index 862f55a..4779a01 100644 --- a/layouts/partials/contact.html +++ b/layouts/partials/contact.html @@ -1,5 +1,11 @@ {{- $contact := .contact }} -
+{{- $id := "contact"}} +{{if $contact.id}} + {{- $id := $contact.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} +

{{ $contact.title }}

diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 202981d..05bfd21 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -4,7 +4,7 @@ {{ $template := resources.Get "scss/footer.scss" }} {{ if $template }} {{ $footer := $template | resources.ExecuteAsTemplate "css/footer.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} - + {{ end }}
@@ -22,7 +23,7 @@
diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 6c70da4..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - {{ block "title" . }}{{ .Site.Title }}{{ end }} - {{- $favIcon := .Site.Params.favIcon }} - - - {{ $template := resources.Get "scss/index.scss" }} - {{ if $template }} - {{ $index := $template | resources.ExecuteAsTemplate "css/index.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} - - {{ end }} - - {{ $template := resources.Get "scss/totop.scss" }} - {{ if $template }} - {{ $totop := $template | resources.ExecuteAsTemplate "css/totop.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} - - {{ end }} - - {{ $template := resources.Get "scss/slider.scss" }} - {{ if $template }} - {{ $slider := $template | resources.ExecuteAsTemplate "css/slider.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} - - {{ end }} - - \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 6e3de9d..4a0dcab 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,11 +1,15 @@ {{- $header := .Site.Params.header }} {{- $logo := index $header "logo" }} {{- $links := index $header "links" }} - +{{ $template := resources.Get "scss/header.scss" }} +{{ if $template }} +{{ $index := $template | resources.ExecuteAsTemplate "css/header.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} + +{{ end }} {{ $template := resources.Get "scss/progressbar.scss" }} {{ if $template }} {{ $progressbar := $template | resources.ExecuteAsTemplate "css/progressbar.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} - + {{ end }}
diff --git a/layouts/partials/hero.html b/layouts/partials/hero.html new file mode 100644 index 0000000..994a4a4 --- /dev/null +++ b/layouts/partials/hero.html @@ -0,0 +1,31 @@ +{{- $hero := .hero }} +{{- $color := .color }} +{{- $odd := .odd }} +{{- $id := "hero"}} +{{if $hero.id}} + {{- $id := $hero.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} +{{ $template := resources.Get "scss/hero.scss" }} +{{ if $template }} +{{ $index := $template | resources.ExecuteAsTemplate "css/hero.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} + +{{ end }} +
+
+
+
+

{{ $hero.title }}

+
+
+

{{ $hero.subtitle }}

+ {{if $hero.button.visible}} + {{ $hero.button.text }} + {{end}} +
+
+ {{ $hero.image.alt }} +
+
+
\ No newline at end of file diff --git a/layouts/partials/links.html b/layouts/partials/links.html new file mode 100644 index 0000000..2cf4110 --- /dev/null +++ b/layouts/partials/links.html @@ -0,0 +1,37 @@ +{{- $links := .links }} +{{- $odd := .odd }} +{{- $defaultimage := .defaultimage}} +{{- $id := "links"}} +{{if $links.id}} + {{- $id := $links.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} +
+ +
\ No newline at end of file diff --git a/layouts/partials/logos.html b/layouts/partials/logos.html index 542e62e..a7a7d07 100644 --- a/layouts/partials/logos.html +++ b/layouts/partials/logos.html @@ -1,6 +1,12 @@ {{- $logos := .logos }} {{- $odd := .odd }} -
+{{- $id := "logos"}} +{{if $logos.id}} + {{- $id := $logos.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} +

{{ $logos.title }}

diff --git a/layouts/partials/posts.html b/layouts/partials/posts.html new file mode 100644 index 0000000..3c42079 --- /dev/null +++ b/layouts/partials/posts.html @@ -0,0 +1,35 @@ +{{- $posts := .posts }} +{{- $pages := .pages }} +{{- $defaultimage := .defaultimage }} +{{- $odd := .odd }} +{{- $id := "posts"}} +{{if $posts.id}} + {{- $id := $posts.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} + \ No newline at end of file diff --git a/layouts/partials/service.html b/layouts/partials/service.html index ff59328..f39a291 100644 --- a/layouts/partials/service.html +++ b/layouts/partials/service.html @@ -1,24 +1,31 @@ {{- $service := .service }} +{{- $content := .content }} {{- $odd := .odd }} -
+{{- $id := "service"}} +{{if $service.id}} + {{- $id := $service.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} +
- {{if eq $service.image.direction "left"}} -
+ {{if and ($service.image) (eq $service.image.direction "left")}} +
{{end}} -
+

{{ $service.title }}

-

{{ $service.description }}

- {{if $service.button.visible}} +

{{ $content }}

+ {{if and ($service.button) ($service.button.visible)}} {{ $service.button.text }} {{end}} -
- {{if eq $service.image.direction "right"}} -
+
+ {{if and ($service.image) (eq $service.image.direction "right")}} +
{{end}} diff --git a/layouts/partials/slider.html b/layouts/partials/slider.html index b4e75af..783d989 100644 --- a/layouts/partials/slider.html +++ b/layouts/partials/slider.html @@ -1,7 +1,18 @@ {{- $slider := .slider }} +{{- $color := .color }} {{ $length := len $slider.images }} +{{- $id := "slider"}} +{{if $slider.id}} + {{- $id := $slider.id}} +{{else if .id}} + {{- $id := .id }} +{{end}} {{ $template := resources.Get "scss/slider.scss" }} -
+{{ if $template }} +{{ $index := $template | resources.ExecuteAsTemplate "css/slider.scss" . | resources.ToCSS (dict "outputStyle" "compressed") | fingerprint }} + +{{ end }} +
{{ if gt $length 1}}