Skip to content

Commit

Permalink
enhanced styling and new menu items in Sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
kjubik committed Jun 28, 2023
1 parent 653f48a commit f5ef330
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
19 changes: 14 additions & 5 deletions odyseja-ui/src/routes/panel/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<!-- src/components/Sidebar.svelte -->
<script>
import {logout} from "../../authService";
import {AppBar, AppShell, LightSwitch, Toast} from "@skeletonlabs/skeleton";
import {AppShell, Toast} from "@skeletonlabs/skeleton";
import Navigation from "$lib/Navigation/Navigation.svelte";
import logo from '$lib/assets/logo.png'
import Icon from '@iconify/svelte'
const menuItems = [
{ label: 'Panel główny', route: '/panel', icon: 'ic:round-space-dashboard'},
{ label: 'Harmonogram', route: '/panel/timetable', icon: 'ic:round-calendar-view-month' },
{ label: 'Problemy', route: '/panel/problem', icon: 'ic:round-format-list-bulleted' },
];
</script>

<Toast />

<AppShell slotSidebarLeft="bg-surface-500/5 w-64 p-4">
<AppShell slotSidebarLeft="bg-surface-500/5 w-64 p-4 mx-4 my-4 outline rounded-lg">

<div class="p-6">
<slot />
Expand All @@ -26,11 +28,18 @@
<span class="text-2xl font-semibold text-primary-600">Odyseja Umysłu</span>
</a>
</div>

<Navigation menuItems={menuItems} />
<button type="button" class="btn btn-sm variant-filled-primary" on:click={logout}>
Logout

<hr class="h-px my-4 ">
<button on:click={logout} class="py-2 rounded-lg hover:bg-orange-400/20">
<div class="flex ml-2 items-center">
<div class="bg-orange-400 h-9 w-9 rounded-full mr-3 flex justify-center items-center">
<Icon icon="ic:round-log-out" class="text-white text-2xl"/>
</div>
<span class="text-md font-semibold mb-1">Wyloguj</span>
</div>
</button>
<LightSwitch class=""/>
</div>
</svelte:fragment>
</AppShell>
7 changes: 6 additions & 1 deletion odyseja-ui/src/routes/panel/+page.svelte
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
panel
<script>
import {LightSwitch} from "@skeletonlabs/skeleton";
</script>

<span class="dark:text-blue-950">widać mnie, nie widać mnie</span>
<LightSwitch></LightSwitch>

0 comments on commit f5ef330

Please sign in to comment.