Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
beab955
feat: Add initial route planner support
MoritzWeber0 Jul 23, 2026
85a4a65
feat: Add reservation required tag
MoritzWeber0 Jul 23, 2026
4504048
feat: Add warning for international journeys
MoritzWeber0 Jul 23, 2026
d9e5404
fix: Display international warning message again
MoritzWeber0 Jul 24, 2026
38ecbd2
feat: Improve transitous queries
MoritzWeber0 Aug 2, 2026
7f0938e
Move transitous mapping to separate YAML files and add route planner …
MoritzWeber0 Aug 3, 2026
8db20a4
Remove Regionalverkehre Start Deutschland entries from transitous.yaml
MoritzWeber0 Aug 3, 2026
8d351e5
Add priority field to transitous entries for match ordering
MoritzWeber0 Aug 3, 2026
94a42cf
Add message and fipAccepted/reservationRequired overwrite support to …
MoritzWeber0 Aug 3, 2026
035c5c0
feat: Add information about three-country-train (DE/BE/NL)
MoritzWeber0 Jul 27, 2026
305eda7
Add Arriva three-country train (RE18) rules to NS transitous mapping
MoritzWeber0 Aug 3, 2026
e2dab81
Add fromCountry/toCountry to query context and NS International ICE rule
MoritzWeber0 Aug 3, 2026
9279468
Add markdown link support in transitous messages and link to country …
MoritzWeber0 Aug 3, 2026
5742be8
Restrict DB Regio rules to domestic German journeys
MoritzWeber0 Aug 3, 2026
fad9818
feat: Use proper dialog for debug menu
MoritzWeber0 Aug 3, 2026
b04ceed
Remove transitous.yaml files with only agencyName matching
MoritzWeber0 Aug 3, 2026
b5be98c
Add debug dialog actions and fix snackbar in modal dialogs
MoritzWeber0 Aug 3, 2026
e11201c
Use scheduled times and drop OTHER transit mode in route planner
MoritzWeber0 Aug 3, 2026
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 @@ -15,6 +15,7 @@ repos:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
exclude: "layouts/_default/home.transitousmapping.json$"
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
Expand Down
3 changes: 2 additions & 1 deletion archetypes/country/index.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ draft: false
title: "{{ .File.ContentBaseName | title }}" # Ändere den Name auf den deutschen Ländernamen
country: "{{ .File.ContentBaseName }}"
params:
iso_code: # ISO 3166-1 alpha-2 Code, z. B. DE
operators_without_fip:
- # Liste Betreiber, die kein FIP akzeptieren
- # Betreibername
---

<!-- Entferne das "WIP" Snippet, wenn die Inhalte der Seite vollständig sind -->
Expand Down
3 changes: 2 additions & 1 deletion archetypes/country/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ draft: false
title: "{{ .File.ContentBaseName | title }}" # Change the name to the English country name
country: "{{ .File.ContentBaseName }}"
params:
iso_code: # ISO 3166-1 alpha-2 code, e.g. DE
operators_without_fip:
- # List operators without FIP here
- # Operator name
---

<!-- Remove the WIP snippet if the page is complete -->
Expand Down
3 changes: 2 additions & 1 deletion archetypes/country/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ draft: false
title: "{{ .File.ContentBaseName | title }}" # Change le nom par le nom du pays français
country: "{{ .File.ContentBaseName }}"
params:
iso_code: # Code ISO 3166-1 alpha-2, p.ex. DE
operators_without_fip:
- # Listez ici les opérateurs ne participant pas au FIP
- # Nom de l'opérateur
---

<!-- Supprimez ce message si la page est complète -->
Expand Down
31 changes: 27 additions & 4 deletions assets/js/anchorlinks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const snackbar = document.getElementById("snackbar");
const snackbarHome = snackbar.parentNode;
const snackbarNextSibling = snackbar.nextSibling;

