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}
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
slot="main"
|
||||
let:style={s}
|
||||
let:class={c}
|
||||
class="p-4 sm:p-6 min-w-0 w-full flex flex-col min-h-full relative {c}"
|
||||
class="p-4 sm:p-6 min-w-0 w-full flex flex-col h-full relative {c}"
|
||||
style={s}
|
||||
class:max-w-6xl={$userSettings.newWidth}
|
||||
id="main"
|
||||
@@ -150,7 +150,7 @@
|
||||
taglines={$site.taglines}
|
||||
admins={$site.admins}
|
||||
version={$site.version}
|
||||
class="!pt-0"
|
||||
class=""
|
||||
/>
|
||||
{:else}
|
||||
<div class="h-64 w-full grid place-items-center">
|
||||
|
||||
+2
-10
@@ -16,6 +16,7 @@
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -38,16 +39,7 @@
|
||||
|
||||
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
||||
<header>
|
||||
<h1
|
||||
class="text-3xl font-bold flex items-center w-full justify-between flex-wrap"
|
||||
>
|
||||
Frontpage
|
||||
<span class="xl:hidden">
|
||||
<Button on:click={() => (sidebar = !sidebar)} size="square-md">
|
||||
<Icon src={ServerStack} size="16" mini />
|
||||
</Button>
|
||||
</span>
|
||||
</h1>
|
||||
<Header>Frontpage</Header>
|
||||
</header>
|
||||
<div class="flex items-center gap-2">
|
||||
<Location changeDefault selected={data.listingType} />
|
||||
|
||||
@@ -352,7 +352,10 @@ flex-wrap gap-4 sticky top-20 w-full box-border z-20 mt-4"
|
||||
/>
|
||||
{#if post.post_view.counts.comments > 5}
|
||||
<EndPlaceholder>
|
||||
You've viewed {post.post_view.counts.comments} comments.
|
||||
<span class="text-black dark:text-white font-bold">
|
||||
{post.post_view.counts.comments}
|
||||
</span>
|
||||
comments
|
||||
|
||||
<Button
|
||||
color="tertiary"
|
||||
|
||||
Reference in new issue
Block a user