Skip to content

Commit 623b4a8

Browse files
committed
feat: Cross-linking of news with operators and countries
1 parent 93c9027 commit 623b4a8

32 files changed

+140
-87
lines changed

archetypes/operator/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ country:
66
- 'country1'
77
- 'country2'
88
- 'country3'
9+
operator: '{{ .File.ContentBaseName }}'
910
---
1011

1112
<!-- Entferne das "WIP" Snippet, wenn die Inhalte der Seite vollständig sind -->

archetypes/operator/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ country:
66
- 'country1'
77
- 'country2'
88
- 'country3'
9+
operator: '{{ .File.ContentBaseName }}'
910
---
1011

1112
<!-- Remove the WIP snippet if the page is complete -->

assets/sass/content.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ th, td {
3131
padding: 1rem;
3232
}
3333

34-
p {
35-
margin-bottom: 3.2rem;
36-
text-align: justify;
37-
}
38-
3934
.footnotes {
4035

4136
p {

assets/sass/sidemenu.scss

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,18 @@
7878
}
7979
}
8080

81-
.o-news__list {
82-
list-style-type: none;
83-
list-style-position: outside;
84-
padding-left: 0;
81+
.o-related {
82+
&__list {
83+
list-style-type: none;
84+
list-style-position: outside;
85+
padding-left: 0;
86+
}
8587

8688
&-date {
8789
padding-left: 2.5rem;
8890
}
91+
92+
p {
93+
margin-bottom: 0;
94+
}
8995
}

assets/sass/styles.scss

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,27 @@ img {
102102
}
103103

104104
.o-list__picture {
105-
width: 15rem;
106105
margin-right: 1.2rem;
107106
}
108107

109108
.o-list__picture--operator {
110109
width: auto;
110+
margin-left: 1rem;
111111
}
112112

113-
.o-list__link-wrapper {
113+
.o-related__operator-wrapper > .o-related__list {
114114
display: flex;
115-
gap: 2rem;
115+
flex-wrap: wrap;
116116
margin-bottom: 0;
117117
padding-left: 0;
118+
column-gap: 4rem;
119+
row-gap: 1rem;
120+
list-style-type: none;
118121

119-
li {
120-
list-style-type: none;
122+
li > a {
123+
display: flex;
124+
gap: 1rem;
125+
align-items: center;
121126
}
122127
}
123128

@@ -147,6 +152,10 @@ img {
147152
display: flex;
148153
flex-direction: column;
149154
gap: 1.5rem;
155+
156+
p {
157+
text-align: justify;
158+
}
150159
}
151160

152161
&__news-image {
@@ -195,3 +204,8 @@ img {
195204
.pagefind-highlight {
196205
padding: 0px;
197206
}
207+
208+
.o-flag {
209+
height: 2rem;
210+
width: auto;
211+
}

content/news/2/index.de.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ date: "2025-02-16"
33
draft: false
44
author: "Willy"
55
title: "Grenzüberschreitende FIP-Tickets der SNCB"
6+
country:
7+
- belgium
8+
- netherlands
9+
operator:
10+
- sncb
611
---
712

813
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.

content/news/2/index.en.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ date: "2025-02-16"
33
draft: false
44
author: "Willy"
55
title: "Cross-border FIP Tickets of SNCB"
6+
country:
7+
- belgium
8+
- netherlands
9+
operator:
10+
- sncb
611
---
712

813
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.

content/news/4/index.de.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
date: "2025-05-16"
33
draft: false
44
title: "Eurostar Preiserhöhung"
5+
country:
6+
- belgium
7+
- netherlands
8+
operator:
9+
- eurostar
510
---
611

712
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]

content/news/4/index.en.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
date: "2025-05-16"
33
draft: false
44
title: "Eurostar Price Increase"
5+
country:
6+
- belgium
7+
- netherlands
8+
operator:
9+
- eurostar
510
---
611

712
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]

content/operator/dsb/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "DSB"
44
description: "Informationen über die FIP-Bedingungen bei DSB."
55
country:
66
- "denmark"
7+
operator: "dsb"
78
---
89

910
Die DSB (Danske Statsbaner) ist die staatliche Eisenbahngesellschaft in Dänemark. Sie betreibt den Großteil des Personenverkehrs auf dem dänischen Schienennetz.

content/operator/dsb/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: 'DSB'
44
description: "Information about FIP conditions at DSB."
55
country:
66
- "denmark"
7+
operator: "dsb"
78
---
89

910
The DSB (Danske Statsbaner) is the state-owned railway company in Denmark. It operates the majority of passenger traffic on the Danish rail network.

content/operator/eurostar/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: "Informationen über die FIP-Bedingungen bei Eurostar."
55
country:
66
- "belgium"
77
- "netherlands"
8+
operator: "eurostar"
89
---
910

1011
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.

content/operator/eurostar/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: "Information about FIP conditions for Eurostar."
55
country:
66
- "belgium"
77
- "netherlands"
8+
operator: "eurostar"
89
---
910

1011
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).

content/operator/ns/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "NS"
44
description: "Informationen über die FIP-Bedingungen bei NS."
55
country:
66
- "netherlands"
7+
operator: "ns"
78
---
89

910
Die Nederlandse Spoorwegen (NS) ist die staatliche Eisenbahngesellschaft der Niederlande und betreibt den Großteil des Personenverkehrs auf dem niederländischen Schienennetz.

content/operator/ns/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "NS"
44
description: "Information about FIP conditions at NS."
55
country:
66
- "netherlands"
7+
operator: "ns"
78
---
89

910
Nederlandse Spoorwegen (NS) is the state railway company of the Netherlands and operates the majority of passenger traffic on the Dutch rail network.

content/operator/renfe/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: "Informationen über die FIP-Bedingungen bei Renfe."
55
country:
66
- "spain"
77
- "france"
8+
operator: "renfe"
89
---
910

1011
Renfe Operadora ist ein staatliches spanisches Eisenbahnunternehmen. Hierzu gehören komfortable Hochgeschwindkeitszüge, diverse Regionalzüge und S-Bahnen.

content/operator/renfe/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ description: "Information about the FIP conditions at Renfe."
55
country:
66
- "spain"
77
- "france"
8+
operator: "renfe"
89
---
910

1011
Renfe Operadora is a Spanish state-owned railroad company. It operates comfortable high-speed trains, various regional trains and suburban trains.

content/operator/sncb/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "SNCB"
44
description: "Informationen über die FIP-Bedingungen bei SNCB."
55
country:
66
- "belgium"
7+
operator: "sncb"
78
---
89

910
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.

content/operator/sncb/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "SNCB"
44
description: "Find out about the FIP conditions at SNCB."
55
country:
66
- "belgium"
7+
operator: "sncb"
78
---
89

910
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.

content/operator/zsr/index.de.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "ZSR / ZSSK"
44
description: "Informationen über die FIP-Bedingungen bei ZSR / ZSSK."
55
country:
66
- "slovakia"
7+
operator: "zsr"
78
---
89

910
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.

content/operator/zsr/index.en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "ZSR / ZSSK"
44
description: "Find out about the FIP conditions at ZSR / ZSSK."
55
country:
66
- "slovakia"
7+
operator: "zsr"
78
---
89

910
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.

hugo.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ related:
3232
indices:
3333
- name: country
3434
weight: 100
35+
- name: operator
36+
weight: 100
3537

3638
markup:
3739
tableOfContents:

i18n/de.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ updateDate: Zuletzt aktualisiert
2222
related: Verwandte Seiten
2323
toc_name: Inhalt
2424
_operator__nearby: Angrenzende Betreiber
25-
toc-backlink: Zurück zu
25+
related-news: Verwandte News
26+
related-countries: Verwandte Länder
27+
related-operators: Verwandte Betreiber
2628
editPage: Seite bearbeiten
2729
reportError: Melde ein Fehler
2830
anchorLink:
2931
copy: Link zu diesem Abschnitt kopieren
3032
copied: Link wurde in die Zwischenablage kopiert
3133
skipToContent: Zum Inhalt springen
3234
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).
35+
navigate-to-country: Gehe zu Land

i18n/en.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ updateDate: Last updated
2222
related: Related Pages
2323
toc_name: Contents
2424
_operator__nearby: Neighboring Operators
25-
toc-backlink: Back to
25+
related-news: Related News
26+
related-countries: Related Countries
27+
related-operators: Related Operators
2628
editPage: Edit page
2729
reportError: Report an error
2830
anchorLink:
2931
copy: Copy link to this section
3032
copied: Link has been copied to the clipboard
3133
skipToContent: Skip to content
3234
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).
35+
navigate-to-country: Navigate to country

