diff --git a/src/App.svelte b/src/App.svelte index ce3083e..55a2fd2 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -16,9 +16,8 @@ }); -{#if !routing.currentTrip} - -{:else} +{#if routing.currentTrip} {/if} + \ No newline at end of file diff --git a/src/lib/components/lnv/ManeuverIcon.svelte b/src/lib/components/lnv/ManeuverIcon.svelte index 2316765..60188e8 100644 --- a/src/lib/components/lnv/ManeuverIcon.svelte +++ b/src/lib/components/lnv/ManeuverIcon.svelte @@ -12,7 +12,7 @@ img { /* the images are black, recolor them white */ filter: invert(1); - width: 24px; - height: 24px; + width: 48px; + height: 48px; } diff --git a/src/lib/components/lnv/RoutingInfo.svelte b/src/lib/components/lnv/RoutingInfo.svelte index df96fca..bbe91f0 100644 --- a/src/lib/components/lnv/RoutingInfo.svelte +++ b/src/lib/components/lnv/RoutingInfo.svelte @@ -1,13 +1,97 @@ - -
-
+
+
- {routing.currentTripInfo.currentManeuver?.instruction} +
+ {distanceText} + {routing.currentTripInfo.currentManeuver?.instruction} +
} = { main: MainSidebar, @@ -46,6 +48,7 @@ let searchText = $derived.by(debounce(() => searchbar.text, 300)); let searchResults: Feature[] = $state([]); + let mobileView = $derived(window.innerWidth < 768 || routing.currentTrip); $effect(() => { if(!searchText) { @@ -69,12 +72,14 @@ }); - - +{/if} \ No newline at end of file diff --git a/src/lib/components/lnv/map.svelte.ts b/src/lib/components/lnv/map.svelte.ts index 86da807..e2099f4 100644 --- a/src/lib/components/lnv/map.svelte.ts +++ b/src/lib/components/lnv/map.svelte.ts @@ -1,3 +1,4 @@ +import { routing } from "$lib/services/navigation/routing.svelte"; import { reverseGeocode } from "$lib/services/Search"; import { view } from "./sidebar.svelte"; @@ -18,12 +19,12 @@ export const map = $state({ return; } console.log("Updating map padding"); - if (window.innerWidth < 768) { + if (window.innerWidth < 768 || routing.currentTrip) { const calculatedSidebarHeight = document.querySelector("#sidebar")!.getBoundingClientRect().height; map._setPadding({ - top: 50, + top: routing.currentTrip ? 64 : 0, right: 0, - bottom: calculatedSidebarHeight + 50, + bottom: calculatedSidebarHeight, left: 0 }); return; diff --git a/src/lib/components/lnv/sidebar/InRouteSidebar.svelte b/src/lib/components/lnv/sidebar/InRouteSidebar.svelte new file mode 100644 index 0000000..1fb8a58 --- /dev/null +++ b/src/lib/components/lnv/sidebar/InRouteSidebar.svelte @@ -0,0 +1,130 @@ + + +{fullDistanceText} left + + + + + +
+ {#if location.code} + Share Code: {location.code} + + {:else} + + {/if} +
\ No newline at end of file diff --git a/src/lib/services/navigation/LaneDisplay.svelte b/src/lib/services/navigation/LaneDisplay.svelte index 5bd4396..ddb79a7 100644 --- a/src/lib/services/navigation/LaneDisplay.svelte +++ b/src/lib/services/navigation/LaneDisplay.svelte @@ -51,19 +51,19 @@ } :global(.lane-image > span) { - font-size: 2rem; + font-size: 1rem; font-weight: bold; color: #812020; } :global(.lane-image.active > span) { - font-size: 2rem; + font-size: 1rem; font-weight: bold; color: #ff0000; } :global(.lane-image.valid > span) { - font-size: 2rem; + font-size: 1rem; font-weight: bold; color: #cc2c2c; } diff --git a/src/lib/services/navigation/LanesDisplay.svelte b/src/lib/services/navigation/LanesDisplay.svelte index bc158a8..ebb66f4 100644 --- a/src/lib/services/navigation/LanesDisplay.svelte +++ b/src/lib/services/navigation/LanesDisplay.svelte @@ -14,7 +14,7 @@