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
@@ -25,12 +25,14 @@
|
||||
import {
|
||||
BuildingOffice2,
|
||||
Calendar,
|
||||
ChartBar,
|
||||
ChatBubbleOvalLeftEllipsis,
|
||||
Check,
|
||||
Cog6Tooth,
|
||||
EllipsisHorizontal,
|
||||
Fire,
|
||||
Icon,
|
||||
InformationCircle,
|
||||
Newspaper,
|
||||
NoSymbol,
|
||||
PencilSquare,
|
||||
@@ -41,6 +43,7 @@
|
||||
import CommunityLink from './CommunityLink.svelte'
|
||||
import Expandable from '$lib/components/ui/Expandable.svelte'
|
||||
import LabelStat from '$lib/components/ui/LabelStat.svelte'
|
||||
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
||||
|
||||
export let community_view: CommunityView
|
||||
export let moderators: CommunityModeratorView[] = []
|
||||
@@ -215,15 +218,19 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex flex-col divide-y divide-slate-300 dark:divide-zinc-800 [&>*]:py-3"
|
||||
class="flex flex-col divide-y divide-slate-200 dark:divide-zinc-800 [&>*]:py-3"
|
||||
>
|
||||
<Expandable class="!pt-0">
|
||||
<span slot="title">About</span>
|
||||
<svelte:fragment slot="title">
|
||||
<Icon src={InformationCircle} size="15" mini /> About
|
||||
</svelte:fragment>
|
||||
<Markdown source={community_view.community.description} />
|
||||
</Expandable>
|
||||
|
||||
<Expandable>
|
||||
<span slot="title">Stats</span>
|
||||
<svelte:fragment slot="title">
|
||||
<Icon src={ChartBar} size="15" mini /> Stats
|
||||
</svelte:fragment>
|
||||
<div class="flex flex-row gap-4 flex-wrap">
|
||||
<LabelStat
|
||||
label="Members"
|
||||
@@ -240,7 +247,9 @@
|
||||
|
||||
{#if moderators && moderators.length > 0}
|
||||
<Expandable>
|
||||
<span slot="title">Moderators</span>
|
||||
<svelte:fragment slot="title">
|
||||
<ShieldIcon width={15} filled /> Moderators
|
||||
</svelte:fragment>
|
||||
<div
|
||||
class="flex items-center -space-x-1 flex-wrap hover:space-x-1 transition-all
|
||||
cursor-pointer"
|
||||
|
||||
@@ -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 +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>
|
||||
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user