improve home page & account footer
This commit is contained in:
parent
af078e7ba2
commit
6b2d0f5cbc
23 changed files with 551 additions and 36 deletions
|
|
@ -60,8 +60,8 @@
|
|||
);
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
if (url.searchParams.has('signedIn')) {
|
||||
url.searchParams.delete('signedIn');
|
||||
if (url.searchParams.has('signIn')) {
|
||||
url.searchParams.delete('signIn');
|
||||
window.history.replaceState({}, '', url);
|
||||
invalidateAll();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,35 @@
|
|||
import * as Card from '$lib/components/ui/card';
|
||||
import * as Table from '$lib/components/ui/table';
|
||||
import { Badge } from '$lib/components/ui/badge';
|
||||
import { getTimeBasedGreeting } from '$lib/utils';
|
||||
import { USER_DATA } from '$lib/stores/user-data';
|
||||
import SignInConfirmDialog from '$lib/components/self/SignInConfirmDialog.svelte';
|
||||
|
||||
let shouldSignIn = $state(false);
|
||||
</script>
|
||||
|
||||
<SignInConfirmDialog bind:open={shouldSignIn} />
|
||||
|
||||
<div class="container mx-auto p-6">
|
||||
<header class="mb-8">
|
||||
<h1 class="mb-2 text-4xl font-bold">Rugplay</h1>
|
||||
<p class="text-muted-foreground">A trading simulator</p>
|
||||
<h1 class="mb-2 text-3xl font-bold">
|
||||
{$USER_DATA ? getTimeBasedGreeting($USER_DATA?.name) : 'Welcome to Rugplay!'}
|
||||
</h1>
|
||||
<p class="text-muted-foreground">
|
||||
{#if $USER_DATA}
|
||||
Here's the market overview for today.
|
||||
{:else}
|
||||
You need to <button
|
||||
class="text-primary underline hover:cursor-pointer"
|
||||
onclick={() => (shouldSignIn = !shouldSignIn)}>sign in</button
|
||||
>
|
||||
or{' '}
|
||||
<button
|
||||
class="text-primary underline hover:cursor-pointer"
|
||||
onclick={() => (shouldSignIn = !shouldSignIn)}>create an account</button
|
||||
> to play.
|
||||
{/if}
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
|
|
|
|||
Reference in a new issue