Skip to content
Snippets Groups Projects
Commit 608c212b authored by Robert Kossessa's avatar Robert Kossessa Committed by Johannes Klatt
Browse files

WIP: Place topbar above sidebars

this time using margins, requires no modification of the original sidebar components
parent c62ee8a7
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ import './app.css'
<TopBar />
<NavSidebar>
<TransactionSidebar>
<main min-h-0 overflow-scroll>
<main mt-topbar min-h-0 overflow-scroll>
<RouterView />
</main>
</TransactionSidebar>
......
......@@ -30,7 +30,7 @@ const isMobile = useMediaQuery('(max-width: 768px)')
<template>
<SidebarProvider cookie-name="nav-sidebar" keyboard-shortcut="m">
<Sidebar collapsible="icon">
<SidebarContent>
<SidebarContent mt-topbar>
<SidebarGroup>
<SidebarMenu>
<template v-for="item in navItems" :key="item.title">
......
<template>
<div h-14 b-b bg-background>
<div h-topbar fixed z-20 w-full b-b bg-background>
<div flex justify-center gap-2 p-2>
<GlobalSearch />
<UserNav />
......
......@@ -4,7 +4,7 @@
<slot />
</SidebarInset>
<Sidebar collapsible="icon" side="right">
<SidebarHeader>
<SidebarHeader mt-topbar>
Placeholder
</SidebarHeader>
<SidebarContent>
......
......@@ -2,6 +2,8 @@ import { defineConfig, presetAttributify, presetUno } from 'unocss'
import { presetAnimations } from 'unocss-preset-animations'
import { presetShadcn } from 'unocss-preset-shadcn'
const TOPBAR_HEIGHT = '3.5rem'
export default defineConfig({
presets: [
presetUno(),
......@@ -23,6 +25,10 @@ export default defineConfig({
// Required for shadcn-vue's Sidebar
spacing: {
4: '1rem',
topbar: TOPBAR_HEIGHT,
},
height: {
topbar: TOPBAR_HEIGHT,
},
},
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment