Skip to content

Commit 8500d86

Browse files
committed
Merge branch 'main' into 373-backlink-from-booking-page
2 parents 0bc48e2 + 12fb33e commit 8500d86

File tree

153 files changed

+2257
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+2257
-295
lines changed

.opencode/command/check.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ description: Check a page for common mistakes
33
agent: plan
44
---
55

6-
Check the page $ARGUMENTS for errors. When no language is provided, check all languages of the page. Common errors are:
6+
Check the page $ARGUMENTS for errors. List ALL errors you can find. Run the analysis step by step.
7+
When a language is provided in this prompt, only check check the specified language. Otherwise check all languages of the page.
8+
9+
Common errors are:
710

811
- Grammatical, typographical, or spelling errors
9-
- Not following the common terms in defined in the glossary of `AGENTS.md`
12+
- Not following the common terms as defined in the glossary of `AGENTS.md`
1013
- Content differs between the different languages. The content should always be the same.
1114
- The page structure doesn't follow the archetype defined in `archetypes`
1215
- Anchors of internal links are not matching the referenced and translated title

AGENTS.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,41 @@
1717

1818
### Translations
1919

20-
| Deutsch | Englisch | Französisch |
21-
| ------------------- | --------------- | ---------------- |
22-
| FIP Freifahrtschein | FIP Coupon | Coupon FIP |
23-
| FIP Globalpreis | FIP Global Fare | Tarif Global FIP |
24-
| FIP 50 Ticket | FIP 50 Ticket | Billet FIP 50 |
25-
| FIP Ausweis | FIP Card | Carte FIP |
20+
| Deutsch | Englisch | Französisch |
21+
| ---------------------------- | ------------------------- | ----------------------------------- |
22+
| FIP Freifahrtschein | FIP Coupon | Coupon FIP |
23+
| FIP Globalpreis | FIP Global Fare | Tarif Global FIP |
24+
| FIP 50 Ticket | FIP 50 Ticket | Billet FIP 50 |
25+
| FIP Ausweis | FIP Card | Carte FIP |
26+
| <operator> Ticketschalter | <operator> Ticket Office | Guichet <operator> |
27+
| <operator> Website | <operator> Website | Site Web <operator> |
28+
| <operator> Telefon | <operator> Telephone | Téléphone <operator> |
29+
| <operator> Fahrkartenautomat | <operator> Ticket Machine | Distributeurs de billets <operator> |
30+
| Grenzpunkt | Border Point | Point frontière |
31+
| FIP Rabatt / FIP Ermäßigung | FIP Discount | Remise FIP / Réduction FIP |
32+
33+
#### Headlines
34+
35+
Use these exact translations for headlines on the pages:
36+
37+
| Deutsch | Englisch | Französisch |
38+
| -------------------------------- | --------------------------------- | ------------------------------------ |
39+
| FIP Nutzung | FIP Information | Informations FIP |
40+
| Wissenswertes | Interesting | Informations générales |
41+
| Anreise und Grenzpunkte | Arrival and Border Points | Arrivée et points frontières |
42+
| Zusammenfassung | Summary | Résumé |
43+
| Gültigkeit FIP Tickets | Validity of FIP Tickets | Validité des Billets FIP |
44+
| Zugkategorien und Reservierungen | Train Categories and Reservations | Catégories de trains et réservations |
45+
| Klassenkategorien | Class Categories | Catégories de classes |
46+
| Ticket- und Reservierungskauf | Ticket and Reservation Purchase | Achat de billets et réservations |
47+
| Online | Online | En ligne |
48+
| Telefon | Telephone | Par téléphone |
49+
| Vor Ort | On-Site | En gare |
50+
| Im Zug | On the Train | À bord du train |
51+
| Ermäßigungen | Discounts | Réductions |
52+
| Tarifliche Besonderheiten | Special Tariff Conditions | Conditions tarifaires spéciales |
53+
| Empfehlungen | Recommendations | Recommandations |
54+
| Quellen | Sources | Sources |
2655

