homepage and logo

This commit is contained in:
unurled 2025-06-24 20:32:26 +02:00
parent c9d982669a
commit ef6dadb148
12 changed files with 359 additions and 242 deletions

View file

@ -4,9 +4,10 @@
import NavUser from '@/components/NavUser.svelte';
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar';
import { type NavItem } from '@/types';
import { Link } from '@inertiajs/svelte';
import { Link, page } from '@inertiajs/svelte';
import { BookOpen, Folder, LayoutGrid } from 'lucide-svelte';
import AppLogo from './AppLogo.svelte';
import Button from './ui/button/button.svelte';
const mainNavItems: NavItem[] = [
{
@ -17,11 +18,6 @@
];
const footerNavItems: NavItem[] = [
{
title: 'Repository',
href: 'https://github.com/oseughu/svelte-starter-kit',
icon: Folder,
},
{
title: 'Admin Dashboard',
href: '/admin',
@ -36,9 +32,7 @@
<SidebarMenu>
<SidebarMenuItem>
<SidebarMenuButton size="lg">
<Link href={route('dashboard')}>
<AppLogo />
</Link>
<AppLogo />
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
@ -50,6 +44,12 @@
<SidebarFooter>
<NavFooter items={footerNavItems} class="mt-auto" />
<NavUser />
{#if $page.props.auth.user}
<NavUser />
{:else}
<Button>
<a href={route('auth.redirect')} class="flex items-center gap-2">Login</a>
</Button>
{/if}
</SidebarFooter>
</Sidebar>