Skip to content

feat: Cross-linking of news with operators and countries #168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2025
Merged
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
1 change: 1 addition & 0 deletions archetypes/operator/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ country:
- 'country1'
- 'country2'
- 'country3'
operator: '{{ .File.ContentBaseName }}'
---

<!-- Entferne das "WIP" Snippet, wenn die Inhalte der Seite vollständig sind -->
Expand Down
1 change: 1 addition & 0 deletions archetypes/operator/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ country:
- 'country1'
- 'country2'
- 'country3'
operator: '{{ .File.ContentBaseName }}'
---

<!-- Remove the WIP snippet if the page is complete -->
Expand Down
5 changes: 0 additions & 5 deletions assets/sass/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ th, td {
padding: 1rem;
}

p {
margin-bottom: 3.2rem;
text-align: justify;
}

.footnotes {

p {
Expand Down
14 changes: 10 additions & 4 deletions assets/sass/sidemenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@
}
}

.o-news__list {
list-style-type: none;
list-style-position: outside;
padding-left: 0;
.o-related {
&__list {
list-style-type: none;
list-style-position: outside;
padding-left: 0;
}

&-date {
padding-left: 2.5rem;
}

p {
margin-bottom: 0;
}
}
24 changes: 19 additions & 5 deletions assets/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,27 @@ img {
}

.o-list__picture {
width: 15rem;
margin-right: 1.2rem;
}

.o-list__picture--operator {
width: auto;
margin-left: 1rem;
}

.o-list__link-wrapper {
.o-related__operator-wrapper > .o-related__list {
display: flex;
gap: 2rem;
flex-wrap: wrap;
margin-bottom: 0;
padding-left: 0;
column-gap: 4rem;
row-gap: 1rem;
list-style-type: none;

li {
list-style-type: none;
li > a {
display: flex;
gap: 1rem;
align-items: center;
}
}

Expand Down Expand Up @@ -147,6 +152,10 @@ img {
display: flex;
flex-direction: column;
gap: 1.5rem;

p {
text-align: justify;
}
}

&__news-image {
Expand Down Expand Up @@ -195,3 +204,8 @@ img {
.pagefind-highlight {
padding: 0px;
}

.a-flag {
height: 2rem;
width: auto;
}
5 changes: 5 additions & 0 deletions content/news/2/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ date: "2025-02-16"
draft: false
author: "Willy"
title: "Grenzüberschreitende FIP-Tickets der SNCB"
country:
- belgium
- netherlands
operator:
- sncb
---

Die belgische Staatsbahn SNCB / NMBS bietet auf ihrer [Website für internationale Fahrkarten ](https://www.b-europe.com/) neben regulären grenzüberschreitenden Tickets nun auch Tickets mit FIP-Rabatt an. Dies erleichtert den Kauf von Fahrkarten, die über die Grenze Belgiens hinausgehen, erheblich. Bisher mussten diese an einem Schalter in Belgien oder bestimmten Nachbarländern wie Deutschland oder den Niederlanden gekauft werden.
Expand Down
5 changes: 5 additions & 0 deletions content/news/2/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ date: "2025-02-16"
draft: false
author: "Willy"
title: "Cross-border FIP Tickets of SNCB"
country:
- belgium
- netherlands
operator:
- sncb
---

The Belgian national railway company SNCB / NMBS now offers tickets with FIP discount on their [international ticket website](https://www.b-europe.com/) in addition to regular cross-border tickets. This significantly simplifies the purchase of tickets that go beyond the borders of Belgium. Previously, these had to be purchased at a counter in Belgium or certain neighboring countries such as Germany or the Netherlands.
Expand Down
5 changes: 5 additions & 0 deletions content/news/4/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
date: "2025-05-16"
draft: false
title: "Eurostar Preiserhöhung"
country:
- belgium
- netherlands
operator:
- eurostar
---

Ab dem 1. Mai 2025 erhöht Eurostar die Preise auf alle FIP Fahrkarten um 5€ bzw. 5£. Die Preiserhöhung betrifft alle FIP Globalpreise bei Eurostar Blue und Eurostar Red (Thalys) in allen Klassen. Die neuen Preise gelten für alle Buchungen, die ab dem 1. Mai 2025 getätigt werden. [^1]
Expand Down
5 changes: 5 additions & 0 deletions content/news/4/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
date: "2025-05-16"
draft: false
title: "Eurostar Price Increase"
country:
- belgium
- netherlands
operator:
- eurostar
---

Starting May 1, 2025, Eurostar will increase prices on all FIP tickets by €5 or £5. The price increase applies to all FIP Global Fares for Eurostar Blue and Eurostar Red (Thalys) in all classes. The new prices apply to all bookings made from May 1, 2025 onwards. [^1]
Expand Down
1 change: 1 addition & 0 deletions content/operator/dsb/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "DSB"
description: "Informationen über die FIP-Bedingungen bei DSB."
country:
- "denmark"
operator: "dsb"
---

Die DSB (Danske Statsbaner) ist die staatliche Eisenbahngesellschaft in Dänemark. Sie betreibt den Großteil des Personenverkehrs auf dem dänischen Schienennetz.
Expand Down
1 change: 1 addition & 0 deletions content/operator/dsb/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: 'DSB'
description: "Information about FIP conditions at DSB."
country:
- "denmark"
operator: "dsb"
---

The DSB (Danske Statsbaner) is the state-owned railway company in Denmark. It operates the majority of passenger traffic on the Danish rail network.
Expand Down
1 change: 1 addition & 0 deletions content/operator/eurostar/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: "Informationen über die FIP-Bedingungen bei Eurostar."
country:
- "belgium"
- "netherlands"
operator: "eurostar"
---

Eurostar ist ein Betreiber von Hochgeschwindigkeitszügen in Westeuropa. Ursprünglich wurden nur die blauen Züge zwischen London und Paris/Brüssel/Amsterdam durch den Eurotunnel als Eurostar bezeichnet. Nach dem Zusammenschluss zwischen Thalys und Eurostar werden auch die roten Thalys-Züge als Eurostar (Red) bezeichnet.
Expand Down
1 change: 1 addition & 0 deletions content/operator/eurostar/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: "Information about FIP conditions for Eurostar."
country:
- "belgium"
- "netherlands"
operator: "eurostar"
---

Eurostar is an operator of high-speed trains in Western Europe. Originally, only the blue trains between London and Paris/Brussels/Amsterdam through the Eurotunnel were referred to as Eurostar. After the merger between Thalys and Eurostar, the red Thalys trains are now also referred to as Eurostar (Red).
Expand Down
1 change: 1 addition & 0 deletions content/operator/ns/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "NS"
description: "Informationen über die FIP-Bedingungen bei NS."
country:
- "netherlands"
operator: "ns"
---

Die Nederlandse Spoorwegen (NS) ist die staatliche Eisenbahngesellschaft der Niederlande und betreibt den Großteil des Personenverkehrs auf dem niederländischen Schienennetz.
Expand Down
1 change: 1 addition & 0 deletions content/operator/ns/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "NS"
description: "Information about FIP conditions at NS."
country:
- "netherlands"
operator: "ns"
---

Nederlandse Spoorwegen (NS) is the state railway company of the Netherlands and operates the majority of passenger traffic on the Dutch rail network.
Expand Down
1 change: 1 addition & 0 deletions content/operator/renfe/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: "Informationen über die FIP-Bedingungen bei Renfe."
country:
- "spain"
- "france"
operator: "renfe"
---

Renfe Operadora ist ein staatliches spanisches Eisenbahnunternehmen. Hierzu gehören komfortable Hochgeschwindkeitszüge, diverse Regionalzüge und S-Bahnen.
Expand Down
1 change: 1 addition & 0 deletions content/operator/renfe/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: "Information about the FIP conditions at Renfe."
country:
- "spain"
- "france"
operator: "renfe"
---

Renfe Operadora is a Spanish state-owned railroad company. It operates comfortable high-speed trains, various regional trains and suburban trains.
Expand Down
1 change: 1 addition & 0 deletions content/operator/sncb/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "SNCB"
description: "Informationen über die FIP-Bedingungen bei SNCB."
country:
- "belgium"
operator: "sncb"
---

Die SNCB (Société nationale des chemins de fer belges) bzw. NMBS (Nationale Maatschappij der Belgische Spoorwegen) ist die belgische Staatsbahn und die wichtigste Bahngesellschaft in Belgien.
Expand Down
1 change: 1 addition & 0 deletions content/operator/sncb/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "SNCB"
description: "Find out about the FIP conditions at SNCB."
country:
- "belgium"
operator: "sncb"
---

The SNCB (Société nationale des chemins de fer belges) or NMBS (Nationale Maatschappij der Belgische Spoorwegen) is the Belgian national railway operator and the most important railway operator in Belgium.
Expand Down
1 change: 1 addition & 0 deletions content/operator/zsr/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "ZSR / ZSSK"
description: "Informationen über die FIP-Bedingungen bei ZSR / ZSSK."
country:
- "slovakia"
operator: "zsr"
---

Die ZSR (Železnice Slovenskej republiky) sowie der dazugehörige Zugbetreiber ZSSK (Železničná spoločnosť Slovensko) ist die slowakische Staatsbahn und die wichtigste Bahngesellschaft in der Slowakei.
Expand Down
1 change: 1 addition & 0 deletions content/operator/zsr/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title: "ZSR / ZSSK"
description: "Find out about the FIP conditions at ZSR / ZSSK."
country:
- "slovakia"
operator: "zsr"
---

The ZSR (Železnice Slovenskej republiky) and its associated train operator ZSSK (Železničná spoločnosť Slovensko) are the Slovak state railways and the most important railway operator in Slovakia.
Expand Down
2 changes: 2 additions & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ related:
indices:
- name: country
weight: 100
- name: operator
weight: 100

markup:
tableOfContents:
Expand Down
11 changes: 9 additions & 2 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@ news-headline: Was gibt's Neues?
news-other: Weitere News
_operator__list_title: Betreiber mit FIP
updateDate: Zuletzt aktualisiert
related: Verwandte Seiten
toc_name: Inhalt
_operator__nearby: Angrenzende Betreiber
toc-backlink: Zurück zu
related:
news: Verwandte News
countries: Verwandte Länder
operators: Verwandte Betreiber
operators-nearby: Angrenzende Betreiber
related-news: Verwandte News
related-countries: Verwandte Länder
related-operators: Verwandte Betreiber
editPage: Seite bearbeiten
reportError: Melde ein Fehler
anchorLink:
copy: Link zu diesem Abschnitt kopieren
copied: Link wurde in die Zwischenablage kopiert
skipToContent: Zum Inhalt springen
wip: An dieser Seite wird noch gearbeitet und Inhalte können unvollständig sein. Wir freuen uns, wenn du zur Verbesserung dieser Seite beträgst. [Mehr Information auf GitHub](https://github.com/fipguide/fipguide.github.io/wiki/Deutsch).
navigate-to-country: Gehe zu Land
9 changes: 6 additions & 3 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ news-headline: What's new?
news-other: Other News
_operator__list_title: Operators supporting FIP
updateDate: Last updated
related: Related Pages
toc_name: Contents
_operator__nearby: Neighboring Operators
toc-backlink: Back to
related:
news: Related News
countries: Related Countries
operators: Related Operators
operators-nearby: Neighboring Operators
editPage: Edit page
reportError: Report an error
anchorLink:
copy: Copy link to this section
copied: Link has been copied to the clipboard
skipToContent: Skip to content
wip: This page is still under construction and content may be incomplete. We would be happy if you contribute to improve this page. [More information on GitHub](https://github.com/fipguide/fipguide.github.io/wiki/English).
navigate-to-country: Navigate to country
3 changes: 1 addition & 2 deletions layouts/country/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ <h2 data-pagefind-meta="title">{{ .Title }}</h2>
<a href="{{ .RelPermalink }}" class="col-12 col-lg-4 col-sm-6 o-list__link">
<div class="o-list__picture">
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
{{ $image := resources.Get (printf "images/flags/%s.webp" $object) }}
{{ partialCached "image.html" $image $image }}
{{ partial "flag" $object }}
</div>
<div>
{{ .Title }}
Expand Down
12 changes: 3 additions & 9 deletions layouts/country/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,9 @@ <h1 data-pagefind-meta="title">{{ .Title }}</h1>
{{- end -}}
</div>
</div>
<div class="o-single__container">
<h3 id="related">{{ T "_operator__list_title"}} in {{ .Title }}</h3>
<ul class="o-list__link-wrapper" aria-labelledby="related">
{{ range $related }}
<li class="col-12 col-lg-3 col-sm-6">
{{ partial "operator-list-item" . }}
</li>
{{ end }}
</ul>
<div class="o-single__container o-related__operator-wrapper">
{{ $title := print (T "_operator__list_title") " in " .Title}}
{{ partial "related" (dict "index" "country" "pageType" "operator" "title" $title "page" . "identifier" "operators") }}
</div>
{{ partial "image" (partial "helper/contentImage" . ) }}
</div>
Expand Down
12 changes: 8 additions & 4 deletions layouts/news/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,25 @@
<aside id="aside" class="o-aside">
{{ partial "image" (partial "helper/contentImage" . ) }}
<div class="o-single__container">
<h3 id="other-news-list-title">{{ T "news-other" }}</h3>
<ul class="o-news__list" aria-labelledby="other-news-list-title">
<h3 id="o-related__title">{{ T "news-other" }}</h3>
<ul class="o-related__list" aria-labelledby="o-related__title">
{{ $current := . }}
{{ range first 5 (where (where site.RegularPages "Section" "news") "Permalink" "ne" $current.Permalink) }}
<li>
<li class="o-related__item">
{{ partial "internal_link"
(dict
"Destination" .RelPermalink
"Text" ((print (partial "icon" "newspaper" ) (.Title)) | .Page.RenderString)
)
}}
<span class="o-news__list-date">{{ .Date | time.Format ":date_long"}}</span>
{{ if eq .Page.Type "news" }}
<span class="o-related__date">{{ .Date | time.Format ":date_long"}}</span>
{{ end }}
</li>
{{ end }}
</ul>
{{ partial "related" (dict "index" "country" "title" (T "related.countries") "page" . "identifier" "countries") }}
{{ partial "related" (dict "index" "operator" "title" (T "related.operators") "page" . "identifier" "operators") }}
<hr>
{{ partial "link"
(dict
Expand Down
26 changes: 15 additions & 11 deletions layouts/operator/list.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
{{ define "main" }}
<div class="container o-list">
<div class="row">
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
{{ .Content }}
<ul class="o-list__link-wrapper row">
<div class="container o-list">
<div class="row">
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
{{ .Content }}
{{ range .Pages }}
<li class="col-12 col-lg-3 col-sm-6">
{{ partial "operator-list-item" . }}
</li>
{{ end }}
</ul>
<a href="{{ .RelPermalink }}" class="col-12 col-lg-4 col-sm-6 o-list__link">
<div class="o-list__picture">
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
{{ partial "logo" $object }}
</div>
<div>
{{ .Title }}
</div>
</a>
{{ end }}
</div>
</div>
</div>
{{ end }}
2 changes: 2 additions & 0 deletions layouts/partials/flag.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{ $image := resources.Get (printf "images/flags/%s.webp" .) }}
<img class="a-flag" src="{{ $image.RelPermalink }}" alt="" />
Loading
Loading