2756
## Development Guidelines
2857

archetypes/operator/index.de.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ operator: "{{ .File.ContentBaseName }}"
1515
{{< wip >}}
1616

1717
<!--
18-
Kurze Beschreibung der Bahngesellschaft. Z.B. Der vollstandige Name in Landessprache, alternative Namen und Angabe über Privat/Staatsbahn
18+
Kurze Beschreibung der Bahngesellschaft. z. B. Der vollstandige Name in Landessprache, alternative Namen und Angabe über Privat/Staatsbahn
1919
-->
2020

2121
## Zusammenfassung
2222

2323
<!--
2424
Stichpunktartige Zusammenfassung der wichtigsten Besonderheiten/FIP-Reglungen der Bahngesellschaft.
25-
Z.B.
25+
z. B.
2626
- Werden FIP 50 und FIP Freifahrtscheine akzeptiert?
2727
- Gibt es eine Reservierungspflicht?
2828
- Gibt es sonstige tarifliche Sonderregelungen oder Abweichungen zu anderen FIP Bahngesellschaften?
@@ -40,7 +40,7 @@ FIP 50 Tickets: <✅/⛔> \
4040
FIP Globalpreis: <✅/⛔>
4141

4242
<!--
43-
Wo gelten FIP 50 Tickets/FIP Freifahrtscheine und gibt es Einschränkungen? Welches Ticket wird bei Einreise benötigt (z.B. durchgehendes FIP 50 Ticket oder FIP Freifahrtscheine beider Länder)
43+
Wo gelten FIP 50 Tickets/FIP Freifahrtscheine und gibt es Einschränkungen? Welches Ticket wird bei Einreise benötigt (z. B. durchgehendes FIP 50 Ticket oder FIP Freifahrtscheine beider Länder)
4444
-->
4545

4646
## Zugkategorien und Reservierungen
@@ -60,7 +60,7 @@ FIP Globalpreis: <✅/⛔>
6060

6161
{{% expander "Zugkategorie" traincategory "category" %}}
6262

63-
<!-- Ersetze Zugkategorie mit dem Name der Zugkategorie, z.B. ICE. -->
63+
<!-- Ersetze Zugkategorie mit dem Name der Zugkategorie, z. B. ICE. -->
6464

6565
**Beschreibung:**
6666

@@ -146,7 +146,7 @@ FIP Globalpreis: <✅/⛔>
146146
### <Route bzw. Name>
147147

148148
<!--
149-
Beschreibung der Besonderheit, wenn es auf bestimmten Routen z.B. Sonderregelungen gibt.
149+
Beschreibung der Besonderheit, wenn es auf bestimmten Routen z. B. Sonderregelungen gibt.
150150
-->
151151

152152
## Empfehlungen
5.52 KB
Loading

assets/js/contentNavigation.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ const initAside = () => {
1919
aside.classList.remove("o-aside--open");
2020
asideContent.removeAttribute("role");
2121
asideContent.setAttribute("aria-hidden", "true");
22+
asideContent.setAttribute("inert", "");
2223
handleBtn.setAttribute("aria-expanded", "false");
23-
overlay.classList.remove("overlay--show");
24+
overlay.classList.remove("overlay--show", "overlay--content");
2425
};
2526

2627
const openSheet = () => {
2728
isClosed = false;
2829
aside.classList.add("o-aside--open");
29-
overlay.classList.add("overlay--show");
3030
asideContent.setAttribute("role", "dialog");
3131
asideContent.setAttribute("aria-hidden", "false");
32+
asideContent.removeAttribute("inert");
3233
handleBtn.setAttribute("aria-expanded", "true");
34+
overlay.classList.add("overlay--show", "overlay--content");
3335
};
3436

