diff --git a/src/app.css b/src/app.css index 55ed15e..34a745b 100644 --- a/src/app.css +++ b/src/app.css @@ -2,22 +2,39 @@ @import '@fontsource/metropolis'; @theme { - --pink: #d600a8; - --black: #000000; - --white: #ffffff; - --light-pink: #ff2ed2; - --teal: #00a7a8; - --yellow: #ffcb00; - --orange: #ec5d2a; - --green: #29e2a3; - --purple: #7900d6; - --bright-blue: #2235e2; - --dark-purple: #4d1b9b; + --color-black: #000000; + --color-blue-bright: #2235e2; + --color-green: #29e2a3; + --color-orange: #ec5d2a; + --color-pink: #d600a8; + --color-pink-light: #ff2ed2; + --color-purple: #7900d6; + --color-purple-dark: #4d1b9b; + --color-teal: #00a7a8; + --color-white: #ffffff; + --color-yellow: #ffcb00; --font-family-sans: Metropolis, Arial; } body { - background-color: var(--white); - color: var(--black); + background-color: var(--color-white); + color: var(--color-black); font-family: var(--font-family-sans); } + +.dev { + margin: 1rem; + outline: 2px dashed var(--color-teal); + padding: 1rem; +} + +.tile { outline-color: var(--color-blue-bright); } + +.list { outline-color: var(--color-purple); } + +.button { outline-color: var(--color-pink); } + +.inactive { + outline-color: var(--color-black); + font-style: italic; +} diff --git a/src/app.html b/src/app.html index 77a5ff5..ae678f9 100644 --- a/src/app.html +++ b/src/app.html @@ -6,6 +6,7 @@ %sveltekit.head% +
%sveltekit.body%
diff --git a/src/lib/components/footer.svelte b/src/lib/components/footer.svelte new file mode 100644 index 0000000..f7f4f2f --- /dev/null +++ b/src/lib/components/footer.svelte @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/src/lib/components/header.svelte b/src/lib/components/header.svelte new file mode 100644 index 0000000..6f0d479 --- /dev/null +++ b/src/lib/components/header.svelte @@ -0,0 +1,16 @@ + + +
+

+ Beacons Questionnaire +

+ + +
\ No newline at end of file diff --git a/src/lib/components/logic/dev.svelte.ts b/src/lib/components/logic/dev.svelte.ts new file mode 100644 index 0000000..3922845 --- /dev/null +++ b/src/lib/components/logic/dev.svelte.ts @@ -0,0 +1,15 @@ +let tileNum = $state(0); +export function setTileNum(num: number) { + tileNum = num; +} +export function getTileNum(): number { + return tileNum; +} + +let listNum = $state(0); +export function setListNum(num: number) { + listNum = num; +} +export function getListNum(): number { + return listNum; +} \ No newline at end of file diff --git a/src/lib/components/view/dash.svelte b/src/lib/components/view/dash.svelte new file mode 100644 index 0000000..2773642 --- /dev/null +++ b/src/lib/components/view/dash.svelte @@ -0,0 +1,83 @@ + + +
+
+

Dashboard View

+
+ +
+ {#await queryActions} +

Loading...

+ {:then result} + {#if result && result.data} + + {:else} + + {/if} + {:catch error} +

Error Getting Actions: {error.message}

+ {/await} + + {#await queryQuestions} +

Loading...

+ {:then result} + {#if result.data} + {#each getCategories(result.data) as category} + + {/each} + {:else} +

No categories found

+ {/if} + {:catch error} +

Error Getting Questions: {error.message}

+ {/await} +
+
\ No newline at end of file diff --git a/src/lib/components/view/detail.svelte b/src/lib/components/view/detail.svelte new file mode 100644 index 0000000..63b66a8 --- /dev/null +++ b/src/lib/components/view/detail.svelte @@ -0,0 +1,21 @@ + + +
+
+

Detail View

+ + +
+ +
+
+
\ No newline at end of file diff --git a/src/lib/components/view/list.svelte b/src/lib/components/view/list.svelte new file mode 100644 index 0000000..95e84b9 --- /dev/null +++ b/src/lib/components/view/list.svelte @@ -0,0 +1,30 @@ + + +
+
+

List View

+ + +
+ +
+ {#each [...Array(entries)] as _, i} + + {/each} +
+
\ No newline at end of file diff --git a/src/lib/types/ui.ts b/src/lib/types/ui.ts new file mode 100644 index 0000000..ab50f4f --- /dev/null +++ b/src/lib/types/ui.ts @@ -0,0 +1,7 @@ +export interface ActionCheck { + isError: boolean; + exist: boolean; + count: number; +} + +export type View = "dash" | "list" | "detail"; \ No newline at end of file diff --git a/src/lib/utils/random.ts b/src/lib/utils/random.ts new file mode 100644 index 0000000..29d745c --- /dev/null +++ b/src/lib/utils/random.ts @@ -0,0 +1,3 @@ +export function randomNum() { + return Math.ceil(Math.random() * 10); +} \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b93e9ba..d84e25e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,7 +1,33 @@ +
+ {@render children()} + +