fix: inconsistent padding with top nav
This commit is contained in:
1 parent
8e6d705f2b
commit
af1e4c8b70
8 files changed
+42
-30
No files matched your search
@@ -13,10 +13,12 @@
|
||||
content: boolean
|
||||
): string => {
|
||||
if (panel) {
|
||||
if (top) return '!pt-22'
|
||||
else return '!pb-22 !pt-4'
|
||||
if (top) {
|
||||
if (content) return '!pt-20'
|
||||
else return 'top-16'
|
||||
} else return '!pb-20'
|
||||
} else {
|
||||
if (!content) return '!pt-4'
|
||||
if (!content) return ''
|
||||
|
||||
if (top) return '!pt-24'
|
||||
else return '!pb-24'
|
||||
@@ -35,6 +37,7 @@
|
||||
$userSettings.dock.top,
|
||||
false
|
||||
)
|
||||
$: topPanel = $userSettings.dock.noGap && $userSettings.dock.top
|
||||
</script>
|
||||
|
||||
<div class="shell {$$props.class}" style={colorsToVars($colors)}>
|
||||
@@ -43,7 +46,8 @@
|
||||
class="
|
||||
{$userSettings.dock.noGap ? '' : 'p-4 max-w-3xl left-1/2 -translate-x-1/2'}
|
||||
{$userSettings.dock.top ? 'top-0' : 'bottom-0'}
|
||||
w-full fixed z-50 pointer-events-none"
|
||||
{topPanel ? 'fixed top-0' : 'fixed'}
|
||||
w-full z-50 pointer-events-none"
|
||||
style="grid-area: navbar;"
|
||||
>
|
||||
<slot
|
||||
@@ -57,18 +61,17 @@
|
||||
border-slate-200 dark:border-zinc-800 shadow-2xl
|
||||
backdrop-blur-xl dark:backdrop-brightness-[25%] bg-[#ffffff]/75 dark:bg-transparent transition-colors duration-500
|
||||
pointer-events-auto"
|
||||
style="grid-area: navbar"
|
||||
{title}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="content md:divide-x divide-slate-200 dark:divide-zinc-900 min-h-screen {$userSettings.newWidth
|
||||
class="content divide-slate-200 dark:divide-zinc-900 min-h-screen {$userSettings.newWidth
|
||||
? 'limit-width'
|
||||
: ''}"
|
||||
>
|
||||
<slot
|
||||
name="sidebar"
|
||||
class="hidden md:flex sticky top-0 left-0 w-full max-w-full bg-slate-50 dark:bg-zinc-950
|
||||
class="hidden md:flex sticky top-0 left-0 w-full max-w-full h-max bg-slate-50 dark:bg-zinc-950
|
||||
{sidePadding}"
|
||||
style="grid-area: sidebar; width: 100% !important;"
|
||||
/>
|
||||
@@ -92,8 +95,8 @@
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
grid-template-areas:
|
||||
'content'
|
||||
'navbar';
|
||||
'navbar'
|
||||
'content';
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -109,7 +112,7 @@
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.content {
|
||||
grid-template-columns: min-content 2fr;
|
||||
grid-template-columns: 14rem 2fr;
|
||||
justify-items: end start;
|
||||
grid-template-areas: 'sidebar main';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user