diff --git a/src/app.css b/src/app.css index 35840cd..122c8d9 100644 --- a/src/app.css +++ b/src/app.css @@ -9,17 +9,20 @@ @apply border-2 border-black rounded-md; } + .hovers-static { + box-shadow: 2px 2px 0 #000000; + -webkit-box-shadow: 2px 2px 0px 0px #000000; + } + .hovers { box-shadow: 2px 2px 0 #000000; -webkit-box-shadow: 2px 2px 0px 0px #000000; - @apply transform duration-200; } .hovers:focus, .hovers:hover { - box-shadow: 4px 4px 0 #000000; - -webkit-box-shadow: 4px 4px 0px 0px #000000; - @apply scale-105; + box-shadow: 3px 3px 0 #000000; + -webkit-box-shadow: 3px 3px 0px 0px #000000; } } diff --git a/src/lib/Foundation.svelte b/src/lib/Foundation.svelte index e99a5d1..a0f0d9a 100644 --- a/src/lib/Foundation.svelte +++ b/src/lib/Foundation.svelte @@ -1,7 +1,5 @@ @@ -20,10 +25,16 @@ on:click={onClick} class:default={theme === ButtonTheme.default} class:defaultToggled={isToggled(ButtonTheme.default)} - class:alert={theme === ButtonTheme.alert} - class:alertToggled={isToggled(ButtonTheme.alert)} - class="px-3 py-1 rounded brutal hovers font-bold font-display outline-none"> - {text} + class:primary={theme === ButtonTheme.primary} + class:primaryToggled={isToggled(ButtonTheme.primary)} + class="{padding} rounded brutal {!flat && 'hovers'} font-bold font-display outline-none"> + {#if icon && !selected} + {text} + {/if} + {#if selectedIcon && selected} + {text} + {/if} + \ No newline at end of file diff --git a/src/lib/foundation/Card.svelte b/src/lib/foundation/Card.svelte index 14070e1..b4670b5 100644 --- a/src/lib/foundation/Card.svelte +++ b/src/lib/foundation/Card.svelte @@ -1,10 +1,9 @@
-
+
\ No newline at end of file diff --git a/src/lib/foundation/Chooser.svelte b/src/lib/foundation/Chooser.svelte new file mode 100644 index 0000000..104237f --- /dev/null +++ b/src/lib/foundation/Chooser.svelte @@ -0,0 +1,43 @@ + + + dropdownHidden = true} /> + +
{}} on:keypress={() => {}}> + +
+
Choose a category:
+ {#each options as option} + + {/each} +
+
+ + \ No newline at end of file diff --git a/src/lib/foundation/Image.svelte b/src/lib/foundation/Image.svelte index be4f452..ca0e19f 100644 --- a/src/lib/foundation/Image.svelte +++ b/src/lib/foundation/Image.svelte @@ -1,7 +1,9 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/lib/foundation/Text.svelte b/src/lib/foundation/Text.svelte index 815e894..0705d52 100644 --- a/src/lib/foundation/Text.svelte +++ b/src/lib/foundation/Text.svelte @@ -41,7 +41,7 @@ } div.smallauto { - @apply text-xs; + @apply text-sm; @apply lg:text-lg; } diff --git a/src/lib/foundation/button.ts b/src/lib/foundation/button.ts new file mode 100644 index 0000000..2b6a091 --- /dev/null +++ b/src/lib/foundation/button.ts @@ -0,0 +1,9 @@ +export enum ButtonTheme { + default, + primary +} + +export enum ButtonSize { + normal, + small +} \ No newline at end of file diff --git a/src/lib/foundation/buttonTheme.ts b/src/lib/foundation/buttonTheme.ts deleted file mode 100644 index a68b498..0000000 --- a/src/lib/foundation/buttonTheme.ts +++ /dev/null @@ -1,6 +0,0 @@ -enum ButtonTheme { - default, - alert -} - -export default ButtonTheme; \ No newline at end of file diff --git a/src/lib/icons/eye-off.svg b/src/lib/icons/eye-off.svg new file mode 100644 index 0000000..c295e68 --- /dev/null +++ b/src/lib/icons/eye-off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/lib/icons/eye.svg b/src/lib/icons/eye.svg new file mode 100644 index 0000000..c731d33 --- /dev/null +++ b/src/lib/icons/eye.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/lib/layout/Header.svelte b/src/lib/layout/Header.svelte index 3b0913e..5132870 100644 --- a/src/lib/layout/Header.svelte +++ b/src/lib/layout/Header.svelte @@ -1,33 +1,22 @@ - - -
+
- - - {#if title} - {title} - {:else} -

PVD Things

- {/if} +

PVD Things

\ No newline at end of file diff --git a/src/lib/things/Scroller.svelte b/src/lib/things/Scroller.svelte index 4d5fc91..4cb7d7f 100644 --- a/src/lib/things/Scroller.svelte +++ b/src/lib/things/Scroller.svelte @@ -1,11 +1,14 @@ -
+
{#each things as thing} {/each} diff --git a/src/lib/things/Thing.svelte b/src/lib/things/Thing.svelte index 3c176a7..e3ba325 100644 --- a/src/lib/things/Thing.svelte +++ b/src/lib/things/Thing.svelte @@ -2,18 +2,25 @@ import { Card, Image, Text } from "$lib/Foundation.svelte"; export let thing; + + let className = ""; + export { className as class }; + + const donateURL = `https://airtable.com/shrwMSrzvSLpQgQWC?prefill_Description=${encodeURIComponent(thing.name)}`; -
- - {thing.name} +
+ + {thing.name} -
+
{thing.name}
-
- {thing.stock > 0 ? `${thing.stock} in stock` : 'Wish List'} -
+ {#if thing.stock > 0} +
Available
+ {:else} + Donate + {/if}
\ No newline at end of file diff --git a/src/lib/things/Things.svelte b/src/lib/things/Things.svelte index abb2d06..7a9e8d0 100644 --- a/src/lib/things/Things.svelte +++ b/src/lib/things/Things.svelte @@ -4,22 +4,25 @@ export let things; export let categories; + export let shownCategory;
{#key things} - {#each categories as category} - {@const filteredThings = filterByCategory(things, category)} - {#if filteredThings.length > 0} -
-
- {category} + {#if shownCategory} + + {:else} + {#each categories as category} + {@const filteredThings = filterByCategory(things, category)} + {#if filteredThings.length > 0} +
+
+ {category} +
+
- -
- {/if} - {/each} + {/if} + {/each} + {/if} {/key}
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 71a18c3..f14017e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,50 +1,69 @@ -
+
{#if !data} {:else} -
+
+
+ + {#key showingOnlyWishList} + + {/key} +
-
- {#key showingOnlyWishList} -
- +
+ +
{/if}
\ No newline at end of file