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 {
|
import {
|
||||||
BuildingOffice2,
|
BuildingOffice2,
|
||||||
Calendar,
|
Calendar,
|
||||||
|
ChartBar,
|
||||||
ChatBubbleOvalLeftEllipsis,
|
ChatBubbleOvalLeftEllipsis,
|
||||||
Check,
|
Check,
|
||||||
Cog6Tooth,
|
Cog6Tooth,
|
||||||
EllipsisHorizontal,
|
EllipsisHorizontal,
|
||||||
Fire,
|
Fire,
|
||||||
Icon,
|
Icon,
|
||||||
|
InformationCircle,
|
||||||
Newspaper,
|
Newspaper,
|
||||||
NoSymbol,
|
NoSymbol,
|
||||||
PencilSquare,
|
PencilSquare,
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
import CommunityLink from './CommunityLink.svelte'
|
import CommunityLink from './CommunityLink.svelte'
|
||||||
import Expandable from '$lib/components/ui/Expandable.svelte'
|
import Expandable from '$lib/components/ui/Expandable.svelte'
|
||||||
import LabelStat from '$lib/components/ui/LabelStat.svelte'
|
import LabelStat from '$lib/components/ui/LabelStat.svelte'
|
||||||
|
import ShieldIcon from '../moderation/ShieldIcon.svelte'
|
||||||
|
|
||||||
export let community_view: CommunityView
|
export let community_view: CommunityView
|
||||||
export let moderators: CommunityModeratorView[] = []
|
export let moderators: CommunityModeratorView[] = []
|
||||||
@@ -215,15 +218,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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">
|
<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} />
|
<Markdown source={community_view.community.description} />
|
||||||
</Expandable>
|
</Expandable>
|
||||||
|
|
||||||
<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">
|
<div class="flex flex-row gap-4 flex-wrap">
|
||||||
<LabelStat
|
<LabelStat
|
||||||
label="Members"
|
label="Members"
|
||||||
@@ -240,7 +247,9 @@
|
|||||||
|
|
||||||
{#if moderators && moderators.length > 0}
|
{#if moderators && moderators.length > 0}
|
||||||
<Expandable>
|
<Expandable>
|
||||||
<span slot="title">Moderators</span>
|
<svelte:fragment slot="title">
|
||||||
|
<ShieldIcon width={15} filled /> Moderators
|
||||||
|
</svelte:fragment>
|
||||||
<div
|
<div
|
||||||
class="flex items-center -space-x-1 flex-wrap hover:space-x-1 transition-all
|
class="flex items-center -space-x-1 flex-wrap hover:space-x-1 transition-all
|
||||||
cursor-pointer"
|
cursor-pointer"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div
|
<div
|
||||||
class="!isolate fixed top-0 left-0 w-screen h-screen overflow-auto bg-black/50
|
class="!isolate fixed top-0 left-0 w-screen h-screen overflow-auto bg-black/50
|
||||||
flex flex-col z-[200] overscroll-contain"
|
flex flex-col z-[200] overscroll-contain"
|
||||||
transition:fade={{ duration: 200 }}
|
transition:fade={{ duration: 150 }}
|
||||||
on:click={() => history.back()}
|
on:click={() => history.back()}
|
||||||
>
|
>
|
||||||
<Button size="square-md" class="fixed z-[110] top-0 right-0 m-4">
|
<Button size="square-md" class="fixed z-[110] top-0 right-0 m-4">
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
height={400}
|
height={400}
|
||||||
src={$page.state.openImage}
|
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"
|
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}
|
{alt}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,10 +13,12 @@
|
|||||||
content: boolean
|
content: boolean
|
||||||
): string => {
|
): string => {
|
||||||
if (panel) {
|
if (panel) {
|
||||||
if (top) return '!pt-22'
|
if (top) {
|
||||||
else return '!pb-22 !pt-4'
|
if (content) return '!pt-20'
|
||||||
|
else return 'top-16'
|
||||||
|
} else return '!pb-20'
|
||||||
} else {
|
} else {
|
||||||
if (!content) return '!pt-4'
|
if (!content) return ''
|
||||||
|
|
||||||
if (top) return '!pt-24'
|
if (top) return '!pt-24'
|
||||||
else return '!pb-24'
|
else return '!pb-24'
|
||||||
@@ -35,6 +37,7 @@
|
|||||||
$userSettings.dock.top,
|
$userSettings.dock.top,
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
$: topPanel = $userSettings.dock.noGap && $userSettings.dock.top
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="shell {$$props.class}" style={colorsToVars($colors)}>
|
<div class="shell {$$props.class}" style={colorsToVars($colors)}>
|
||||||
@@ -43,7 +46,8 @@
|
|||||||
class="
|
class="
|
||||||
{$userSettings.dock.noGap ? '' : 'p-4 max-w-3xl left-1/2 -translate-x-1/2'}
|
{$userSettings.dock.noGap ? '' : 'p-4 max-w-3xl left-1/2 -translate-x-1/2'}
|
||||||
{$userSettings.dock.top ? 'top-0' : 'bottom-0'}
|
{$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;"
|
style="grid-area: navbar;"
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
@@ -57,18 +61,17 @@
|
|||||||
border-slate-200 dark:border-zinc-800 shadow-2xl
|
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
|
backdrop-blur-xl dark:backdrop-brightness-[25%] bg-[#ffffff]/75 dark:bg-transparent transition-colors duration-500
|
||||||
pointer-events-auto"
|
pointer-events-auto"
|
||||||
style="grid-area: navbar"
|
|
||||||
{title}
|
{title}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<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'
|
? 'limit-width'
|
||||||
: ''}"
|
: ''}"
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
name="sidebar"
|
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}"
|
{sidePadding}"
|
||||||
style="grid-area: sidebar; width: 100% !important;"
|
style="grid-area: sidebar; width: 100% !important;"
|
||||||
/>
|
/>
|
||||||
@@ -92,8 +95,8 @@
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: auto 1fr;
|
grid-template-rows: auto 1fr;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'content'
|
'navbar'
|
||||||
'navbar';
|
'content';
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@@ -109,7 +112,7 @@
|
|||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
.content {
|
.content {
|
||||||
grid-template-columns: min-content 2fr;
|
grid-template-columns: 14rem 2fr;
|
||||||
justify-items: end start;
|
justify-items: end start;
|
||||||
grid-template-areas: 'sidebar main';
|
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
|
<nav
|
||||||
class="flex flex-col p-4 overflow-auto
|
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}
|
style={$$props.style}
|
||||||
>
|
>
|
||||||
{#if $profile?.jwt}
|
{#if $profile?.jwt}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
slot="main"
|
slot="main"
|
||||||
let:style={s}
|
let:style={s}
|
||||||
let:class={c}
|
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}
|
style={s}
|
||||||
class:max-w-6xl={$userSettings.newWidth}
|
class:max-w-6xl={$userSettings.newWidth}
|
||||||
id="main"
|
id="main"
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
taglines={$site.taglines}
|
taglines={$site.taglines}
|
||||||
admins={$site.admins}
|
admins={$site.admins}
|
||||||
version={$site.version}
|
version={$site.version}
|
||||||
class="!pt-0"
|
class=""
|
||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="h-64 w-full grid place-items-center">
|
<div class="h-64 w-full grid place-items-center">
|
||||||
|
|||||||
+2
-10
@@ -16,6 +16,7 @@
|
|||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||||
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
|
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
|
||||||
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -38,16 +39,7 @@
|
|||||||
|
|
||||||
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
||||||
<header>
|
<header>
|
||||||
<h1
|
<Header>Frontpage</Header>
|
||||||
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>
|
</header>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<Location changeDefault selected={data.listingType} />
|
<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}
|
{#if post.post_view.counts.comments > 5}
|
||||||
<EndPlaceholder>
|
<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
|
<Button
|
||||||
color="tertiary"
|
color="tertiary"
|
||||||
|
|||||||
Reference in new issue
Block a user