diff --git a/assets/sass/contentNavigation.scss b/assets/sass/contentNavigation.scss index 306613c2..74a8697d 100644 --- a/assets/sass/contentNavigation.scss +++ b/assets/sass/contentNavigation.scss @@ -196,7 +196,8 @@ } } - main.o-newspage .o-aside { + main.o-newspage .o-aside, + main.o-bookingpage .o-aside { display: none; } } diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index 67c45597..e6251617 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -19,7 +19,8 @@ body { } } @media (max-width: #{$breakpoint-lg}) { - body:has(article.o-single--with-sidemenu):not(:has(.o-newspage)) { + body:has(article.o-single--with-sidemenu):not(:has(.o-newspage)), + body:has(article.o-single--with-sidemenu):not(:has(.o-bookingpage)) { margin: 0 0 calc(7rem + env(safe-area-inset-bottom)) 0; } } diff --git a/i18n/de.yaml b/i18n/de.yaml index d17e52bd..70c021fd 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -81,6 +81,7 @@ news-headline: Was gibt's Neues? news-other: Weitere News operators_without_fip: Betreiber ohne FIP related: + booking: Bei diesen Betreibern nutzbar countries: Verwandte Länder news: Verwandte News operators: Verwandte Betreiber diff --git a/i18n/en.yaml b/i18n/en.yaml index 6730f81d..973de42a 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -80,6 +80,7 @@ news-headline: What's new? news-other: Other News operators_without_fip: Operators without FIP related: + booking: Usable with these operators countries: Related Countries news: Related News operators: Related Operators diff --git a/i18n/fr.yaml b/i18n/fr.yaml index bb4bd95d..a623628e 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -80,6 +80,7 @@ news-headline: Quoi de neuf ? news-other: Autres actualités operators_without_fip: Opérateurs sans FIP related: + booking: Utilisable avec ces opérateurs countries: Pays associés news: Actualités associées operators: Opérateurs associés diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index afcba535..dd31c0f6 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,7 +13,7 @@ id="content" class="{{ if .IsHome }}o-startpage{{ end }}{{ if eq .Page.Type "news" }} o-newspage - {{ end }}" + {{ end }}{{ if eq .Page.Type "booking" }}o-bookingpage{{ end }}" >
{{ if not .IsHome }} diff --git a/layouts/booking/single.html b/layouts/booking/single.html index ab2c58fa..f3436910 100644 --- a/layouts/booking/single.html +++ b/layouts/booking/single.html @@ -1,13 +1,27 @@ {{ define "main" }} -
-
-

{{ .Title }}

-
+
+ +
+
+

{{ .Title }}

+
-
- {{ .Content }} -
+
+ {{ .Content }} +
- {{ partial "booking-links" . }} + {{ partial "booking-links" . }} +
{{ end }} diff --git a/layouts/partials/related.html b/layouts/partials/related.html index b41533a1..312d8bc0 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -1,5 +1,18 @@ {{ $pageType := .pageType | default .index }} -{{ $related := where (.page.Site.RegularPages.RelatedIndices .page .index) ".Page.Type" $pageType }} +{{ $related := "" }} + +{{ if eq $pageType "booking" }} + {{ $related = slice }} + {{ $searchPattern := printf "booking id=\"%s\"" .page.File.ContentBaseName }} + {{ range where .page.Site.RegularPages "Type" "operator" }} + {{ if in .RawContent $searchPattern }} + {{ $related = $related | append . }} + {{ end }} + {{ end }} +{{ else }} + {{ $related = where (.page.Site.RegularPages.RelatedIndices .page .index) ".Page.Type" $pageType }} +{{ end }} + {{ if gt (len $related) 0 }}