diff --git a/assets/sass/navigation.scss b/assets/sass/navigation.scss index d9c943f3..79e47b29 100644 --- a/assets/sass/navigation.scss +++ b/assets/sass/navigation.scss @@ -64,6 +64,7 @@ height: 4.4rem; padding: .2rem .4rem; align-self: center; + aspect-ratio: 696 / 200; } } diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index b61fb38c..9df8dd52 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -205,18 +205,13 @@ img { h1 { margin-bottom: 0; } - - img { - max-height: 3.6rem; - width: auto; - border-radius: var(--border-radius-m); - } } &__content-header-title { display: flex; align-items: center; gap: 1.5rem; + font-size: 3rem; } &__news-image { @@ -244,8 +239,9 @@ img { } .a-flag { - height: 2rem; + height: 1.3em; width: auto; + aspect-ratio: 1 / 1; } button:not(:disabled) { @@ -262,3 +258,10 @@ hr { details > summary { cursor: pointer; } + +.a-operator-logo { + height: 1.3em; + width: auto; + aspect-ratio: 120 / 50; + border-radius: var(--border-radius-m) +} diff --git a/layouts/country/list.html b/layouts/country/list.html index fae0050b..a0413e07 100644 --- a/layouts/country/list.html +++ b/layouts/country/list.html @@ -6,8 +6,7 @@

{{ .Title }}

{{ range .Pages }}
- {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} - {{ partial "flag" $object }} + {{ partial "flag" (dict "country" .File.ContentBaseName) }}
{{ .Title }} diff --git a/layouts/country/single.html b/layouts/country/single.html index 4890f796..5e67d5a3 100644 --- a/layouts/country/single.html +++ b/layouts/country/single.html @@ -7,9 +7,7 @@
- {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} - {{ $image := resources.Get (printf "images/flags/%s.webp" $object) }} - + {{ partial "flag" (dict "country" .File.ContentBaseName "pagefind" true) }}

{{ .Title }}

{{ partial "updateDate.html" . }} diff --git a/layouts/operator/list.html b/layouts/operator/list.html index 357ac203..6f045fd6 100644 --- a/layouts/operator/list.html +++ b/layouts/operator/list.html @@ -6,8 +6,7 @@

{{ .Title }}

{{ range .Pages }}
- {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} - {{ partial "logo" $object }} + {{ partial "logo" (dict "operator" .File.ContentBaseName) }}
{{ .Title }} diff --git a/layouts/operator/single.html b/layouts/operator/single.html index dc618d69..2778d3c4 100644 --- a/layouts/operator/single.html +++ b/layouts/operator/single.html @@ -5,11 +5,7 @@
- {{ $object := replace .Path (printf "/%s/" .Page.Type) "" }} - {{ $logo := resources.Get (printf "images/logos/%s.svg" $object) }} - {{ if $logo }} - - {{ end }} + {{ partial "logo" (dict "operator" .File.ContentBaseName "pagefind" true)}}

{{ .Title }}

{{ partial "updateDate.html" . }} diff --git a/layouts/partials/flag.html b/layouts/partials/flag.html index 3edd6e28..e153e4a1 100644 --- a/layouts/partials/flag.html +++ b/layouts/partials/flag.html @@ -1,2 +1,2 @@ -{{ $image := resources.Get (printf "images/flags/%s.webp" .) }} - +{{ $image := resources.Get (printf "images/flags/%s.webp" .country) }} + diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index a3cfd0b3..f154d151 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -1,4 +1,4 @@ -{{ $logo := resources.Get (printf "/images/logos/%s.svg" .) }} +{{ $logo := resources.Get (printf "/images/logos/%s.svg" .operator) }} {{ if $logo }} - + {{ end }} diff --git a/layouts/partials/related.html b/layouts/partials/related.html index 1ea42761..dfa7be35 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -4,15 +4,14 @@