layouts/country/list.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ <h2 data-pagefind-meta="title">{{ .Title }}</h2>
77
<a href="{{ .RelPermalink }}" class="col-12 col-lg-4 col-sm-6 o-list__link">
88
<div class="o-list__picture">
99
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
10-
{{ $image := resources.Get (printf "images/flags/%s.webp" $object) }}
11-
{{ partialCached "image.html" $image $image }}
10+
{{ partial "flag" $object }}
1211
</div>
1312
<div>
1413
{{ .Title }}

layouts/country/single.html

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ <h1 data-pagefind-meta="title">{{ .Title }}</h1>
2222
{{- end -}}
2323
</div>
2424
</div>
25-
<div class="o-single__container">
26-
<h3 id="related">{{ T "_operator__list_title"}} in {{ .Title }}</h3>
27-
<ul class="o-list__link-wrapper" aria-labelledby="related">
28-
{{ range $related }}
29-
<li class="col-12 col-lg-3 col-sm-6">
30-
{{ partial "operator-list-item" . }}
31-
</li>
32-
{{ end }}
33-
</ul>
25+
<div class="o-single__container o-related__operator-wrapper">
26+
{{ $title := print (T "_operator__list_title") " in " .Title}}
27+
{{ partial "related" (dict "index" "country" "pageType" "operator" "title" $title "page" . "identifier" "operators") }}
3428
</div>
3529
{{ partial "image" (partial "helper/contentImage" . ) }}
3630
</div>

