From 751b46ff9c287b3f2b66dad76970d10e01614d2b Mon Sep 17 00:00:00 2001 From: Nathan Green Date: Sun, 20 Nov 2022 00:22:19 +0000 Subject: [PATCH] hide search box whilst viewing results --- frontend/src/routes/+page.svelte | 333 +++++++++++++++++++------------ frontend/tailwind.config.cjs | 3 + 2 files changed, 203 insertions(+), 133 deletions(-) diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 88d1079..d26e03f 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,5 +1,6 @@ + + bus fares. + -
+
-

bus fares.

-
-

get bus, but cheap.

-
- made with - - + {#if editSearch} +
+

bus fares.

+
+

get bus, but cheap.

+
+ made with + + + + by nathan :) +
+
+

okay, first, where to?

+
+
+ from +
+ - - by nathan :) -
-
-

okay, first, where to?

-
-
- from -
- -
-
-
- to -
- -
+
+
+
+ to +
+ +
-

great! now, when?

-
-
-
- {#if arriveBy} - - - - - {:else} +

great! now, when?

+
+
+
+ {#if arriveBy} + + + + + {:else} + + + + + {/if} +
+ +
+
+ + +
+
+ + +
+
+ +

and, finally...

+
+
- - + - {/if} +
+
- -
-
- - +
-
- - -
-
- -

and, finally...

-
-
- - - + {:else} +
+
journey from {from} to {to}, {arriveBy ? 'arriving by' : 'leaving at'} {date} {time}
+
+
+ + + +
+ +
+
- + {/if}
- -
- {#if tripPlan} - {#each tripPlan.plan.itineraries as itinerary, i} - - {#each itinerary.legs as leg, l} -

{new Date(leg.startTime).toLocaleString()}: {leg.mode} {leg.mode=='BUS'? '('+leg.routeShortName+' towards '+leg.headsign+')' : ''} from {leg.from.name} to {leg.to.name}

- {#if leg.fares} - itinerary {i+1} + {#each itinerary.legs as leg, l} +

{new Date(leg.startTime).toLocaleString()}: {leg.mode} {leg.mode=='BUS'? '('+leg.routeShortName+' towards '+leg.headsign+')' : ''} from {leg.from.name} to {leg.to.name}

+ {#if leg.fares} + + {/if} + {/each} {/each} - + {:else} +

no itineraries found

+ {/if} +
+ {:else} + {#if gettingPlan} + + + + {/if} - {/each} - {/each} - {:else} -

{tripPlanPlaceholder}

- {/if} + + {/if} +
+ {/key}
- + {#each mapLines as line}
\ No newline at end of file diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index 164fb18..f0a33eb 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -9,6 +9,9 @@ module.exports = { fontFamily: { 'sans': ['Manrope', defaultTheme.fontFamily.sans], }, + animation: { + 'spin-fast': 'spin .75s linear infinite', + } }, }, plugins: [