Skip to content
Closed
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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repos:
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=2048]
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
Expand Down
Binary file added assets/images/default.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/country/belgium/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion content/country/belgium/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In Belgien können sowohl FIP 50 als auch FIP Freifahrtsscheine umfangreich genu

Zusätzlich verkehren internationale [Eurostar]({{< ref "/operator/eurostar" >}} "Eurostar") Züge, welche vergünstigt mit speziellen FIP-Fahrkarten genutzt werden können. Die Züge sind in der Verbindungsauskunft als Zugkategorie `EST` ausgewiesen.

Darüber hinaus verkehren internationale TGV-Züge der SNCF aus Frankreich, für die Freifahrtscheine der belgischen Staatsbahn keine Gültigkeit haben. Für diese Züge lassen sich ausschließlich spezielle FIP Globalpreise buchen.
Darüber hinaus verkehren internationale TGV-Züge der SNCF aus Frankreich, für die Freifahrtscheine der belgischen Staatsbahn keine Gültigkeit haben. Für diese Züge lassen sich ausschließlich spezielle FIP Globalpreise buchen. Für die Eurocity Züge von Brüssel nach Paris von OuiGo gelten keine FIP Vergünstigungen.

## Wissenswertes

Expand All @@ -24,3 +24,4 @@ Noch ausstehend
## Betreiber ohne FIP

- European Sleeper
- OuiGo
3 changes: 2 additions & 1 deletion content/country/belgium/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In Belgium, both FIP 50 and FIP Coupons can be extensively used. The Belgian Nat

Additionally, international [Eurostar]({{< ref "/operator/eurostar" >}} "Eurostar") trains operate, which can be used at a discount with special FIP tickets. The trains are listed as train category `EST` in the connection information.

Furthermore, international TGV trains of the SNCF from France operate, for which the free travel passes of the Belgian National Railway Company are not valid. Only special FIP global prices can be booked for these trains.
Furthermore, international TGV trains of the SNCF from France operate, for which the free travel passes of the Belgian National Railway Company are not valid. Only special FIP global prices can be booked for these trains. For the Eurocity trains from Brussels tp Paris operated by OuiGo, no FIP discounts apply.

## Insteresting

Expand All @@ -24,3 +24,4 @@ Still pending
## Operators without FIP

- European Sleeper
- OuiGo
Binary file added content/country/denmark/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/country/netherlands/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/country/slovakia/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/news/image.webp
Binary file not shown.
Binary file added content/operator/dsb/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/operator/eurostar/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/operator/ns/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/operator/sncb/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/operator/zsr/image.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions content/operator/zsr/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ FIP Freifahrtscheine und FIP 50 Tickets sind auf Verbindungen der ZSSK mit der E

## Zugkategorien und Reservierungen

{{% highlight important %}}
Reservierungspflicht für SC- und IC-Züge. Andere ZSSK Züge erfordern nur eine Reservierung in der 1. Klasse. [^2]
{{% /highlight %}}

{{% expander "SuperCity (SC) ⚠️" category %}}
**Beschreibung:** \
Expand Down
2 changes: 2 additions & 0 deletions content/operator/zsr/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ FIP Coupons and FIP 50 tickets are valid on ZSSK connections with the restrictio

## Train categories and reservations

{{% highlight important %}}
Reservation required for SC and IC trains. Other ZSSK trains only require a reservation in 1st class. [^2]
{{% /highlight %}}

{{% expander "SuperCity (SC) ⚠️" category %}}
**Description:** \
Expand Down
20 changes: 10 additions & 10 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{ define "main" }}
<article class="container o-single">
<div class="o-single__header">
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
{{ partial "updateDate.html" . }}
</div>
<article class="container o-single">
<div class="o-single__header">
<h2 data-pagefind-meta="title">{{ .Title }}</h2>
{{ partial "updateDate.html" . }}
</div>

<div class="content" data-pagefind-body>
{{ .Content }}
</div>
<div class="content" data-pagefind-body>
{{ .Content }}
</div>

{{ partial "related.html" . }}
</article>
{{ partial "related.html" . }}
</article>
{{ end }}
1 change: 1 addition & 0 deletions layouts/country/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ <h3 id="related">{{ T "_operator__list_title"}} in {{ .Title }}</h3>
</ul>
</div>
</div>
{{ partial "image.html" (partial "helper/contentImage" . ) }}
</div>
</div>
</article>
Expand Down
45 changes: 23 additions & 22 deletions layouts/operator/single.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
{{ define "main" }}
<div class="curtain" aria-hidden="true"></div>
<article class="container o-single o-single--with-sidemenu">
<div class="row">
<div class="col-12 col-lg-4">
{{ partial "sidemenu.html" . }}
</div>
<div class="curtain" aria-hidden="true"></div>
<article class="container o-single o-single--with-sidemenu">
<div class="row">
<div class="col-12 col-lg-4">
{{ partial "sidemenu.html" . }}
</div>

<div class="col-12 col-lg-8" data-pagefind-body>
<div class="o-single__container content_with_heading">
<div class="o-single__header">
<div class="o-single__header__title">
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
{{ $logo := resources.Get (printf "svg/logos/%s.svg" $object) }}
<img data-pagefind-meta="img" src="{{ $logo.RelPermalink }}" alt="" />
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
<div class="col-12 col-lg-8" data-pagefind-body>
<div class="o-single__container content_with_heading">
<div class="o-single__header">
<div class="o-single__header__title">
{{ $object := replace .Path (printf "/%s/" .Page.Type) "" }}
{{ $logo := resources.Get (printf "svg/logos/%s.svg" $object) }}
<img data-pagefind-meta="img" src="{{ $logo.RelPermalink }}" alt="" />
<h1 data-pagefind-meta="title">{{ .Title }}</h1>
</div>
{{ partial "updateDate.html" . }}
</div>
{{ partial "updateDate.html" . }}
</div>

<div class="content" data-pagefind-weight="2.5">
{{- with .Content -}}
{{ . | replaceRE "(<h[2] id=\"([^\"]+)\".+)(</h[2]+>)" (print `<span class="a-anchorlink">${1}${3}<a href="#${2}" class="a-anchorlink__link" title="` (T "copyAnchorLink") `">` (partial "icon" "link") `</a></span>`) | safeHTML }}
{{- end -}}
<div class="content" data-pagefind-weight="2.5">
{{- with .Content -}}
{{ . | replaceRE "(<h[2] id=\"([^\"]+)\".+)(</h[2]+>)" (print `<span class="a-anchorlink">${1}${3}<a href="#${2}" class="a-anchorlink__link" title="` (T "copyAnchorLink") `">` (partial "icon" "link") `</a></span>`) | safeHTML }}
{{- end -}}
</div>
</div>
{{ partial "image.html" (partial "helper/contentImage" . ) }}
</div>
</div>
</div>
</article>
</article>
{{ end }}
46 changes: 21 additions & 25 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
{{ $metaDescription := "" }} <!-- Initialisierung der Variable -->
{{ if eq .Page.Type "country" }}
{{ $metaDescription = T "meta-description.country" }}
{{ else if eq .Page.Type "news" }}
{{ $metaDescription = T "meta-description.news" }}
{{ else if eq .Page.Type "news" }}
{{ $metaDescription = T "meta-description.news" }}
{{ else }}
{{ $metaDescription = .Description }}
{{ end }}

<meta charset="utf-8" xmlns:og="http://www.w3.org/1999/xhtml" />
<meta name="description" content="{{ $metaDescription }}" />
<meta name="dc.relation" content="{{ .Site.BaseURL }}" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#BA3D12" />
<meta property="og:url" content='{{ .Permalink }}'>
<meta property="og:site_name" content='{{ site.Title }}'>
<meta property="og:title" content='{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}'>
<meta property="og:description" content="{{ $metaDescription }}" />
<meta property="og:type" content='{{ if .IsPage }}article{{ else }}website{{ end }}'>
<meta property="og:image" content="{{ .Site.BaseURL }}og-image.jpg">
<meta property="og:image:type" content="image/jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
{{ partial "headMeta.html" . }}