3537
if (isMobile()) {

assets/js/highlightHeadline.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ function initHighlightHeadline() {
2727
for (let i = 0; i < headings.length; i++) {
2828
const heading = headings[i];
2929

30-
// Add the scroll-padding-top defined in styles.scss + 1px to trigger the detection
31-
if (heading.offsetTop <= window.pageYOffset + 81) {
30+
if (heading.offsetTop <= window.pageYOffset) {
3231
currentHeading = heading;
3332
} else {
3433
break;

assets/js/search.js

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ const initSearch = () => {
2727
},
2828
});
2929

30-
// Close keyboard when scrolling in search results (mobile only)
30+
// Close keyboard when touching search results (mobile only)
3131
const searchDrawer = search.querySelector(".pagefind-ui__drawer");
32-
searchDrawer.addEventListener("scroll", () => {
32+
searchDrawer.addEventListener("touchstart", () => {
3333
if (!isMobile) return;
3434
if (document.activeElement && document.activeElement.blur) {
3535
document.activeElement.blur();
@@ -38,49 +38,68 @@ const initSearch = () => {
3838

3939
const searchElement = search.querySelector("input");
4040

41+
const updateSearchButtonLabels = (isOpen) => {
42+
searchButtons.forEach((button) => {
43+
const openLabel = button.dataset.labelOpen;
44+
const closeLabel = button.dataset.labelClose;
45+
const label = isOpen ? closeLabel : openLabel;
46+
button.setAttribute("aria-label", label);
47+
button.setAttribute("title", label);
48+
});
49+
};
50+
4151
const closeSearch = () => {
4252
search.querySelector(".pagefind-ui__search-clear").click();
43-
overlay.classList.remove("overlay--show", "overlay--show-lv5");
53+
overlay.classList.remove("overlay--show", "overlay--search");
4454
search.classList.remove("o-search--show");
55+
updateSearchButtonLabels(false);
4556
};
4657

47-
// Scroll to search on click
48-
if (search && isHome) {
49-
search.addEventListener("click", function () {
50-
overlay.classList.add("overlay--show", "overlay--show-lv5");
51-
search.scrollIntoView({ behavior: "smooth", block: "start" });
52-
});
53-
}
54-
55-
function showSearchOnContentPage() {
58+
const openSearch = () => {
59+
overlay.classList.add("overlay--show", "overlay--search");
5660
search.classList.add("o-search--show");
57-
overlay.classList.add("overlay--show", "overlay--show-lv5");
58-
searchElement.focus();
59-
}
60-
61-
function showSearchOnStartPage() {
62-
overlay.classList.add("overlay--show", "overlay--show-lv5");
6361
searchElement.focus();
6462
search.scrollIntoView({ behavior: "smooth", block: "start" });
63+
updateSearchButtonLabels(true);
64+
};
65+
66+
if (search && isHome) {
67+
searchElement.addEventListener("focus", () => {
68+
openSearch();
69+
});
70+
// If focus moves outside the search, close it
71+
search.addEventListener(
72+
"blur",
73+
(e) => {
74+
if (
75+
e.relatedTarget &&
76+
!search.contains(e.relatedTarget) &&
77+
!Array.from(searchButtons).includes(e.relatedTarget)
78+
) {
79+
closeSearch();
80+
}
81+
},
82+
true,
83+
);
6584
}
6685

67-
searchButtons.forEach((button) => {
68-
if (isHome) {
69-
button.addEventListener("click", showSearchOnStartPage);
70-
} else {
71-
button.addEventListener("click", showSearchOnContentPage);
86+
const toggleSearch = () => {
87+
if (search.classList.contains("o-search--show")) {
88+
closeSearch();
89+
return;
7290
}
91+
openSearch();
92+
};
93+
94+
searchButtons.forEach((button) => {
95+
button.addEventListener("click", toggleSearch);
7396
});
7497

75-
// Open search on Ctrl + K or Cmd + K
98+
// Toggle search on Ctrl + K or Cmd + K
7699
document.addEventListener("keydown", (e) => {
77100
if ((e.ctrlKey || e.metaKey) && e.key === "k") {
78101
e.preventDefault();
79-
if (isHome) {
80-
showSearchOnStartPage();
81-
} else {
82-
showSearchOnContentPage();
83-
}
102+
toggleSearch();
84103
}
85104
});
86105

assets/sass/_variables.scss

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ $link-default: #ba3d12;
99
$link-special: #000000;
1010
$bg-default: #ffffff;
1111
$bg-neutral: #ebe9e1;
12-
$bg-accent: #ffd900;
13-
$bg-accent2: #daba00;
14-
$bg-accent3: #fff284;
12+
$bg-accent: #ffff00;
13+
$bg-code: #fff284;
1514
$color-onLight: #000000;
1615
$color-table-border: #5b5b5b;
1716

@@ -24,8 +23,7 @@ html {
2423
--bg-default: #{$bg-default};
2524
--bg-neutral: #{$bg-neutral};
2625
--bg-accent: #{$bg-accent};
27-
--bg-accent2: #{$bg-accent2};
28-
--bg-accent3: #{$bg-accent3};
26+
--bg-code: #{$bg-code};
2927
--color-onLight: #{$color-onLight};
3028
--color-table-border: #{$color-table-border};
3129
--color-body: rgb(33, 37, 41);
@@ -42,28 +40,31 @@ html {
4240
--border: 0.1rem solid transparent;
4341
--pagefind-ui-font: roboto, Arial, Helvetica, sans-serif;
4442
--outline-focus-indicator: #257fa8;
43+
44+
@media print {
45+
--bg-neutral: white;
46+
}
4547
}
4648

4749
html[data-theme="dark"] {
48-
--pagefind-ui-text: #fff;
49-
--link-default: #ff6b3d;
50-
--link-hovered: #ff8a5b;
51-
--link-special: #ffffff;
52-
--bg-default: #151b23;
53-
--bg-neutral: #0d1117;
54-
--bg-accent: #86761a;
55-
--bg-accent2: #daba00;
56-
--bg-accent3: #fff284;
57-
--color-onLight: #ffffff;
58-
--color-table-border: #555;
59-
--color-body: #e0e0e0;
60-
--pagefind-ui-border: #555;
61-
--box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.5);
62-
--box-shadow-light: 0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.3);
63-
--pagefind-ui-background: var(--bg-default);
64-
--highlight-color-tip: #1a4a5c;
65-
--highlight-color-inofficial: #2a2d30;
66-
--highlight-color-important: #4a2a1a;
67-
--border: 0.1rem solid #3d444d;
68-
--outline-focus-indicator: #2e9acb;
50+
@media screen {
51+
--pagefind-ui-text: #fff;
52+
--link-default: #ff6b3d;
53+
--link-hovered: #ff8a5b;
54+
--link-special: #ffffff;
55+
--bg-default: #151b23;
56+
--bg-neutral: #0d1117;
57+
--color-onLight: #ffffff;
58+
--color-table-border: #555;
59+
--color-body: #e0e0e0;
60+
--pagefind-ui-border: #555;
61+
--box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.5);
62+
--box-shadow-light: 0.4rem 0.4rem 0.4rem rgba(0, 0, 0, 0.3);
63+
--pagefind-ui-background: var(--bg-default);
64+
--highlight-color-tip: #1a4a5c;
65+
--highlight-color-inofficial: #2a2d30;
66+
--highlight-color-important: #4a2a1a;
67+
--border: 0.1rem solid #3d444d;
68+
--outline-focus-indicator: #2e9acb;
69+
}
6970
}

assets/sass/anchorlink.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
align-self: flex-start;
8989
margin: 1rem;
9090
text-wrap: balance;
91-
z-index: 1000;
91+
z-index: 22;
9292
}
9393

9494
.a-snackbar--show {

assets/sass/button.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
}
2121

2222
@include focus-indicator(0.2rem);
23+
24+
@media print {
25+
padding: 0.6rem;
26+
display: block;
27+
}
2328
}

0 commit comments

Comments
 (0)