From a477dda9dc4291ab25fffe2525acf44177154c86 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Sun, 30 Nov 2025 23:27:33 +0100 Subject: Remake home and settings pages using Tailwind styles --- src/frontend/app/components/LineIcon.css | 3 ++ src/frontend/app/components/StopGallery.tsx | 36 ++++++++++++++--------- src/frontend/app/components/StopGalleryItem.tsx | 38 +++++++++++++++++++------ src/frontend/app/components/StopItem.tsx | 17 ++++++----- 4 files changed, 65 insertions(+), 29 deletions(-) (limited to 'src/frontend/app/components') diff --git a/src/frontend/app/components/LineIcon.css b/src/frontend/app/components/LineIcon.css index c6dffd8..6363c85 100644 --- a/src/frontend/app/components/LineIcon.css +++ b/src/frontend/app/components/LineIcon.css @@ -13,6 +13,7 @@ --line-l5b: hsl(204, 100%, 54%); --line-l5b-text: hsl(0, 0%, 100%); --line-l6: hsl(330, 60%, 50%); + --line-l6-text: hsl(0, 0%, 100%); --line-l7: hsl(120, 60%, 70%); --line-l9b: hsl(36, 83%, 75%); --line-l10: hsl(30, 80%, 20%); @@ -40,6 +41,7 @@ --line-l23-text: hsl(0, 0%, 100%); --line-l24: hsl(0, 0%, 75%); --line-l25: hsl(34, 95%, 35%); + --line-l25-text: hsl(0, 0%, 100%); --line-l27: hsl(30, 60%, 30%); --line-l27-text: hsl(0, 0%, 100%); --line-l28: hsl(230, 98%, 84%); @@ -59,6 +61,7 @@ --line-h3-text: hsl(0, 0%, 100%); --line-lzd: hsl(220, 60%, 50%); --line-n1: hsl(0, 51%, 53%); + --line-n1-text: hsl(0, 0%, 100%); --line-n4: hsl(300, 33%, 30%); --line-n4-text: hsl(0, 0%, 100%); --line-psa1: hsl(120, 100%, 30%); diff --git a/src/frontend/app/components/StopGallery.tsx b/src/frontend/app/components/StopGallery.tsx index 500ea20..c1d9780 100644 --- a/src/frontend/app/components/StopGallery.tsx +++ b/src/frontend/app/components/StopGallery.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useRef, useState } from "react"; import { type Stop } from "../data/StopDataProvider"; -import "./StopGallery.css"; import StopGalleryItem from "./StopGalleryItem"; interface StopGalleryProps { @@ -36,10 +35,12 @@ const StopGallery: React.FC = ({ if (stops.length === 0 && emptyMessage) { return ( -
-

{title}

-
-

{emptyMessage}

+
+

{title}

+
+

+ {emptyMessage} +

); @@ -50,24 +51,31 @@ const StopGallery: React.FC = ({ } return ( -
-
-

{title}

- {stops.length} -
+
+

{title}

-
-
+
+
{stops.map((stop) => ( ))}
-
+
{stops.map((_, index) => ( ))}
diff --git a/src/frontend/app/components/StopGalleryItem.tsx b/src/frontend/app/components/StopGalleryItem.tsx index 72a13e5..6c80362 100644 --- a/src/frontend/app/components/StopGalleryItem.tsx +++ b/src/frontend/app/components/StopGalleryItem.tsx @@ -9,21 +9,43 @@ interface StopGalleryItemProps { const StopGalleryItem: React.FC = ({ stop }) => { return ( -
- -
- {stop.favourite && } - ({stop.stopId}) +
+ +
+ {stop.favourite && } + + ({stop.stopId}) +
-
+
{StopDataProvider.getDisplayName(stop)}
-
+
{stop.lines?.slice(0, 5).map((line) => ( ))} {stop.lines && stop.lines.length > 5 && ( - +{stop.lines.length - 5} + + +{stop.lines.length - 5} + )}
diff --git a/src/frontend/app/components/StopItem.tsx b/src/frontend/app/components/StopItem.tsx index 7875b59..9679b05 100644 --- a/src/frontend/app/components/StopItem.tsx +++ b/src/frontend/app/components/StopItem.tsx @@ -9,18 +9,21 @@ interface StopItemProps { const StopItem: React.FC = ({ stop }) => { return ( -
  • - -
    - - {stop.favourite && } +
  • + +
    + + {stop.favourite && } {StopDataProvider.getDisplayName(stop)} - + ({stop.stopId})
    -
    +
    {stop.lines?.map((line) => ( ))} -- cgit v1.3