diff --git a/assets/js/interactiveMap.js b/assets/js/interactiveMap.js index aaf38951..7db7f4b9 100644 --- a/assets/js/interactiveMap.js +++ b/assets/js/interactiveMap.js @@ -59,6 +59,10 @@ window.initializeInteractiveMap = function() { window.location.href = `/${window.currentLanguage}/country/${country.id}/`; }); } + + if (window.unavailableCountries && window.unavailableCountries.includes(country.id)) { + country.classList.add('o-interactive-map__country--unavailable'); + } }); } }; diff --git a/assets/sass/interactiveMap.scss b/assets/sass/interactiveMap.scss index 25c1c0cc..e092f631 100644 --- a/assets/sass/interactiveMap.scss +++ b/assets/sass/interactiveMap.scss @@ -39,6 +39,15 @@ } } + .o-interactive-map__country--unavailable { + path, + circle { + fill: var(--bg-neutral) !important; + transition: all 0.2s ease; + cursor: not-allowed; + } + } + .o-interactive-map--loading { padding: 1rem; } @@ -60,4 +69,37 @@ background-color: var(--link-hovered); } } + + &__legend { + display: flex; + column-gap: 2rem; + row-gap: 1rem; + flex-wrap: wrap; + margin-top: 1.5rem; + } + + &__legend-item { + display: flex; + align-items: center; + gap: 1rem; + } + + &__legend-color { + width: 1.5rem; + height: 1.5rem; + border-radius: var(--border-radius-s); + border: var(--border); + + &--available { + background-color: var(--link-default); + } + + &--unavailable { + background-color: var(--bg-neutral); + } + + &--pending { + background-color: #c0c1c5; + } + } } diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index df272ff6..ff6b3083 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -125,11 +125,24 @@ img { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; + list-style-position: inside; + padding-left: 0; + + > li { + margin-left: 0.5rem; + } +} + +.o-list__list-item { + &--country { + list-style-type: none; + } } .o-list__link { display: flex; align-items: center; + width: fit-content; } .o-list__countries{ @@ -143,6 +156,12 @@ img { } } +.o-list__countries-overview { + display: flex; + gap: 2rem; + flex-direction: column; +} + @mixin add-columns($columns) { &--columns-#{$columns} { columns: $columns; diff --git a/content/country/_index.de.md b/content/country/_index.de.md index 27276786..1848a251 100644 --- a/content/country/_index.de.md +++ b/content/country/_index.de.md @@ -1,6 +1,20 @@ --- title: "Übersicht der Länder" description: "Übersicht über die Länder, in denen FIP-Vergünstigungen genutzt werden können." +params: + countriesWithoutFip: + - Andorra + - Belarus + - Estland + - Island + - Malta + - Moldau + - Russland + - San Marino + - Schweden + - Türkei + - Vatikanstadt + - Zypern --- Finde auf den nachfolgenden Seiten die FIP-Regelungen für Dein Reiseziel. diff --git a/content/country/_index.en.md b/content/country/_index.en.md index 670d0215..1de210a1 100644 --- a/content/country/_index.en.md +++ b/content/country/_index.en.md @@ -1,6 +1,20 @@ --- title: "Overview of countries" description: "Overview of the countries where FIP benefits are available." +params: + countriesWithoutFip: + - Andorra + - Belarus + - Cyprus + - Estonia + - Iceland + - Malta + - Moldova + - Russia + - San Marino + - Sweden + - Turkey + - Vatican City --- Find the FIP regulations for your destination on the following pages. diff --git a/content/country/_index.fr.md b/content/country/_index.fr.md index d502cd59..0a85abc0 100644 --- a/content/country/_index.fr.md +++ b/content/country/_index.fr.md @@ -1,6 +1,20 @@ --- title: "Liste des pays" description: "Liste des pays où les facilités FIP sont acceptées." +params: + countriesWithoutFip: + - Andorre + - Belarus + - Chypre + - Estonie + - Islande + - Malte + - Moldavie + - Russie + - Saint-Marin + - Suède + - Turquie + - Vatican --- Retrouvez les règles FIP pour votre destination sur les pages suivantes. diff --git a/i18n/de.yaml b/i18n/de.yaml index 62409a2c..5882c48e 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -15,8 +15,9 @@ booking: visit-additional-information-website: Weitere Informationen visit-booking-website: Zur Buchungsseite countries: - overview: Alle Länder + overview: Länder mit FIP Akzeptanz selection: Länderauswahl + without-fip: Länder ohne FIP Akzeptanz country: many: Länder one: Land @@ -35,6 +36,10 @@ information-disclaimer-short: >- Diese Informationen sind inoffiziell und ohne Gewähr. Es besteht keine rechtliche Verbindung zu FIP oder Bahngesellschaften. interactiveMap: + legend: + available: FIP Guide verfügbar + pending: Inhalt noch nicht verfügbar + unavailable: Keine FIP-Akzeptanz loading: Lade interaktive Karte... resetZoom: Zoom zurücksetzen title: Interaktive Länderkarte diff --git a/i18n/en.yaml b/i18n/en.yaml index 513a2609..21b76244 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -14,8 +14,9 @@ booking: visit-additional-information-website: Additional Information visit-booking-website: To Booking Website countries: - overview: All Countries + overview: Countries with FIP acceptance selection: choose country + without-fip: Countries without FIP acceptance country: many: countries one: country @@ -34,6 +35,10 @@ information-disclaimer-short: >- The information provided is unofficial and without guarantee. There is no legal connection to FIP or railway companies. interactiveMap: + legend: + available: FIP Guide available + pending: Content not available yet + unavailable: No FIP acceptance loading: Loading interactive map... resetZoom: Reset Zoom title: Interactive Country Map diff --git a/i18n/fr.yaml b/i18n/fr.yaml index c330e90f..8aca3c51 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -12,6 +12,10 @@ booking: reservation-costs: Frais de réservation visit-additional-information-website: Informations complémentaires visit-booking-website: Aller sur le site de réservation +countries: + overview: Pays acceptation FIP + selection: choisir un pays + without-fip: Pays sans acceptation FIP country: many: pays one: pays @@ -30,6 +34,10 @@ information-disclaimer-short: >- Les informations fournies sont non officielles et sans garantie. Il n'existe aucun lien juridique avec le FIP ou les compagnies ferroviaires. interactiveMap: + legend: + available: FIP Guide disponible + pending: Contenu non disponible + unavailable: Pas d'acceptation FIP loading: Chargement de la carte interactive... resetZoom: Réinitialiser le zoom title: Carte interactive des pays diff --git a/layouts/country/list.html b/layouts/country/list.html index d88ac4d6..0d32a2dd 100644 --- a/layouts/country/list.html +++ b/layouts/country/list.html @@ -3,24 +3,36 @@

{{ .Title }}

{{ .Content }}
-
-

{{ T "countries.overview" }}

-
- {{ range .Pages }} - -
- {{ partial "flag" (dict "country" .File.ContentBaseName) }} -
-
- {{ .Title }} -
-
- {{ end }} +
+
+

{{ T "countries.overview" }}

+ +
+
+

{{ T "countries.without-fip" }}

+
    + {{ range .Params.countriesWithoutFip }} +
  • {{ . }}
  • + {{ end }} +
-

{{ T "interactiveMap.title" }}

-
+

{{ T "interactiveMap.title" }}

+

{{ T "interactiveMap.loading" }}

@@ -36,11 +48,18 @@

{{ T "interactiveMap.title" }}

+
+ {{ range (slice "available" "unavailable" "pending") }} +
+
+ {{ T (printf "interactiveMap.legend.%s" .) }} +
+ {{ end }} +
-