From 959b519d754240a6a938d9f304015969da995bbf Mon Sep 17 00:00:00 2001 From: Araozu Date: Mon, 9 Sep 2024 13:43:08 -0500 Subject: [PATCH] Naive mobile UI --- src/App.tsx | 6 ++-- src/pages/Index2.tsx | 78 +++++++++++++++++++++++++++++--------------- 2 files changed, 54 insertions(+), 30 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index bee0fea..3d63f4c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import "leaflet/dist/leaflet.css"; import { Index } from "./pages/Index"; -import { Route, Router } from "@solidjs/router"; +import { Route, HashRouter } from "@solidjs/router"; import { Editor } from "./pages/Editor"; import { Index2 } from "./pages/Index2"; import { Arrow } from "./pages/Arrow"; @@ -8,12 +8,12 @@ import { Arrow } from "./pages/Arrow"; export default function() { return ( <> - + - + ); } diff --git a/src/pages/Index2.tsx b/src/pages/Index2.tsx index 01e4d43..ebd2aa9 100644 --- a/src/pages/Index2.tsx +++ b/src/pages/Index2.tsx @@ -7,7 +7,7 @@ let global_map: L.Map | null = null; const [global_count, set_global_count] = createSignal(0); export function Index2() { - const container =
; + const container =
; onMount(() => { global_map = L.map(container as HTMLElement) @@ -21,11 +21,14 @@ export function Index2() { }); return ( -
-
-

AQP combi

+
+
+

AQP combi

-

+

@@ -71,21 +74,27 @@ function LineEl(props: { line: Line }) {
- - - Linea {props.line.name} - - - - {(r) => ( - - )} - - +
+
+
+ + + {(r) => ( + + )} + + +
); } @@ -147,6 +156,13 @@ function RouteEl(props: { } }; + const both_classes = () => { + if (departure_active() && return_active()) { + return "bg-r-hover-bg text-r-hover-on-bg"; + } else { + return ""; + } + }; const departure_classes = () => { if (departure_count() > 0) { return "bg-r-hover-bg text-r-hover-on-bg"; @@ -163,10 +179,13 @@ function RouteEl(props: { }; return (