diff --git a/assets/sass/navigation.scss b/assets/sass/navigation.scss index f191a26d..909d2c77 100644 --- a/assets/sass/navigation.scss +++ b/assets/sass/navigation.scss @@ -14,6 +14,7 @@ .o-header__wrapper { display: flex; justify-content: space-between; + padding: 0; @media (min-width: #{$breakpoint-md}) { justify-content: unset; @@ -56,9 +57,8 @@ .o-header__logo { display: flex; - margin: .6rem; + margin: .6rem 0; position: relative; - left: -1.6rem; text-decoration: none; border-radius: var(--border-radius-m); diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index c77af8c6..f2a88cf5 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -9,7 +9,7 @@ body { overflow-x: hidden; } -a:not(.m-teaser) { +a { color: var(--link-default); transition: all 0.3s ease; text-underline-offset: .2rem; @@ -196,7 +196,7 @@ img { } .o-startpage .row { - margin-bottom: 3.2rem; + margin-bottom: 2.4rem; } .o-startpage__intro { @@ -212,4 +212,16 @@ img { > div { align-content: center; } + + @media (max-width: #{$breakpoint-md}) { + h2 { + font-size: 4.8rem; + } + } +} + +.o-startpage__image { + @media (max-width: #{$breakpoint-md}) { + display: none; + } } diff --git a/assets/sass/teaser.scss b/assets/sass/teaser.scss index 55a0d65e..d4589b35 100644 --- a/assets/sass/teaser.scss +++ b/assets/sass/teaser.scss @@ -1,10 +1,10 @@ .m-teaser { display: flex; + text-decoration: none; } .m-teaser__wrapper { text-decoration: none; - color: var(--link-special); background-color: var(--color-onDark); box-shadow: var(--box-shadow); border-radius: var(--border-radius-l); @@ -16,28 +16,38 @@ margin-bottom: 2rem; } } + + &:hover, + &:focus { + background: rgba($link-hovered, 0.15); + + .m-teaser__headline { + text-decoration: underline; + } + } + + .material-symbols-rounded { + font-size: 2.4rem; + margin-top: 1rem; + } } .m-teaser--listview .m-teaser__wrapper { margin-bottom: 2.4rem; - flex-direction: row; + display: grid; + grid-template-columns: 1fr 2fr; @media (max-width: #{$breakpoint-md}) { + display: flex; flex-direction: column; } - .m-teaser__image { - @media (min-width: #{$breakpoint-md}) { - max-width: 33%; - } - - img { - border-radius: var(--border-radius-l) 0 0 var(--border-radius-l); + .m-teaser__image img { + border-radius: var(--border-radius-l) 0 0 var(--border-radius-l); - @media (max-width: #{$breakpoint-md}) { - border-radius: var(--border-radius-l) var(--border-radius-l) 0 0; - width: 100%; - } + @media (max-width: #{$breakpoint-md}) { + border-radius: var(--border-radius-l) var(--border-radius-l) 0 0; + width: 100%; } } } @@ -46,33 +56,34 @@ .m-teaser__wrapper { width: 100%; height: 12rem; - padding: .8rem; - flex-direction: row; + padding: 1.4rem; justify-content: space-between; - - span { - align-self: flex-end; - font-size: 2.4rem; - margin-left: .8rem; - } } a { h3 { - text-decoration: underline; - align-self: center; + overflow-wrap: normal; + word-break: normal; + white-space: normal; + hyphens: manual; margin-bottom: 0; } + + transition: background 0.2s, color 0.2s; + } } .m-teaser__image img { aspect-ratio: 16/9; border-radius: var(--border-radius-l) var(--border-radius-l) 0 0; + object-fit: cover; + height: 100%; } .m-teaser__dateline { font-size: 1.4rem; + color: var(--link-special); } .m-teaser__headline { @@ -80,5 +91,17 @@ } .m-teaser__content { - padding: .8rem; + padding: 1.4rem; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.m-teaser__text { + line-clamp: 3; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + color: var(--link-special); } diff --git a/content/operator/_index.de.md b/content/operator/_index.de.md index bac771b8..1f7a3181 100644 --- a/content/operator/_index.de.md +++ b/content/operator/_index.de.md @@ -1,5 +1,5 @@ --- -title: "Übersicht der Betreiber mit FIP" +title: "Übersicht der Betreiber" description: "Übersicht über die Betreiber, die FIP-Vergünstigungen anbieten." --- diff --git a/content/operator/_index.en.md b/content/operator/_index.en.md index 2d8dec2a..e632c2b0 100644 --- a/content/operator/_index.en.md +++ b/content/operator/_index.en.md @@ -1,5 +1,5 @@ --- -title: "Overview of operators supporting FIP" +title: "Overview of operators" description: "Overview of the operators providing FIP benefits." --- diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index ac6338c6..968ca557 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,7 +4,7 @@ dir="{{ or site.Language.LanguageDirection `ltr` }}" > - {{ partial "head.html" . }} + {{ partial "head" . }} diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 7b3b25d0..b3855da8 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -5,9 +5,9 @@

{{ T "home-page-text" }}

{{ .Content }}
-
+
{{ $image := resources.Get "images/startpage.webp" }} - {{ partial "image.html" (dict "image" $image "eager" true) }} + {{ partial "image" (dict "image" $image "eager" true) }}
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index bf0ae9c1..092bdbb3 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -11,7 +11,7 @@ {{ .Title }} {{ .Permalink }} - {{ $cleanedHTML := .Summary | replaceRE `]*class="material-symbols-rounded"[^>]*>.*?` "" | transform.XMLEscape | safeHTML}} + {{ $cleanedHTML := partial "strip-material-icons" .Summary | transform.XMLEscape | safeHTML}} {{ $cleanedHTML }} {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} diff --git a/layouts/news/list.html b/layouts/news/list.html index 1c926e59..7c3fe0e0 100644 --- a/layouts/news/list.html +++ b/layouts/news/list.html @@ -5,7 +5,7 @@

{{ .Title }}

{{ .Content }}
{{ range .Pages }} - {{ partial "teaser.html" (dict "listview" "true" "page" .) }} + {{ partial "teaser" (dict "listview" "true" "page" .) }} {{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 19fbaf90..3c9f8d63 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,9 +1,9 @@ -{{ partial "headMeta.html" . }} +{{ partial "headMeta" . }} {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} -{{ partialCached "head/js.html" . }} +{{ partialCached "head/js" . }} {{ $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed") }} {{ with resources.Get "sass/main.scss" }} {{ $style := (resources.ExecuteAsTemplate "sass/main_templated.scss" $ .) | toCSS $options | minify }} @@ -43,4 +43,4 @@ {{- end -}} -{{ partial "structuredData.html" . }} +{{ partial "structuredData" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 8995308a..fef7af1d 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1 +1 @@ -{{ partial "menu.html" (dict "menuID" "main" "page" .) }} +{{ partial "menu" (dict "menuID" "main" "page" .) }} diff --git a/layouts/partials/shortcut-tile.html b/layouts/partials/shortcut-tile.html index edeb6cb0..006e6464 100644 --- a/layouts/partials/shortcut-tile.html +++ b/layouts/partials/shortcut-tile.html @@ -1,6 +1,6 @@
-

{{ .Title }}

+

{{ .Title }}

{{- partial "icon" "arrow_forward" -}}
diff --git a/layouts/partials/sidemenu.html b/layouts/partials/sidemenu.html index 2f5d9b49..1ba76371 100644 --- a/layouts/partials/sidemenu.html +++ b/layouts/partials/sidemenu.html @@ -20,7 +20,7 @@ {{ end }}

{{ .Title }}

- {{ partial "toc.html" (dict "context" . "startLevel" 2 "endLevel" 3 ) }} + {{ partial "toc" (dict "context" . "startLevel" 2 "endLevel" 3 ) }} {{ if eq .Page.Type "country" }} {{ partial "related" (dict "index" "country" "pageType" "operator" "title" (T "_operator__list_title") "page" . "identifier" "operators") }} diff --git a/layouts/partials/strip-material-icons.html b/layouts/partials/strip-material-icons.html new file mode 100644 index 00000000..44593729 --- /dev/null +++ b/layouts/partials/strip-material-icons.html @@ -0,0 +1 @@ +{{ return replaceRE `]*class="[^"]*\bmaterial-symbols-rounded\b[^"]*"[^>]*>.*?` "" . }} diff --git a/layouts/partials/teaser.html b/layouts/partials/teaser.html index 46b7e864..14746c6e 100644 --- a/layouts/partials/teaser.html +++ b/layouts/partials/teaser.html @@ -4,7 +4,7 @@ {{ $dateMachine := $page.Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateHuman := $page.Date | time.Format ":date_long" }}
-
+ {{ $image := (partial "helper/contentImage" $page ) }} {{ if $image }}
@@ -13,17 +13,16 @@
- - {{ if $listview }} -

{{ $page.Title }}

- {{ else }} -

{{ $page.Title }}

- {{ end }} -
+ {{ if $listview }} +

{{ $page.Title }}

+ {{ else }} +

{{ $page.Title }}

+ {{ end }}
- {{ $page.Summary | plainify | truncate 100 }} + {{ partial "strip-material-icons" $page.Summary | plainify | truncate 500 }}
+ {{- partial "icon" "arrow_forward" -}}
-
+
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 49dc7388..5b0972ad 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -64,7 +64,7 @@ @returns {template.HTML} -@example {{ partial "toc.html" (dict "context" . "startLevel" 2 "endLevel" 3 ) }} +@example {{ partial "toc" (dict "context" . "startLevel" 2 "endLevel" 3 ) }} */}} {{- /* Initialize. */}}