function initAnchorlinkEventListener() {
const anchorLinks = document.querySelectorAll(".a-anchorlink__link");
const snackbar = document.getElementById("snackbar");
const snackbarButton = document.getElementById("snackbar-button");

anchorLinks.forEach((element) => {
element.addEventListener("click", () => {
Expand All @@ -19,32 +21,53 @@ function initAnchorlinkEventListener() {
});
});
});
}

function initSnackbarCloseListener() {
const snackbarButton = document.getElementById("snackbar-button");
if (!snackbarButton) return;

snackbarButton.addEventListener("click", () => {
closeSnackbar();
});
}

function showSnackbar() {
export function showSnackbar() {
const openDialog = document.querySelector("dialog[open]");
if (openDialog && snackbar.parentNode !== openDialog) {
openDialog.append(snackbar);
} else if (!openDialog && snackbar.parentNode !== snackbarHome) {
snackbarHome.insertBefore(snackbar, snackbarNextSibling);
}

snackbar.setAttribute("aria-hidden", "false");
snackbar.classList.add("a-snackbar--show");
if (snackbar.showPopover) snackbar.showPopover();

setTimeout(closeSnackbar, 5000);
}

function closeSnackbar() {
export function closeSnackbar() {
snackbar.setAttribute("aria-hidden", "true");
snackbar.classList.remove("a-snackbar--show");
if (snackbar.hidePopover && snackbar.matches(":popover-open")) {
snackbar.hidePopover();
}
if (snackbar.parentNode !== snackbarHome) {
snackbarHome.insertBefore(snackbar, snackbarNextSibling);
}
}

if (document.readyState === "interactive") {
if (document.querySelectorAll(".a-anchorlink__link").length) {
initAnchorlinkEventListener();
}
initSnackbarCloseListener();
} else {
window.addEventListener("DOMContentLoaded", () => {
if (document.querySelectorAll(".a-anchorlink__link").length) {
initAnchorlinkEventListener();
}
initSnackbarCloseListener();
});
}
54 changes: 30 additions & 24 deletions assets/js/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,40 @@ function openDialogOnHash() {
}
}

function initDialogs() {
document.querySelectorAll("dialog").forEach((dialog) => {
dialog.addEventListener("click", (e) => {
if (e.target === dialog) {
dialog.close();
}
});

const closeButton = getCloseButton(dialog);
if (closeButton) {
closeButton.addEventListener("click", () => dialog.close());
export function bindDialog(dialog) {
dialog.addEventListener("click", (e) => {
if (e.target === dialog) {
dialog.close();
}
});

document.querySelectorAll("[data-dialog-trigger]").forEach((trigger) => {
const handler = (e) => {
if (e.type === "click" || (e.type === "keydown" && e.key === "Enter")) {
e.preventDefault();
const dialogId = trigger.getAttribute("data-dialog-trigger");
openDialog(dialogId);
}
};

trigger.addEventListener("click", handler);
trigger.addEventListener("keydown", handler);
});
const closeButton = getCloseButton(dialog);
if (closeButton) {
closeButton.addEventListener("click", () => dialog.close());
}
}

export function bindDialogTrigger(trigger) {
const handler = (e) => {
if (e.type === "click" || (e.type === "keydown" && e.key === "Enter")) {
e.preventDefault();
const dialogId = trigger.getAttribute("data-dialog-trigger");
openDialog(dialogId);
}
};

trigger.addEventListener("click", handler);
trigger.addEventListener("keydown", handler);
}

export function initDialogsIn(root) {
root.querySelectorAll("dialog").forEach(bindDialog);
root.querySelectorAll("[data-dialog-trigger]").forEach(bindDialogTrigger);
}

function initDialogs() {
initDialogsIn(document);

// Initialize hash check
openDialogOnHash();
window.addEventListener("hashchange", openDialogOnHash);
}
Expand Down
1 change: 1 addition & 0 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ import "./expander.js";
import "./dialog.js";
import "./fipValidityComparison.js";
import "./search.js";
import "./routePlanner.js";
Loading
Loading