fix: inconsistent padding with top nav

This commit is contained in:
Xylight committed 2024-05-06 16:59:49 -07:00
1 parent 8e6d705f2b
commit af1e4c8b70
8 files changed
+42 -30

No files matched your search

+2 -2
View File
@@ -29,7 +29,7 @@
<div
class="!isolate fixed top-0 left-0 w-screen h-screen overflow-auto bg-black/50
flex flex-col z-[200] overscroll-contain"
transition:fade={{ duration: 200 }}
transition:fade={{ duration: 150 }}
on:click={() => history.back()}
>
<Button size="square-md" class="fixed z-[110] top-0 right-0 m-4">
@@ -40,7 +40,7 @@
height={400}
src={$page.state.openImage}
class="w-full h-auto object-contain max-w-screen-sm mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900"
transition:scale={{ start: 0.9, easing: backOut }}
transition:scale={{ start: 0.95, easing: backOut, duration: 250 }}
{alt}
/>
</div>
+13 -10
View File
@@ -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';
}
@@ -0,0 +1,5 @@
<h1
class="text-2xl font-bold tracking-wider font-display flex items-center agp-1"
>
<slot />
</h1>
+1 -1
View File
@@ -30,7 +30,7 @@
<nav
class="flex flex-col p-4 overflow-auto
gap-1 h-screen {$$props.class}"
gap-1 h-fit max-h-screen {$$props.class}"
style={$$props.style}
>
{#if $profile?.jwt}