diff --git a/.storybook/preview.css b/.storybook/preview.css index 4e7ba75..a31e444 100644 --- a/.storybook/preview.css +++ b/.storybook/preview.css @@ -1,4 +1,3 @@ @import 'tailwindcss/base'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities'; -@import '@flaticon/flaticon-uicons/css/all/all'; diff --git a/messages/en.json b/messages/en.json index 0deea6c..efe0d28 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,6 +1,9 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", "nav_greeting": "Hello {name}!", + "nav_menu_sms": "SMS", + "nav_menu_settings": "Settings", + "nav_menu_logout": "Logout", "login_tab_login": "Login", "login_tab_register": "Register", "login_label_email": "Email", diff --git a/src/lib/components/DataInput/TextInput.svelte b/src/lib/components/DataInput/TextInput.svelte index b91d6cf..816dab8 100644 --- a/src/lib/components/DataInput/TextInput.svelte +++ b/src/lib/components/DataInput/TextInput.svelte @@ -1,26 +1,23 @@ - + + {#if typeof end === 'string'} {end} {:else} diff --git a/src/lib/components/Navigation/Navbar/Navbar.stories.svelte b/src/lib/components/Navigation/Navbar/Navbar.stories.svelte index d9fa299..0b35c92 100644 --- a/src/lib/components/Navigation/Navbar/Navbar.stories.svelte +++ b/src/lib/components/Navigation/Navbar/Navbar.stories.svelte @@ -8,4 +8,20 @@ }); - + + + {#snippet start()} + Home + {/snippet} + {#snippet center()} + Title + {/snippet} + {#snippet end()} + + + UI + + + {/snippet} + + diff --git a/src/lib/components/Navigation/Navbar/Navbar.svelte b/src/lib/components/Navigation/Navbar/Navbar.svelte index ce41227..ad57fe6 100644 --- a/src/lib/components/Navigation/Navbar/Navbar.svelte +++ b/src/lib/components/Navigation/Navbar/Navbar.svelte @@ -1,18 +1,11 @@ - Hestia - {title} - {message} - + {@render start?.()} + {@render center?.()} + {@render end?.()} - - diff --git a/src/lib/server/auth/index.ts b/src/lib/server/auth/index.ts index e628e58..6e60334 100644 --- a/src/lib/server/auth/index.ts +++ b/src/lib/server/auth/index.ts @@ -74,6 +74,6 @@ export async function validateSession({ locals }: ServerLoadEvent) { } return { - user: { name: user.name }, + user: { name: user.name, hasImage: clerkUser.hasImage, imageUrl: clerkUser.imageUrl }, }; } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 3542e54..d2e1c32 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -9,15 +9,15 @@ - - {@render children()} - + + + {@render children()} + + - - - + diff --git a/src/routes/app/+layout.svelte b/src/routes/app/+layout.svelte index a01f36b..4ea34d0 100644 --- a/src/routes/app/+layout.svelte +++ b/src/routes/app/+layout.svelte @@ -1,15 +1,18 @@ - +{#snippet userMenu()} + + + + + {#if data.user.hasImage} + + {:else} + {data.user.name.at(0)} + {/if} + + + + + + + goto('/app/sms')} + > {messages.nav_menu_sms()} + + {messages.nav_menu_logout()} + + +{/snippet} + + + {#snippet start()} + goto('/app')}> + Hestia + + {/snippet} + {#snippet center()} + Svelte + {/snippet} + {#snippet end()} + + {message} + {@render userMenu()} + + {/snippet} + {@render children()} diff --git a/src/routes/app/+page.svelte b/src/routes/app/+page.svelte index e3cf09f..0fbba99 100644 --- a/src/routes/app/+page.svelte +++ b/src/routes/app/+page.svelte @@ -1,4 +1,2 @@ - -SMS
{message}