From 89d83f305db69f5bf86a4290341785b2673c35d0 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Mon, 1 Dec 2025 00:10:58 +0100 Subject: Add line list with link to official schedules --- src/frontend/app/components/StopGallery.tsx | 5 +- src/frontend/app/components/layout/NavBar.tsx | 14 +- src/frontend/app/data/LinesData.ts | 252 ++++++++++++++++++++++++++ src/frontend/app/i18n/locales/en-GB.json | 4 + src/frontend/app/i18n/locales/es-ES.json | 4 + src/frontend/app/i18n/locales/gl-ES.json | 4 + src/frontend/app/routes.tsx | 1 + src/frontend/app/routes/home.tsx | 108 ++++++----- src/frontend/app/routes/lines.tsx | 37 ++++ 9 files changed, 371 insertions(+), 58 deletions(-) create mode 100644 src/frontend/app/data/LinesData.ts create mode 100644 src/frontend/app/routes/lines.tsx (limited to 'src/frontend') diff --git a/src/frontend/app/components/StopGallery.tsx b/src/frontend/app/components/StopGallery.tsx index c1d9780..a45bfca 100644 --- a/src/frontend/app/components/StopGallery.tsx +++ b/src/frontend/app/components/StopGallery.tsx @@ -73,9 +73,8 @@ const StopGallery: React.FC = ({ {stops.map((_, index) => ( ))} diff --git a/src/frontend/app/components/layout/NavBar.tsx b/src/frontend/app/components/layout/NavBar.tsx index 91c8810..1a32b1e 100644 --- a/src/frontend/app/components/layout/NavBar.tsx +++ b/src/frontend/app/components/layout/NavBar.tsx @@ -1,4 +1,4 @@ -import { Map, MapPin, Settings } from "lucide-react"; +import { Map, MapPin, Route, Settings } from "lucide-react"; import type { LngLatLike } from "maplibre-gl"; import { useTranslation } from "react-i18next"; import { Link, useLocation } from "react-router"; @@ -57,10 +57,15 @@ export default function NavBar({ orientation = "horizontal" }: NavBarProps) { updateMapState(coords, 16); } }, - () => {} + () => { } ); }, }, + { + name: t("navbar.lines", "Líneas"), + icon: Route, + path: "/lines", + }, { name: t("navbar.settings", "Ajustes"), icon: Settings, @@ -70,9 +75,8 @@ export default function NavBar({ orientation = "horizontal" }: NavBarProps) { return (