<title>
{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}
Expand All @@ -48,3 +24,23 @@
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" type="image/x-icon" href="/favicon.ico">
<link rel="mask-icon" type="image/x-icon" href="/favicon.ico">
<link rel="canonical" href="{{ .Permalink }}"/>

{{- $currentPage := . -}}
{{- range .Site.Languages -}}
{{- $lang := . -}}
{{- if eq $lang.Lang $currentPage.Lang -}}
<link rel="alternate" hreflang="{{ $lang.Lang }}" href="{{ $currentPage.Permalink }}" />
{{- else -}}
{{- with $currentPage.Translations -}}
{{- range . -}}
{{- if eq .Lang $lang.Lang -}}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
<link rel="alternate" hreflang="x-default" href="{{ .Site.BaseURL }}" />

{{ partial "structuredData.html" . }}
26 changes: 26 additions & 0 deletions layouts/partials/headMeta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ $metaDescription := "" }} <!-- Initialisierung der Variable -->
{{ if eq .Page.Type "country" }}
{{ $metaDescription = T "meta-description.country" }}
{{ else if eq .Page.Type "news" }}
{{ $metaDescription = T "meta-description.news" }}
{{ else if eq .Page.Type "news" }}
{{ $metaDescription = T "meta-description.news" }}
{{ else }}
{{ $metaDescription = .Description }}
{{ end }}

<meta charset="utf-8" xmlns:og="http://www.w3.org/1999/xhtml" />
<meta name="description" content="{{ $metaDescription }}" />
<meta name="dc.relation" content="{{ .Site.BaseURL }}" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#BA3D12" />
<meta property="og:url" content='{{ .Permalink }}'>
<meta property="og:site_name" content='{{ site.Title }}'>
<meta property="og:title" content='{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}'>
<meta property="og:description" content="{{ $metaDescription }}" />
<meta property="og:type" content='{{ if .IsPage }}article{{ else }}website{{ end }}'>
<meta property="og:image" content="{{ .Site.BaseURL }}og-image.jpg">
<meta property="og:image:type" content="image/jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="robots" content="index,follow">
6 changes: 6 additions & 0 deletions layouts/partials/helper/contentImage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ $contentImage := .Page.Resources.GetMatch "image.webp" }}
{{ if not $contentImage }}
{{ $contentImage = resources.Get "images/default.webp" }}
{{ end }}

{{ return $contentImage }}
8 changes: 8 additions & 0 deletions layouts/partials/helper/dateHuman.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ $dateHuman := "" }}

{{ if .Date }}
{{ $dateHuman = .Date | time.Format ":date_long" }}
{{ else if .GitInfo }}
{{ $dateHuman = .GitInfo.AuthorDate | time.Format ":date_long" }}
{{ end }}
{{ return $dateHuman }}
9 changes: 9 additions & 0 deletions layouts/partials/helper/dateMachine.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ $dateMachine := "" }}
{{ printf "Hello, Hugo! The title of this page is: %s" .Title }}

{{ if page.Date }}
{{ $dateMachine = page.Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ else if page.GitInfo }}
{{ $dateMachine = page.GitInfo.AuthorDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ end }}
{{ return $dateMachine }}
67 changes: 67 additions & 0 deletions layouts/partials/structuredData.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{{ $dateMachine := partial "helper/dateMachine" . }}
{{ $type := "" }}
{{ if (or (eq .Page.Type "country") (eq .Page.Type "operator")) }}
{{ $type = "Article" }}
{{ else if eq .Page.Type "news"}}
{{ $type = "NewsArticle" }}
{{ end }}

