Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion assets/sass/contentNavigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@
}
}

main.o-newspage .o-aside {
main.o-newspage .o-aside,
main.o-bookingpage .o-aside {
display: none;
}
}
3 changes: 2 additions & 1 deletion assets/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
1 change: 1 addition & 0 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions i18n/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
>
<div class="o-container">
{{ if not .IsHome }}
Expand Down
30 changes: 22 additions & 8 deletions layouts/booking/single.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
{{ define "main" }}
<article data-pagefind-ignore class="o-single o-card">
<div class="o-single__header">
<h1>{{ .Title }}</h1>
</div>
<article data-pagefind-ignore class="o-single o-single--with-sidemenu">
<aside id="aside" class="o-aside">
<div class="o-single__container">
{{ partial "related" (dict "index" "booking" "title" (T "related.booking") "page" . "identifier" "booking") "pageType" "booking" }}
<hr aria-hidden="true" />
{{ partial "link"
(dict
"Destination" (print .Site.Params.githubDevUrl "blob/main/content" .Path "/index." .Language ".md")
"Text" ((print (partial "icon" "edit_square") (T "editPage")) | .Page.RenderString)
)
}}
</div>
</aside>
<div class="o-single__container">
<div class="o-single__header">
<h1>{{ .Title }}</h1>
</div>

<div class="o-single__content">
{{ .Content }}
</div>
<div class="o-single__content">
{{ .Content }}
</div>

{{ partial "booking-links" . }}
{{ partial "booking-links" . }}
</div>
</article>
{{ end }}
17 changes: 15 additions & 2 deletions layouts/partials/related.html
Original file line number Diff line number Diff line change
@@ -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 }}
<h3 id="o-related__title-{{ .identifier }}">{{ .title }}</h3>
<ul
Expand All @@ -11,7 +24,7 @@ <h3 id="o-related__title-{{ .identifier }}">{{ .title }}</h3>
{{ $text := .LinkTitle }}
{{ if eq .Page.Type "news" }}
{{ $text = print (partial "icon" "newspaper") $text }}
{{ else if eq .Page.Type "operator" }}
{{ else if or (eq .Page.Type "operator") (eq .Page.Type "booking") }}
{{ $text = print (partial "operator-logo" (dict "operator" .File.ContentBaseName)) $text }}
{{ else if eq .Page.Type "country" }}
{{ $text = print (partial "flag" (dict "country" .File.ContentBaseName)) $text }}
Expand Down
Loading