From 512c77e81cd0b17174c93a00e4deade97e7cf7bf Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 7 Jul 2024 21:02:10 +0100 Subject: [PATCH] Replace homescreen 'islands' with 'cards' and remove now unused 'island' components --- src/lib/buttons/LinkButton.svelte | 9 ++- src/lib/buttons/ScriptButton.svelte | 2 +- src/lib/cards/Card.svelte | 8 ++- src/lib/cards/LookupCard.svelte | 3 +- src/lib/cards/QuickLinkCard.svelte | 2 +- src/lib/islands/input-island-form.svelte | 47 --------------- src/lib/islands/near-to-me-island.svelte | 74 ------------------------ src/lib/islands/quick-link-island.svelte | 54 ----------------- src/routes/+page.svelte | 47 +++++++-------- 9 files changed, 37 insertions(+), 209 deletions(-) delete mode 100644 src/lib/islands/input-island-form.svelte delete mode 100644 src/lib/islands/near-to-me-island.svelte delete mode 100644 src/lib/islands/quick-link-island.svelte diff --git a/src/lib/buttons/LinkButton.svelte b/src/lib/buttons/LinkButton.svelte index c2b98ef..e8168ca 100644 --- a/src/lib/buttons/LinkButton.svelte +++ b/src/lib/buttons/LinkButton.svelte @@ -11,12 +11,15 @@ border: none; border-radius: 20px; text-decoration: none; - margin: 5px; + margin: auto; + margin-top: 5px; + margin-bottom: 5px; background-color: var(--island-button-color); font-family: urwgothic, "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif; - padding: 5px 10px; + padding: 5px 25px; min-width: 40px; - height: 25px; + width: fit-content; + height: 22px; font-size: 16px; font-weight: 400; box-shadow: var(--box-shadow); diff --git a/src/lib/buttons/ScriptButton.svelte b/src/lib/buttons/ScriptButton.svelte index 12e76c8..56dd6db 100644 --- a/src/lib/buttons/ScriptButton.svelte +++ b/src/lib/buttons/ScriptButton.svelte @@ -18,7 +18,7 @@ background-color: var(--island-button-color); padding: 20px 20px; min-width: 40px; - height: 35px; + height: 22px; font-size: 16px; font-weight: 400; box-shadow: var(--box-shadow); diff --git a/src/lib/cards/Card.svelte b/src/lib/cards/Card.svelte index 352a904..580bac9 100644 --- a/src/lib/cards/Card.svelte +++ b/src/lib/cards/Card.svelte @@ -35,16 +35,20 @@ width: 85%; max-width: 400px; margin: auto; - margin-top: 25px; - padding: 10px; + margin-top: 20px; + margin-bottom: 10px; + padding: 10px 5px 5px 5px; background-color: var(--island-bg-color); border-radius: 10px; box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.29); + min-height: 75px; } .header { color: var(--island-header-color); + font-size: 14px; display: flex; + margin: 0; width: 100%; justify-content: center; align-items: center; diff --git a/src/lib/cards/LookupCard.svelte b/src/lib/cards/LookupCard.svelte index 0433b5e..88b9c86 100644 --- a/src/lib/cards/LookupCard.svelte +++ b/src/lib/cards/LookupCard.svelte @@ -24,6 +24,7 @@ diff --git a/src/lib/islands/near-to-me-island.svelte b/src/lib/islands/near-to-me-island.svelte deleted file mode 100644 index 88670da..0000000 --- a/src/lib/islands/near-to-me-island.svelte +++ /dev/null @@ -1,74 +0,0 @@ - - - - {#if !$location} -

Coming Soon

- - {:else if $location} - {#await getNearestStations()} -

Fetching Location

- {:then stations} -
- {#each stations as station} - {station.NLCDESC} - {station.miles}mi - {/each} -
- {:catch err} -

Error: {err.message}

- {/await} - {/if} -
- - diff --git a/src/lib/islands/quick-link-island.svelte b/src/lib/islands/quick-link-island.svelte deleted file mode 100644 index 203ccec..0000000 --- a/src/lib/islands/quick-link-island.svelte +++ /dev/null @@ -1,54 +0,0 @@ - - - - {#if $ql.length === 0} -

Go to settings to add your Quick Links

- {/if} -
- {#each $ql as link} - {#if link.length === 3} - - {link.toUpperCase()} - - {:else if link.length === 4} - - {link.toUpperCase()} - - {/if} - {/each} -
-
- - diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index c4321d7..74825e3 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,36 +1,35 @@ -{#if showWelcome && ($welcome === "null" || !$welcome || parseInt($welcome.replace(/\./g, "")) < parseInt(version.replace(/\./g, "")))} - -{/if}
- -{#each inputIslands as variables} - +{#each lookupCards as config} + {/each} - - + +