diff --git a/src/app.html b/src/app.html index 83c1951..dcf03f9 100644 --- a/src/app.html +++ b/src/app.html @@ -1,12 +1,12 @@ - - - - - - - %sveltekit.head% - - -
%sveltekit.body%
- + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ diff --git a/src/app.pcss b/src/app.postcss similarity index 100% rename from src/app.pcss rename to src/app.postcss diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 6c6fb33..503108b 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,11 +1,44 @@ +{#if typeof globalvars.user !== 'undefined' } + {#each alertsvar as alert, i} + + {/each} +{/if} + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index deedc03..0e18dde 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,9 +1,22 @@ \ No newline at end of file + onMount(async () => { + if(typeof globalvars.user === 'undefined') { + goto("/account/login"); + } + }); + + + +{#if typeof globalvars.user !== 'undefined'} +

Welcome {globalvars.user.name}

+{/if} \ No newline at end of file diff --git a/src/routes/account/+layout.svelte b/src/routes/account/+layout.svelte index 9beaf55..527d9ff 100644 --- a/src/routes/account/+layout.svelte +++ b/src/routes/account/+layout.svelte @@ -1,20 +1,23 @@

Blackbird Chess

- {#each alertsvar as alert, i} - - {/each} - - + {#if typeof globalvars.user == 'undefined' } + {#each alertsvar as alert, i} + + {/each} + {/if} +
+ +
@@ -23,9 +26,11 @@ \ No newline at end of file diff --git a/src/routes/account/login/Login.svelte b/src/routes/account/login/Login.svelte index 75fa568..35aee88 100644 --- a/src/routes/account/login/Login.svelte +++ b/src/routes/account/login/Login.svelte @@ -3,7 +3,7 @@