{{ $image := (partial "helper/contentImage" .).RelPermalink }}

<script type="application/ld+json">{
"@context": "https://schema.org",
"@type": "WebSite",
"url": {{ page.Site.BaseURL }},
"name": "{{ site.Title }}",
"publisher": {
"@type": "Organization",
"name": "FIP Guide",
"email": "[email protected]"
},
{{- if not .IsHome }}
"breadcrumb": {
"@type": "BreadcrumbList",
"itemListElement": [
{{- $i := 1 }}
{{- range page.Ancestors.Reverse }}
{
"@type": "ListItem",
"position": {{ $i }},
"name": "{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}",
"url": {{ .Permalink }},
"item": {{ .Permalink }}
},
{{- $i = add $i 1 -}}
{{ end }}
{
"@type": "ListItem",
"position": {{ $i }},
"name": "{{ page.Title | safeJS }}",
"url": {{ page.Permalink }},
"item": {{ page.Permalink }}
}
]
},
{{- end }}
{{- if $type }}
"mainEntity": {
"@type": "{{ $type }}",
"headline": "{{ page.Title }}",
"image": {{ $image }},
"dateModified": {{ $dateMachine }},
"author": {
"@type":"Organization",
"name": "FIP Guide",
"url": "https://www.fipguide.org/",
"email": "[email protected]"
}
},
{{- end }}
"maintainer": {
"@type": "Organization",
"name": "FIP Guide",
"email": "[email protected]"
},
"inLanguage": "{{ site.Language.LanguageCode }}",
"isAccessibleForFree": true
}</script>
2 changes: 1 addition & 1 deletion layouts/partials/teaser.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<a href="{{ $page.RelPermalink }}" class="m-teaser {{ if $listview }}m-teaser--listview row{{ else }}col-lg-4 col-md-6{{ end }} col-12">


{{ $image := $page.Page.Resources.GetMatch "image.webp" }}
{{ $image := (partial "helper/contentImage" $page ) }}
{{ if $image }}
<div class="m-teaser__image{{ if $listview }} col-md-3 col-12{{ end }}">
{{ partialCached "image.html" $image $image }}
Expand Down
19 changes: 8 additions & 11 deletions layouts/partials/updateDate.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }}
{{ $dateMachine := partial "helper/dateMachine" . }}
{{ $dateHuman := partial "helper/dateHuman" . }}

{{ if eq .Type "news" }}
<div class="updateDate" data-pagefind-ignore="all">
<span>{{ T "updateDate"}}:</span>
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
</div>

{{ if .Date }}
<div class="updateDate" data-pagefind-ignore="all">
{{ if ne .Type "news" }}
<span>{{ T "updateDate"}}:</span>
{{ end }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
</div>
{{ else if .GitInfo }}
{{ $dateMachine := .GitInfo.AuthorDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .GitInfo.AuthorDate | time.Format ":date_long" }}
{{ $href := print .Site.Params.gitHubUrl "/commits/" .GitInfo.Hash "/content" .Path "/index." .Language ".md" }}
<a
href="{{ $href }}"
Expand Down
4 changes: 2 additions & 2 deletions layouts/robots.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
User-agent: *
{{ $imprintPage := site.GetPage "imprint" }}{{ if $imprintPage }}Disallow: {{ $imprintPage.RelPermalink }}{{ range $imprintPage.Translations }}
Disallow: {{ .RelPermalink }}{{ end }}{{ end }}{{ $imprintPage := site.GetPage "privacy" }}{{ if $imprintPage }}
Disallow: {{ $imprintPage.RelPermalink }}{{ range $imprintPage.Translations }}
Disallow: {{ .RelPermalink }}{{ end }}{{ end }}{{ $privacyPage := site.GetPage "privacy" }}{{ if $privacyPage }}
Disallow: {{ $privacyPage.RelPermalink }}{{ range $privacyPage.Translations }}
Disallow: {{ .RelPermalink }}{{ end }}{{ end }}
Loading