diff --git a/rogue-thi-app/components/allCards.jsx b/rogue-thi-app/components/allCards.jsx index 4c2716ca..e74da00e 100644 --- a/rogue-thi-app/components/allCards.jsx +++ b/rogue-thi-app/components/allCards.jsx @@ -4,7 +4,6 @@ import EventsCard from './cards/EventsCard' import ExamsCard from './cards/ExamsCard' import FoodCard from './cards/FoodCard' import InstallPrompt from './cards/InstallPrompt' -import MobilityCard from './cards/MobilityCard' import RoomCard from './cards/RoomCard' import TimetableCard from './cards/TimetableCard' @@ -54,18 +53,6 @@ export const ALL_DASHBOARD_CARDS = [ default: [PLATFORM_DESKTOP, USER_STUDENT, USER_EMPLOYEE, USER_GUEST], card: () => , }, - { - key: 'mobility', - removable: true, - default: [ - PLATFORM_DESKTOP, - PLATFORM_MOBILE, - USER_STUDENT, - USER_EMPLOYEE, - USER_GUEST, - ], - card: () => , - }, { key: 'calendar', removable: true, diff --git a/rogue-thi-app/components/cards/MobilityCard.jsx b/rogue-thi-app/components/cards/MobilityCard.jsx deleted file mode 100644 index f545f0c0..00000000 --- a/rogue-thi-app/components/cards/MobilityCard.jsx +++ /dev/null @@ -1,123 +0,0 @@ -import React, { useEffect, useMemo, useState } from 'react' -import ListGroup from 'react-bootstrap/ListGroup' -import ReactPlaceholder from 'react-placeholder' - -import { Bus, Car, PlugZap, TrainFront } from 'lucide-react' -import { - RenderMobilityEntry, - RenderMobilityEntryPlaceholder, - getMobilityEntries, - getMobilityLabel, - getMobilitySettings, -} from '../../lib/backend-utils/mobility-utils' -import BaseCard from './BaseCard' -import { useTime } from '../../lib/hooks/time-hook' - -import styles from '../../styles/Home.module.css' -import { useTranslation } from 'next-i18next' - -const MAX_STATION_LENGTH = 20 -const MOBILITY_ICONS = { - bus: Bus, - train: TrainFront, - parking: Car, - charging: PlugZap, -} - -/** - * Dashboard card for the mobility page. - */ -export default function MobilityCard() { - const time = useTime() - const [mobility, setMobility] = useState(null) - const [mobilityError, setMobilityError] = useState(null) - const [mobilitySettings, setMobilitySettings] = useState(null) - const { t } = useTranslation(['dashboard', 'mobility']) - - const mobilityIcon = useMemo(() => { - return mobilitySettings ? MOBILITY_ICONS[mobilitySettings.kind] : Bus - }, [mobilitySettings]) - const mobilityLabel = useMemo(() => { - return mobilitySettings - ? getMobilityLabel(mobilitySettings.kind, mobilitySettings.station, t) - : t('transport.title.unknown') - }, [mobilitySettings, t]) - - useEffect(() => { - setMobilitySettings(getMobilitySettings()) - }, []) - - useEffect(() => { - async function load() { - if (!mobilitySettings) { - return - } - - try { - setMobility( - await getMobilityEntries( - mobilitySettings.kind, - mobilitySettings.station - ) - ) - } catch (e) { - console.error(e) - setMobilityError(t('transport.error.retrieval')) - } - } - load() - }, [mobilitySettings, time, t]) - - const placeholder = ( - - {Array.from({ length: 4 }, (_, i) => ( - - - - ))} - - ) - - return ( - - - - {mobility !== null && - mobility.slice(0, 4).map((entry, i) => ( - - - - ))} - {mobility && mobility.length === 0 && ( - {t('transport.error.empty')} - )} - {mobilityError && ( - {t('transport.error.generic')} - )} - - - - ) -} diff --git a/rogue-thi-app/data/mobility.json b/rogue-thi-app/data/mobility.json deleted file mode 100644 index b5b1d524..00000000 --- a/rogue-thi-app/data/mobility.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "bus": { - "defaultStation": "hochschule", - "stations": [ - { - "id": "fruehlingstrasse", - "name": "Frühlingstraße", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=2&station=IN-Fr__ue__hl&sid=211" - }, - { - "id": "hauptbahnhof", - "name": "Hauptbahnhof", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=1&station=IN-Hbf&sid=240" - }, - { - "id": "heydeckstrasse", - "name": "Heydeckstraße", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=1&station=IN-Heyde&sid=247" - }, - { - "id": "hochschule", - "name": "Hochschule", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=2&station=IN-THoSc&sid=413" - }, - { - "id": "rathausplatz", - "name": "Rathausplatz", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=1&station=IN-Ratha&sid=337" - }, - { - "id": "rechbergstrasse", - "name": "Rechbergstraße", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=2&station=IN-Rechb&sid=339" - }, - { - "id": "stadttheater", - "name": "Stadttheater", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=2&station=IN-SThea&sid=397" - }, - { - "id": "zob", - "name": "ZOB", - "url": "https://www.invg.de/rt/getRealtimeData.action?stopPoint=32&station=IN-ZOB&sid=439" - } - ] - }, - "train": { - "defaultStation": "INGOLSTADT_NORD", - "stations": [ - { "id": "INGOLSTADT_NORD", "name": "Nordbahnhof" }, - { "id": "INGOLSTADT_HBF", "name": "Hauptbahnhof" }, - { "id": "INGOLSTADT_AUDI", "name": "Audi" } - ] - }, - "parking": [ - { "name": "Saturn Arena", "priceLevel": "free" }, - { "name": "Schloss", "priceLevel": 3 }, - { "name": "Festplatz", "priceLevel": 1 }, - { "name": "Nordbahnhof", "priceLevel": 1 }, - { "name": "Congressgarage (Mitarbeiter)", "priceLevel": "restricted" }, - { "name": "Congressgarage", "priceLevel": 3 }, - { "name": "Theater-Ost", "priceLevel": 3 }, - { "name": "Theater-West", "priceLevel": 3 }, - { "name": "Reduit Tilly", "priceLevel": 2 }, - { "name": "Münster", "priceLevel": 3 }, - { "name": "Hallenbad", "priceLevel": 2 }, - { "name": "Hauptbahnhof Ost", "priceLevel": 1 }, - { "name": "Hauptbahnhof West", "priceLevel": 1 } - ], - "charging": [ - { "id": "59362", "freeParking": true }, - { "id": "59340", "freeParking": true }, - { "id": "59360", "freeParking": true }, - { "id": "59358", "freeParking": false }, - { "id": "59356", "freeParking": false }, - { "id": "59200", "freeParking": false } - ] -} diff --git a/rogue-thi-app/lib/backend-utils/mobility-utils.jsx b/rogue-thi-app/lib/backend-utils/mobility-utils.jsx deleted file mode 100644 index 23afc7a8..00000000 --- a/rogue-thi-app/lib/backend-utils/mobility-utils.jsx +++ /dev/null @@ -1,220 +0,0 @@ -import { LockKeyhole } from 'lucide-react' - -import { TextBlock } from 'react-placeholder/lib/placeholders' - -import { formatFriendlyTime, formatRelativeMinutes } from '../date-utils' -import NeulandAPI from '../backend/neuland-api' - -import stations from '../../data/mobility.json' -import { useTranslation } from 'next-i18next' - -/** - * Retrieves the users mobility preferences. - * @returns {object} - */ -export function getMobilitySettings() { - return { - kind: localStorage.mobilityKind || 'bus', - station: localStorage.mobilityStationV2 || stations.bus.defaultStation, - } -} - -/** - * Determines the title of the mobility card / page. - * @param {string} kind Mobility type (`bus`, `train`, `parking` or `charging`) - * @param {string} station Station name (only for `bus` or `train`) - * @param {object} t Translation object - * @returns {string} - */ -export function getMobilityLabel(kind, station, t) { - switch (kind) { - case 'bus': { - const busEntry = stations.bus.stations.find((x) => x.id === station) - return t('transport.title.bus', { - station: busEntry ? busEntry.name : '?', - }) - } - case 'train': { - const trainEntry = stations.train.stations.find((x) => x.id === station) - return t('transport.title.train', { - station: trainEntry ? trainEntry.name : '?', - }) - } - case 'parking': - return t('transport.title.parking') - case 'charging': - return t('transport.title.charging') - default: - return t('transport.title.unknown') - } -} - -/** - * Fetches and parses mobility data - * @param {string} kind Mobility type (`bus`, `train`, `parking` or `charging`) - * @param {string} station Station name (only for `bus` or `train`) - * @returns {object[]} - */ -export async function getMobilityEntries(kind, station) { - if (kind === 'bus') { - const data = await NeulandAPI.getBusPlan(station) - return data.bus - } else if (kind === 'train') { - const data = await NeulandAPI.getTrainPlan(station) - return data.train - } else if (kind === 'parking') { - const data = await NeulandAPI.getParkingData() - return data.parking.lots - } else if (kind === 'charging') { - const data = await NeulandAPI.getCharingStationData() - const relevantStations = [ - 59362, 59340, 59360, 59358, 59356, 59200, 59354, 1770740, 22532, - ] - return data.charging.filter((x) => relevantStations.includes(x.id)) - } else { - throw new Error('Invalid mobility kind ' + kind) - } -} - -export function RenderMobilityEntryPlaceholder({ kind, styles }) { - if (kind === 'charging') { - return ( - <> -
- -
- - ) - } - - return ( - <> -
- - -
-
- -
- - ) -} - -/** - * Renders a row on the mobility page. - * @param {string} kind Mobility type (`bus`, `train`, `parking` or `charging`) - * @param {object} item Mobility data - * @param {number} maxLen Truncate the string after this many characters - * @param {string} styles CSS object - */ -export function RenderMobilityEntry({ kind, item, maxLen, styles, detailed }) { - const { t } = useTranslation('mobility') - - if (kind === 'bus') { - const timeString = formatTimes(item.time, 30, 30) - - return ( - <> -
{item.route}
-
{item.destination}
-
{timeString}
- - ) - } else if (kind === 'train') { - const timeString = formatTimes(item.actualTime, 30, 90) - - return ( - <> -
{item.name}
-
- {item.destination.length <= maxLen - ? item.destination - : item.destination.substr(0, maxLen) + '…'} -
-
- {timeString} -
- - ) - } else if (kind === 'parking') { - return ( - <> - {item.priceLevel && ( -
- {item.priceLevel === 'free' && ( -  €  - )} - {item.priceLevel === 'restricted' && } - {item.priceLevel > 0 && '€'.repeat(item.priceLevel)} -
- )} -
{item.name}
-
- {item.available && item.total ? ( - - {t('transport.details.parking.available', { - available: `${Math.round( - ((item.total - item.available) / item.total) * 100 - )}% - ${item.available}`, - })} - - ) : ( - {t('transport.details.parking.unknown')} - )} -
- - ) - } else if (kind === 'charging') { - return ( - <> -
{item.name}
-
- {t('transport.details.charging.available', { - available: item.available, - total: item.total, - })} -
- - ) - } else { - throw new Error('Invalid mobility kind') - } - - /** - * Formats the time difference between the current time and the given time. - * @param {string} time - The time to format. - * @param {number} cardMin - The number of minutes to show relative time for on the card. - * @param {number} detailedMin - The number of minutes to relative time for in the detailed view. - * @param {boolean} detailed - Whether to return a detailed time string (card vs page) - * @returns {string} The formatted time string. - */ - function formatTimes(time, cardMin, detailedMin) { - const cardMs = cardMin * 60 * 1000 - const detailedMs = detailedMin * 60 * 1000 - const actualTime = new Date(Number(time)) - const timeDifference = actualTime - new Date() - let timeString - - if (detailed) { - timeString = `${formatFriendlyTime(actualTime)} ${ - timeDifference < detailedMs - ? `- ${formatRelativeMinutes(actualTime)}` - : '' - }` - } else { - if (timeDifference > cardMs) { - timeString = formatFriendlyTime(actualTime) - } else { - timeString = `in ${formatRelativeMinutes(actualTime)}` - } - } - return timeString - } -} diff --git a/rogue-thi-app/lib/backend/neuland-api.js b/rogue-thi-app/lib/backend/neuland-api.js index bafe21fa..2958aa1b 100644 --- a/rogue-thi-app/lib/backend/neuland-api.js +++ b/rogue-thi-app/lib/backend/neuland-api.js @@ -121,75 +121,6 @@ class NeulandAPIClient { ) } - /** - * @param {string} station Bus station identifier - */ - async getBusPlan(station) { - return this.performGraphQLQuery( - gql` - query { - bus(station: ${station}) { - route - destination - time - } - } - `.replace(/\s+/g, ' ') - ) - } - - /** - * @param {string} station Train station identifier - */ - async getTrainPlan(station) { - return this.performGraphQLQuery( - gql` - query { - train(station: ${station}) { - name - destination - plannedTime - actualTime - canceled - track - } - } - `.replace(/\s+/g, ' ') - ) - } - - async getParkingData() { - return this.performGraphQLQuery( - gql` - query { - parking { - lots { - name - available - total - priceLevel - } - } - } - `.replace(/\s+/g, ' ') - ) - } - - async getCharingStationData() { - return this.performGraphQLQuery( - gql` - query { - charging { - id - name - available - total - } - } - `.replace(/\s+/g, ' ') - ) - } - async getCampusLifeEvents() { return await this.performGraphQLQuery( gql` diff --git a/rogue-thi-app/pages/index.jsx b/rogue-thi-app/pages/index.jsx index a43fb476..c5f1586f 100644 --- a/rogue-thi-app/pages/index.jsx +++ b/rogue-thi-app/pages/index.jsx @@ -127,7 +127,6 @@ export const getServerSideProps = async ({ locale, req }) => { announcements, ...(await serverSideTranslations(locale ?? 'en', [ 'dashboard', - 'mobility', 'common', ])), }, diff --git a/rogue-thi-app/pages/mobility.jsx b/rogue-thi-app/pages/mobility.jsx deleted file mode 100644 index b80726c6..00000000 --- a/rogue-thi-app/pages/mobility.jsx +++ /dev/null @@ -1,170 +0,0 @@ -import React, { useEffect, useState } from 'react' - -import Form from 'react-bootstrap/Form' -import ListGroup from 'react-bootstrap/ListGroup' -import ReactPlaceholder from 'react-placeholder' - -import AppBody from '../components/page/AppBody' -import AppContainer from '../components/page/AppContainer' -import AppNavbar from '../components/page/AppNavbar' -import AppTabbar from '../components/page/AppTabbar' - -import { - RenderMobilityEntry, - getMobilityEntries, - getMobilityLabel, - getMobilitySettings, -} from '../lib/backend-utils/mobility-utils' -import stations from '../data/mobility.json' -import { useTime } from '../lib/hooks/time-hook' - -import styles from '../styles/Mobility.module.css' -import { useTranslation } from 'next-i18next' - -import { serverSideTranslations } from 'next-i18next/serverSideTranslations' - -export default function Bus() { - const time = useTime() - const [kind, setKind] = useState(null) - const [station, setStation] = useState(null) - const [data, setData] = useState(null) - const [dataError, setDataError] = useState(null) - const { t } = useTranslation('mobility') - - useEffect(() => { - const { kind, station } = getMobilitySettings() - setKind(kind) - setStation(station) - }, []) - - useEffect(() => { - async function load() { - try { - if (kind) { - localStorage.mobilityKind = kind - setData(null) - setDataError(null) - setData(await getMobilityEntries(kind, station)) - } else { - delete localStorage.mobilityKind - } - if (station) { - localStorage.mobilityStationV2 = station - } else { - delete localStorage.mobilityStationV2 - } - } catch (e) { - setDataError(e.message) - } - } - load() - }, [kind, station, time]) - - /** - * Changes the mobility type. - * @param {string} kind Mobility type (either `bus`, `train`, `parking` or `charging`) - */ - function changeKind(kind) { - setKind(kind) - setData(null) - if (kind === 'bus' || kind === 'train') { - setStation(stations[kind].defaultStation) - } else { - setStation(null) - } - } - - return ( - - - - -
- - {t('form.type.label')} - changeKind(e.target.value)} - > - - - - - ç - - - {(kind === 'bus' || kind === 'train') && ( - - - {kind === 'bus' - ? t('form.station.label.bus') - : t('form.station.label.train')} - - setStation(e.target.value)} - > - {kind && - stations[kind].stations.map((station) => ( - - ))} - - - )} -
- - - - {dataError && ( - - {t('transport.error.retrieval')} -
- {dataError} -
- )} - {data && data.length === 0 && ( - - {t('transport.details.noElements')} - - )} - {data && - data.map((item, idx) => ( - - - - ))} -
-
- - -
-
- ) -} - -export const getStaticProps = async ({ locale }) => ({ - props: { - ...(await serverSideTranslations(locale ?? 'en', ['mobility', 'common'])), - }, -}) diff --git a/rogue-thi-app/public/locales/de/common.json b/rogue-thi-app/public/locales/de/common.json index 6d4bfae1..404fe921 100644 --- a/rogue-thi-app/public/locales/de/common.json +++ b/rogue-thi-app/public/locales/de/common.json @@ -59,7 +59,6 @@ "install2": "Installation", "timetable": "Stundenplan", "mensa": "Essen", - "mobility": "Mobilität", "calendar": "Termine", "events": "Campus Life", "rooms": "Raumvorschläge", diff --git a/rogue-thi-app/public/locales/de/dashboard.json b/rogue-thi-app/public/locales/de/dashboard.json index 8379a63d..26a3e3d7 100644 --- a/rogue-thi-app/public/locales/de/dashboard.json +++ b/rogue-thi-app/public/locales/de/dashboard.json @@ -36,18 +36,6 @@ "additional": "und {{count}} weitere Gerichte" } }, - "transport": { - "title": { - "train": "Bahn ({{station}})", - "bus": "Bus ({{station}})", - "parking": "Parkplätze", - "charging": "Ladestationen" - }, - "error": { - "empty": "Keine Elemente.", - "generic": "Fehler beim Abruf." - } - }, "calendar": { "title": "Kalender", "date": { diff --git a/rogue-thi-app/public/locales/de/login.json b/rogue-thi-app/public/locales/de/login.json index 0edce822..241e5912 100644 --- a/rogue-thi-app/public/locales/de/login.json +++ b/rogue-thi-app/public/locales/de/login.json @@ -9,7 +9,7 @@ "warning": "Die App kann derzeit nur als Gast verwendet werden. Weitere Informationen findet ihr unten.", "title": "Warum kann ich mich nicht einloggen?", "details": "Die Hochschule hat uns dazu angewiesen, die Login-Funktion zu deaktivieren. Wir arbeiten an einer Lösung, allerdings ist nicht abzusehen, wann es so weit sein wird. Vor einer Nutzung der offiziellen THI-App raten wir aus Sicherheitsgründen ab.", - "details2": "Der Speiseplan, die Semester- und Veranstaltungstermine, die Raumkarte, die Bus- und Zugabfahrtszeiten sowie die Parkplatzinformationen können weiterhin über den Gastmodus genutzt werden." + "details2": "Der Speiseplan, die Semester- & Veranstaltungstermine und die Raumkarte können weiterhin über den Gastmodus genutzt werden." }, "notes": { "title1": "Was ist das?", diff --git a/rogue-thi-app/public/locales/de/mobility.json b/rogue-thi-app/public/locales/de/mobility.json deleted file mode 100644 index e2f526ec..00000000 --- a/rogue-thi-app/public/locales/de/mobility.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "form": { - "type": { - "label": "Verkehrsmittel", - "option": { - "bus": "Bus", - "train": "Bahn", - "parking": "Auto", - "charging": "E-Auto" - } - }, - "station": { - "label": { - "bus": "Haltestelle", - "train": "Bahnhof" - } - } - }, - "transport": { - "title": { - "bus": "Bus ({{station}})", - "train": "Bahn ({{station}})", - "parking": "Parkplätze", - "charging": "Ladestationen", - "unknown": "Mobilität" - }, - "details": { - "charging": { - "available": "{{available}} von {{total}} frei" - }, - "parking": { - "available": "{{available}} frei", - "unknown": "n/a", - "employees": "Mitarbeiter", - "free": "Kostenlos", - "paid": "Kostenpflichtig", - "restricted": "Zugangsbeschränkt" - }, - "noElements": "Keine Elemente." - }, - "error": { - "retrieval": "Fehler beim Abruf." - } - } -} diff --git a/rogue-thi-app/public/locales/en/common.json b/rogue-thi-app/public/locales/en/common.json index a965d343..95407bb2 100644 --- a/rogue-thi-app/public/locales/en/common.json +++ b/rogue-thi-app/public/locales/en/common.json @@ -59,7 +59,6 @@ "install2": "Installation", "timetable": "Timetable", "mensa": "Food", - "mobility": "Mobility", "calendar": "Calendar", "events": "Campus Life", "rooms": "Room Suggestions", diff --git a/rogue-thi-app/public/locales/en/dashboard.json b/rogue-thi-app/public/locales/en/dashboard.json index 9dc9fdaf..4a551d18 100644 --- a/rogue-thi-app/public/locales/en/dashboard.json +++ b/rogue-thi-app/public/locales/en/dashboard.json @@ -36,18 +36,6 @@ "additional": "and {{count}} more dishes" } }, - "transport": { - "title": { - "train": "Train ({{station}})", - "bus": "Bus ({{station}})", - "parking": "Parking", - "charging": "Charging Stations" - }, - "error": { - "empty": "No items.", - "generic": "Error retrieving." - } - }, "calendar": { "title": "Calendar", "date": { diff --git a/rogue-thi-app/public/locales/en/login.json b/rogue-thi-app/public/locales/en/login.json index 7953a172..71c15f04 100644 --- a/rogue-thi-app/public/locales/en/login.json +++ b/rogue-thi-app/public/locales/en/login.json @@ -9,7 +9,7 @@ "warning": "The app can currently only be used as a guest. More information can be found below.", "title": "Why can't I log in?", "details": "The university has instructed us to disable the login function. We are working on a solution, but it is not clear when it will be ready. We advise against using the official THI app for security reasons.", - "details2": "The menu plan, semester and event dates, room map, bus and train departure times, and parking information can still be accessed through the guest mode." + "details2": "The menu plan, semester & event dates and the room map can still be accessed through the guest mode." }, "notes": { "title1": "What is this?", diff --git a/rogue-thi-app/public/locales/en/mobility.json b/rogue-thi-app/public/locales/en/mobility.json deleted file mode 100644 index c3072d27..00000000 --- a/rogue-thi-app/public/locales/en/mobility.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "form": { - "type": { - "label": "Transportation", - "option": { - "bus": "Bus", - "train": "Train", - "parking": "Parking", - "charging": "Charging Stations" - } - }, - "station": { - "label": { - "bus": "Stop", - "train": "Station" - } - } - }, - "transport": { - "title": { - "bus": "Bus ({{station}})", - "train": "Train ({{station}})", - "parking": "Parking", - "charging": "Charging Stations", - "unknown": "Mobility" - }, - "details": { - "charging": { - "available": "{{available}} of {{total}} available" - }, - "parking": { - "available": "{{available}} left", - "unknown": "n/a", - "employees": "Employees", - "free": "Free", - "paid": "Paid", - "restricted": "Restricted" - }, - "noElements": "No elements." - }, - "error": { - "retrieval": "Error retrieving data." - } - } -} diff --git a/rogue-thi-app/styles/Home.module.css b/rogue-thi-app/styles/Home.module.css index 2b49f7cd..c7276f22 100644 --- a/rogue-thi-app/styles/Home.module.css +++ b/rogue-thi-app/styles/Home.module.css @@ -69,45 +69,6 @@ margin-top: 10px; } -.mobilityItem { - padding: 0.25rem; - border: 0; - display: flex; - align-items: center; -} - -.mobilityRoute { - display: flex; - height: 100%; - align-items: center; - justify-content: center; - min-width: 3em; - white-space: nowrap; - text-align: center; - font-weight: bold; - color: var(--white); - background-image: linear-gradient( - 70deg, - color-mix(in srgb, var(--secondary) 80%, var(--dark) 20%) 30%, - color-mix(in srgb, var(--secondary) 30%, var(--dark) 70%) - ); - padding: 2px 6px; - border-radius: 5px; - margin-right: 10px; -} - -.mobilityDestination { - flex: 1; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.mobilityTime { - white-space: nowrap; - width: auto; -} - .placeholder_2_5 { margin: 2.5px 0; } diff --git a/rogue-thi-app/styles/Mobility.module.css b/rogue-thi-app/styles/Mobility.module.css deleted file mode 100644 index 48089dc9..00000000 --- a/rogue-thi-app/styles/Mobility.module.css +++ /dev/null @@ -1,59 +0,0 @@ -.stationForm { - width: 100%; - display: flex; - flex-direction: column; -} - -@media (min-width: 768px) { - .stationForm { - flex-direction: row; - } - .stationForm * { - margin-right: 20px; - } -} - -.mobilityItem { - display: flex; - flex-direction: row; - align-items: center; -} - -.mobilityRoute { - display: flex; - min-height: 1.5em; - align-items: center; - justify-content: center; - min-width: 3em; - white-space: nowrap; - text-align: center; - font-weight: bold; - color: var(--white); - background-image: linear-gradient( - 70deg, - color-mix(in srgb, var(--secondary) 80%, var(--dark) 20%) 30%, - color-mix(in srgb, var(--secondary) 30%, var(--dark) 70%) - ); - padding: 2px 6px; - border-radius: 5px; - margin-right: 10px; -} - -.mobilityDestination { - flex: 1; - white-space: break-spaces; - word-break: break-word; - margin-right: 5px; -} - -.mobilityTime { - text-align: right; -} - -.mobilityCanceled { - text-decoration: line-through; -} - -.strikethrough { - text-decoration: line-through; -}