layouts/news/single.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,25 @@
44
<aside id="aside" class="o-aside">
55
{{ partial "image" (partial "helper/contentImage" . ) }}
66
<div class="o-single__container">
7-
<h3 id="other-news-list-title">{{ T "news-other" }}</h3>
8-
<ul class="o-news__list" aria-labelledby="other-news-list-title">
7+
<h3 id="o-related__title">{{ T "news-other" }}</h3>
8+
<ul class="o-related__list" aria-labelledby="o-related__title">
99
{{ $current := . }}
1010
{{ range first 5 (where (where site.RegularPages "Section" "news") "Permalink" "ne" $current.Permalink) }}
11-
<li>
11+
<li class="o-related__item">
1212
{{ partial "internal_link"
1313
(dict
1414
"Destination" .RelPermalink
1515
"Text" ((print (partial "icon" "newspaper" ) (.Title)) | .Page.RenderString)
1616
)
1717
}}
18-
<span class="o-news__list-date">{{ .Date | time.Format ":date_long"}}</span>
18+
{{ if eq .Page.Type "news" }}
19+
<span class="o-related__date">{{ .Date | time.Format ":date_long"}}</span>
20+
{{ end }}
1921
</li>
2022
{{ end }}
2123
</ul>
24+
{{ partial "related" (dict "index" "country" "title" (T "related-countries") "page" . "identifier" "countries") }}
25+
{{ partial "related" (dict "index" "operator" "title" (T "related-operators") "page" . "identifier" "operators") }}
2226
<hr>
2327
{{ partial "link"
2428
(dict

layouts/operator/list.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{{ define "main" }}
2-
<div class="container o-list">
3-
<div class="row">
4-
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
5-
{{ .Content }}
6-
<ul class="o-list__link-wrapper row">
2+
<div class="container o-list">
3+
<div class="row">
4+
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
5+
{{ .Content }}
76
{{ range .Pages }}
8-
<li class="col-12 col-lg-3 col-sm-6">
9-
{{ partial "operator-list-item" . }}
10-
</li>
11-
{{ end }}
12-
</ul>
7+
<a href="{{ .RelPermalink }}" class="col-12 col-lg-4 col-sm-6 o-list__link">
8+
<div class="o-list__picture">
9+
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
10+
{{ partial "logo" $object }}
11+
</div>
12+
<div>
13+
{{ .Title }}
14+
</div>
15+
</a>
16+
{{ end }}
17+
</div>
1318
</div>
14-
</div>
1519
{{ end }}

layouts/partials/flag.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{ $image := resources.Get (printf "images/flags/%s.webp" .) }}
2+
<img class="o-flag" src="{{ $image.RelPermalink }}" alt="" />

layouts/partials/operator-list-item.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)