design: redesign community/site cards on desktop

This commit is contained in:
James Xylight committed 2025-08-30 20:55:24 -07:00
1 parent 10aed8559e
commit eee9621afe
11 files changed
+299 -252

No files matched your search

+89 -81
View File
@@ -6,13 +6,19 @@
import { settings } from '$lib/settings.svelte' import { settings } from '$lib/settings.svelte'
import type { PersonView, SiteView, Tagline } from 'lemmy-js-client' import type { PersonView, SiteView, Tagline } from 'lemmy-js-client'
import { Badge } from 'mono-svelte' import { Badge } from 'mono-svelte'
import { Icon, ServerStack } from 'svelte-hero-icons' import {
import Link from '../input/Link.svelte' BuildingOffice,
Icon,
Newspaper,
ServerStack,
} from 'svelte-hero-icons'
import type { ClassValue, HTMLAttributes } from 'svelte/elements'
import EndPlaceholder from '../ui/EndPlaceholder.svelte'
import Expandable from '../ui/Expandable.svelte' import Expandable from '../ui/Expandable.svelte'
import LabelStat from '../ui/LabelStat.svelte' import LabelStat from '../ui/LabelStat.svelte'
import SidebarButton from '../ui/sidebar/SidebarButton.svelte'
import ItemList from './generic/ItemList.svelte' import ItemList from './generic/ItemList.svelte'
import { optimizeImageURL } from './post/helpers' import { optimizeImageURL } from './post/helpers'
import type { ClassValue, HTMLAttributes } from 'svelte/elements'
interface Props extends HTMLAttributes<HTMLDivElement> { interface Props extends HTMLAttributes<HTMLDivElement> {
site: SiteView site: SiteView
@@ -38,10 +44,7 @@
]} ]}
> >
{#if site.site.banner} {#if site.site.banner}
<div <div class="rounded-xl bg-slate-100 dark:bg-zinc-925">
class="rounded-xl
bg-slate-100 dark:bg-zinc-925"
>
<img <img
src={optimizeImageURL(site.site.banner, 512)} src={optimizeImageURL(site.site.banner, 512)}
alt="Site banner" alt="Site banner"
@@ -50,8 +53,10 @@
/> />
</div> </div>
{/if} {/if}
<Avatar width={32} url={site.site.icon} alt="" circle={false} /> <div class="mx-3 space-y-3">
<h2 class="font-medium text-lg -my-2">{site.site.name}</h2> <Avatar width={32} url={site.site.icon} alt="" circle={false} />
<h2 class="font-medium text-lg -my-2">{site.site.name}</h2>
</div>
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
{#if taglines && taglines.length > 0} {#if taglines && taglines.length > 0}
<Markdown <Markdown
@@ -60,85 +65,88 @@
/> />
{/if} {/if}
<hr class="border-slate-200 dark:border-zinc-900 my-1" /> <EndPlaceholder size="xs" margin="sm">
<Expandable bind:open={settings.expand.about}> {$t('nav.menu.instance')}
{#snippet title()} </EndPlaceholder>
<span class="flex items-center gap-1 py-1 px-2 w-full"> <SidebarButton
{$t('cards.site.about')} href="/modlog"
</span> label={$t('routes.modlog.title')}
{/snippet} icon={Newspaper}
<Markdown source={site.site.description} /> />
<div class="my-4"></div> <SidebarButton
<Markdown source={site.site.sidebar} /> href="/legal"
label={$t('routes.legal.title')}
icon={BuildingOffice}
/>
<SidebarButton
href="/instances"
label={$t('routes.instances')}
icon={ServerStack}
/>
{#if version} <EndPlaceholder size="xs" margin="sm">
<div class="w-max"> {$t('cards.site.stats')}
<Badge label="Lemmy version"> </EndPlaceholder>
<Icon src={ServerStack} micro size="14" /> <div class="flex flex-row gap-4 flex-wrap px-3">
{version} <LabelStat
</Badge> label={$t('content.users')}
</div> content={site.counts.users.toString()}
{/if} formatted
</Expandable> />
<LabelStat
label={$t('content.posts')}
content={site.counts.posts.toString()}
formatted
/>
<LabelStat
label={$t('content.communities')}
content={site.counts.communities.toString()}
formatted
/>
</div>
<hr class="border-slate-200 dark:border-zinc-900 my-1" /> <EndPlaceholder size="xs" margin="sm">
<Expandable bind:open={settings.expand.stats}> {$t('common.info')}
{#snippet title()} </EndPlaceholder>
<span class="flex items-center gap-1 py-1 px-2 w-full"> <div class="space-y-3 px-1.5 text-sm">
{$t('cards.site.stats')} <Expandable bind:open={settings.expand.about}>
</span>
{/snippet}
<div class="flex flex-row gap-4 flex-wrap">
<LabelStat
label={$t('content.users')}
content={site.counts.users.toString()}
formatted
/>
<LabelStat
label={$t('content.posts')}
content={site.counts.posts.toString()}
formatted
/>
<LabelStat
label={$t('content.communities')}
content={site.counts.communities.toString()}
formatted
/>
</div>
</Expandable>
{#if admins}
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
<Expandable bind:open={settings.expand.team}>
{#snippet title()} {#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full"> <span class="flex items-center gap-1 py-1 px-2 w-full">
{$t('cards.site.admins')} {$t('cards.site.about')}
</span> </span>
{/snippet} {/snippet}
<ItemList <Markdown source={site.site.description} />
items={admins.map(i => ({ <div class="my-4"></div>
id: i.person.id, <Markdown source={site.site.sidebar} />
name: i.person.display_name || i.person.name,
url: userLink(i.person),
avatar: i.person.avatar,
instance: new URL(i.person.actor_id).hostname,
}))}
/>
</Expandable>
{/if}
<div class="flex flex-row flex-wrap gap-1 my-2 text-xs"> {#if version}
<Link highlight href="/modlog"> <div class="w-max">
{$t('routes.modlog.title')} <Badge label="Lemmy version">
</Link> <Icon src={ServerStack} micro size="14" />
• {version}
<Link highlight href="/legal"> </Badge>
{$t('routes.legal.title')} </div>
</Link> {/if}
• </Expandable>
<Link highlight href="/instances">
{$t('routes.instances')} {#if admins}
</Link> <Expandable bind:open={settings.expand.team}>
{#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full">
{$t('cards.site.admins')}
</span>
{/snippet}
<ItemList
items={admins.map(i => ({
id: i.person.id,
name: i.person.display_name || i.person.name,
url: userLink(i.person),
avatar: i.person.avatar,
instance: new URL(i.person.actor_id).hostname,
}))}
/>
</Expandable>
{/if}
</div> </div>
</div> </div>
</aside> </aside>
@@ -104,8 +104,11 @@
Newspaper, Newspaper,
NoSymbol, NoSymbol,
Plus, Plus,
ShieldCheck,
} from 'svelte-hero-icons' } from 'svelte-hero-icons'
import ItemList from '../generic/ItemList.svelte' import ItemList from '../generic/ItemList.svelte'
import EndPlaceholder from '$lib/components/ui/EndPlaceholder.svelte'
import SidebarButton from '$lib/components/ui/sidebar/SidebarButton.svelte'
let loading = $state({ let loading = $state({
blocking: false, blocking: false,
@@ -156,64 +159,188 @@
{:then community_view} {:then community_view}
<aside <aside
class={[ class={[
'min-w-full pt-0 text-slate-600 dark:text-zinc-400 flex flex-col gap-4 text-sm', 'min-w-full pt-0 text-slate-600 dark:text-zinc-400 flex flex-col gap-1',
clazz, clazz,
]} ]}
> >
<Entity <div class="px-3 overflow-hidden">
name={community_view.community.title} <Entity
label="!{fullCommunityName( name={community_view.community.title}
community_view.community.name, label="!{fullCommunityName(
community_view.community.actor_id, community_view.community.name,
)}" community_view.community.actor_id,
> )}"
{#snippet customIcon()} >
<Avatar {#snippet customIcon()}
width={32} <Avatar
url={community_view.community.icon} width={32}
alt={community_view.community.name} url={community_view.community.icon}
circle={false} alt={community_view.community.name}
circle={false}
/>
{/snippet}
</Entity>
</div>
<EndPlaceholder size="xs" margin="sm">
{$t('form.post.community')}
</EndPlaceholder>
{#if profile.current?.jwt}
{@const subscribed = profile.current.user?.follows.some(
i => i.community.id == community_view.community.id,
)}
<Button
disabled={loading.subscribing}
loading={loading.subscribing}
size="md"
rounding="xl"
color={subscribed ? 'secondary' : 'primary'}
onclick={() => subscribe(community_view)}
class="px-4 relative z-[inherit]"
alignment="left"
>
{#snippet prefix()}
<Icon
src={community_view.subscribed == 'Subscribed' ? Check : Plus}
mini
size="16"
/>
{/snippet}
{subscribed
? $t('cards.community.subscribed')
: $t('cards.community.subscribe')}
</Button>
{/if}
{#if profile.current?.user && amMod(profile.current.user, community_view.community)}
<SidebarButton
href="/c/{fullCommunityName(
community_view.community.name,
community_view.community.actor_id,
)}/settings"
rounding="xl"
icon={Cog6Tooth}
label={$t('routes.profile.edit')}
/>
{/if}
<Menu placement="bottom-start">
{#snippet target(attachment)}
<SidebarButton
{@attach attachment}
label={$t('post.actions.more.label')}
rounding="xl"
icon={EllipsisHorizontal}
/> />
{/snippet} {/snippet}
</Entity> <MenuButton href="/modlog?community={community_view.community.id}">
<Icon src={Newspaper} size="16" mini />
{$t('cards.community.modlog')}
</MenuButton>
{#if profile.current?.jwt}
{#if profile.current.user && amMod(profile.current.user, community_view.community)}
<MenuButton
color="success-subtle"
href="/moderation?community={community_view.community.id}"
>
<Icon src={ShieldCheck} size="16" micro />
{$t('routes.moderation.feed')}
</MenuButton>
{/if}
<MenuButton
color="danger-subtle"
size="lg"
onclick={() =>
block(community_view.community.id, !community_view.blocked)}
>
{#snippet prefix()}
<Icon src={NoSymbol} size="16" mini />
{/snippet}
{community_view.blocked
? $t('cards.community.unblock')
: $t('cards.community.block')}
</MenuButton>
{#if profile.current?.user}
<MenuButton
color="danger-subtle"
size="lg"
onclick={() => blockInstance(community_view.community.instance_id)}
>
{#snippet prefix()}
<Icon src={BuildingOffice2} size="16" mini />
{/snippet}
{$t('cards.community.blockInstance')}
</MenuButton>
{/if}
{#if profile.current?.user && isAdmin(profile.current.user)}
<MenuButton
color="danger-subtle"
onclick={() =>
modal({
title: $t('admin.purgeCommunity.title'),
body: `${community_view.community.title}: ${$t('admin.purgeCommunity.warning')}`,
actions: [
action({
close: true,
content: $t('common.cancel'),
}),
action({
action: () => purgeCommunity(community_view.community.id),
close: true,
content: $t('admin.purge'),
type: 'danger',
icon: Fire,
}),
],
dismissable: true,
type: 'error',
})}
>
{#snippet prefix()}
<Icon src={Fire} size="16" mini />
{/snippet}
{$t('admin.purge')}
</MenuButton>
{/if}
{/if}
</Menu>
<EndPlaceholder size="xs" margin="sm">
{$t('cards.site.stats')}
</EndPlaceholder>
<div class="flex flex-col gap-1"> <div class="flex flex-row gap-4 flex-wrap px-3">
<hr class="border-slate-200 dark:border-zinc-900 my-1" /> <LabelStat
<Expandable bind:open={settings.expand.about} class="pt-0!"> label={$t('cards.community.members')}
content={community_view.counts.subscribers.toString()}
formatted
/>
<LabelStat
label={$t('content.posts')}
content={community_view.counts.posts.toString()}
formatted
/>
<LabelStat
label={$t('cards.community.activeDay')}
content={community_view.counts.users_active_day.toString()}
formatted
/>
</div>
<EndPlaceholder size="xs" margin="sm">
{$t('common.info')}
</EndPlaceholder>
<div class="space-y-3 px-1.5 text-sm">
<Expandable bind:open={settings.expand.about}>
{#snippet title()} {#snippet title()}
<span class="py-1 px-1 flex gap-1 items-center w-full"> <span class="px-2 py-1 w-full">
{$t('cards.site.about')} {$t('cards.site.about')}
</span> </span>
{/snippet} {/snippet}
<Markdown source={community_view.community.description} /> <Markdown source={community_view.community.description} />
</Expandable> </Expandable>
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
<Expandable bind:open={settings.expand.stats}>
{#snippet title()}
<span class="py-1 px-1 flex gap-1 items-center w-full">
{$t('cards.site.stats')}
</span>
{/snippet}
<div class="flex flex-row gap-4 flex-wrap">
<LabelStat
label={$t('cards.community.members')}
content={community_view.counts.subscribers.toString()}
formatted
/>
<LabelStat
label={$t('content.posts')}
content={community_view.counts.posts.toString()}
formatted
/>
</div>
</Expandable>
{#if moderators && moderators.length > 0} {#if moderators && moderators.length > 0}
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
<Expandable bind:open={settings.expand.team}> <Expandable bind:open={settings.expand.team}>
{#snippet title()} {#snippet title()}
<span class="flex items-center gap-1 py-1 px-2 w-full"> <span class="px-2 py-1 w-full">
{$t('cards.community.moderators')} {$t('cards.community.moderators')}
</span> </span>
{/snippet} {/snippet}
@@ -229,117 +356,5 @@
</Expandable> </Expandable>
{/if} {/if}
</div> </div>
<div class="flex flex-row items-center gap-1 sticky bottom-0 w-full">
{#if profile.current?.jwt}
<Button
disabled={loading.subscribing}
loading={loading.subscribing}
size="md"
rounding="pill"
color={community_view.subscribed == 'Subscribed'
? 'secondary'
: 'primary'}
onclick={() => subscribe(community_view)}
class="px-4 relative z-[inherit]"
>
{#snippet prefix()}
<Icon
src={community_view.subscribed == 'Subscribed' ? Check : Plus}
mini
size="16"
/>
{/snippet}
{community_view.subscribed == 'Subscribed' ||
community_view.subscribed == 'Pending'
? $t('cards.community.subscribed')
: $t('cards.community.subscribe')}
</Button>
{/if}
{#if profile.current?.user && amMod(profile.current.user, community_view.community)}
<Button
href="/c/{fullCommunityName(
community_view.community.name,
community_view.community.actor_id,
)}/settings"
size="square-md"
rounding="pill"
>
{#snippet prefix()}
<Icon src={Cog6Tooth} mini size="16" />
{/snippet}
</Button>
{/if}
<Menu placement="top-end">
{#snippet target(attachment)}
<Button {@attach attachment} size="square-md" rounding="pill">
{#snippet prefix()}
<Icon src={EllipsisHorizontal} size="16" mini />
{/snippet}
</Button>
{/snippet}
<MenuButton href="/modlog?community={community_view.community.id}">
<Icon src={Newspaper} size="16" mini />
{$t('cards.community.modlog')}
</MenuButton>
{#if profile.current?.jwt}
<MenuButton
color="danger-subtle"
size="lg"
onclick={() =>
block(community_view.community.id, !community_view.blocked)}
>
{#snippet prefix()}
<Icon src={NoSymbol} size="16" mini />
{/snippet}
{community_view.blocked
? $t('cards.community.unblock')
: $t('cards.community.block')}
</MenuButton>
{#if profile.current?.user}
<MenuButton
color="danger-subtle"
size="lg"
onclick={() =>
blockInstance(community_view.community.instance_id)}
>
{#snippet prefix()}
<Icon src={BuildingOffice2} size="16" mini />
{/snippet}
{$t('cards.community.blockInstance')}
</MenuButton>
{/if}
{#if profile.current?.user && isAdmin(profile.current.user)}
<MenuButton
color="danger-subtle"
onclick={() =>
modal({
title: $t('admin.purgeCommunity.title'),
body: `${community_view.community.title}: ${$t('admin.purgeCommunity.warning')}`,
actions: [
action({
close: true,
content: $t('common.cancel'),
}),
action({
action: () => purgeCommunity(community_view.community.id),
close: true,
content: $t('admin.purge'),
type: 'danger',
icon: Fire,
}),
],
dismissable: true,
type: 'error',
})}
>
{#snippet prefix()}
<Icon src={Fire} size="16" mini />
{/snippet}
{$t('admin.purge')}
</MenuButton>
{/if}
{/if}
</Menu>
</div>
</aside> </aside>
{/await} {/await}
@@ -164,11 +164,11 @@
/> />
<div class="flex flex-row gap-4 flex-wrap *:flex-1"> <div class="flex flex-row gap-4 flex-wrap *:flex-1">
<ImageInputUpload <ImageInputUpload
imageUrl={formData.icon} bind:imageUrl={formData.icon}
label={$t('routes.admin.config.icon')} label={$t('routes.admin.config.icon')}
/> />
<ImageInputUpload <ImageInputUpload
imageUrl={formData.banner} bind:imageUrl={formData.banner}
label={$t('routes.admin.config.banner')} label={$t('routes.admin.config.banner')}
/> />
</div> </div>
@@ -40,6 +40,7 @@
blocked?: boolean blocked?: boolean
banner?: boolean banner?: boolean
class?: string class?: string
compact?: 'lg'
} }
let { let {
@@ -50,10 +51,14 @@
blocked = false, blocked = false,
banner = !(settings.nsfwBlur && community.nsfw), banner = !(settings.nsfwBlur && community.nsfw),
class: clazz = '', class: clazz = '',
compact,
...rest
}: Props = $props() }: Props = $props()
</script> </script>
<EntityHeader <EntityHeader
{...rest}
{compact}
banner={banner ? community.banner : undefined} banner={banner ? community.banner : undefined}
avatar={community.icon} avatar={community.icon}
name={community.title} name={community.title}
@@ -98,7 +103,7 @@
</button> </button>
{/snippet} {/snippet}
{#if moderators.length > 0} {#if moderators.length > 0}
<Expandable class=""> <Expandable class={[compact == 'lg' && 'lg:hidden']}>
{#snippet title()} {#snippet title()}
{$t('cards.community.moderators')} {$t('cards.community.moderators')}
<hr class="flex-1 border-slate-200 dark:border-zinc-800 mx-3" /> <hr class="flex-1 border-slate-200 dark:border-zinc-800 mx-3" />
@@ -114,7 +119,7 @@
/> />
</Expandable> </Expandable>
{/if} {/if}
<div class="flex items-center gap-2 h-max w-max"> <div class={["flex items-center gap-2 h-max w-max", compact == 'lg' && 'lg:hidden']}>
{#if profile.current?.jwt} {#if profile.current?.jwt}
<Subscribe <Subscribe
community={{ community={{
@@ -148,13 +148,13 @@
{:else} {:else}
<div class="flex flex-row items-center gap-2"> <div class="flex flex-row items-center gap-2">
<Button <Button
size="square-md" rounding="xl"
rounding="pill"
color="ghost" color="ghost"
onclick={() => onclick={() =>
modal({ title: $t('form.post.community'), snippet: communityInfo })} modal({ title: $t('form.post.community'), snippet: communityInfo })}
> >
<Icon src={InformationCircle} size="16" mini /> <Icon src={InformationCircle} size="16" mini />
{$t('post.actions.more.label')}
</Button> </Button>
<Subscribe {community}> <Subscribe {community}>
{#snippet children({ subscribe, subscribing })} {#snippet children({ subscribe, subscribing })}
@@ -191,7 +191,7 @@
? $t('cards.community.subscribed') ? $t('cards.community.subscribed')
: $t('cards.community.subscribe')} : $t('cards.community.subscribe')}
color={subscribed ? 'secondary' : 'primary'} color={subscribed ? 'secondary' : 'primary'}
rounding="pill" rounding="xl"
class={[ class={[
subscribed && 'text-slate-600 dark:text-zinc-400', subscribed && 'text-slate-600 dark:text-zinc-400',
' h-8.5 rounded-full', ' h-8.5 rounded-full',
@@ -227,7 +227,7 @@
{/if} {/if}
{/key} {/key}
{#if settings.infiniteScroll && browser} {#if settings.infiniteScroll && browser && posts.length > 0}
{#if error} {#if error}
<div <div
class="flex flex-col justify-center items-center class="flex flex-col justify-center items-center
+22 -6
View File
@@ -22,6 +22,7 @@
nameDetail?: import('svelte').Snippet nameDetail?: import('svelte').Snippet
actions?: import('svelte').Snippet actions?: import('svelte').Snippet
children?: import('svelte').Snippet children?: import('svelte').Snippet
compact?: 'lg'
} }
let { let {
@@ -36,12 +37,18 @@
nameDetail, nameDetail,
actions, actions,
children, children,
compact,
...rest ...rest
}: Props = $props() }: Props = $props()
</script> </script>
<div {...rest} class={['z-10 text-sm contents w-full', clazz]}> <div {...rest} class={['z-10 text-sm contents w-full', clazz]}>
<div class="absolute inset-0 h-96 overflow-x-hidden -z-10"> <div
class={[
compact == 'lg' && 'lg:hidden',
'absolute inset-0 h-96 overflow-x-hidden -z-10',
]}
>
<img <img
src={banner || avatar} src={banner || avatar}
class="w-full h-64 object-cover blur-3xl opacity-30 dark:opacity-30" class="w-full h-64 object-cover blur-3xl opacity-30 dark:opacity-30"
@@ -49,12 +56,11 @@
alt="User banner" alt="User banner"
/> />
</div> </div>
{#if banner || avatar} {#if banner}
<div class="relative overflow-hidden rounded-xl"> <div class="relative overflow-hidden rounded-xl">
<img <img
src={banner || avatar} src={banner}
class="w-full object-cover h-48 rounded-t-xl bg-white dark:bg-zinc-900 rounded-xl" class="w-full object-cover h-48 rounded-t-xl bg-white dark:bg-zinc-900 rounded-xl"
class:blur-xl={!banner}
height="192" height="192"
alt="User banner" alt="User banner"
/> />
@@ -65,7 +71,11 @@
width={96} width={96}
url={avatar} url={avatar}
alt={name} alt={name}
class="ring-slate-25 bg-slate-25 dark:bg-zinc-925 -mt-12 ml-4 ring-6 relative dark:ring-zinc-950" circle={false}
class={[
'ring-slate-25 bg-slate-25 dark:bg-zinc-925 ring-6 relative dark:ring-zinc-950 rounded-3xl!',
banner && '-mt-12 ml-4',
]}
/> />
<div class="py-4 flex flex-col xl:flex-row gap-4"> <div class="py-4 flex flex-col xl:flex-row gap-4">
<div class="flex flex-col flex-1"> <div class="flex flex-col flex-1">
@@ -91,7 +101,12 @@
{/if} {/if}
</div> </div>
{#if stats.length > 0} {#if stats.length > 0}
<div class="text-sm flex flex-row flex-wrap overflow-hidden gap-4 h-full"> <div
class={[
compact == 'lg' && 'lg:hidden',
'text-sm flex flex-row flex-wrap overflow-hidden gap-4 h-full',
]}
>
{#each stats as stat} {#each stats as stat}
<div class=""> <div class="">
<div class="text-slate-600 dark:text-zinc-500 text-sm font-medium"> <div class="text-slate-600 dark:text-zinc-500 text-sm font-medium">
@@ -117,6 +132,7 @@
{#if bio} {#if bio}
<div <div
class={[ class={[
compact == 'lg' && 'lg:hidden',
'relative w-full mb-4 text-base', 'relative w-full mb-4 text-base',
center ? 'text-center' : 'text-left', center ? 'text-center' : 'text-left',
]} ]}
+2 -1
View File
@@ -1,10 +1,11 @@
<script lang="ts"> <script lang="ts">
import { Disclosure } from 'mono-svelte' import { Disclosure } from 'mono-svelte'
import { Minus, Plus, Icon } from 'svelte-hero-icons' import { Minus, Plus, Icon } from 'svelte-hero-icons'
import type { ClassValue } from 'svelte/elements'
interface Props { interface Props {
open?: boolean open?: boolean
icon?: boolean icon?: boolean
class?: string class?: ClassValue
title?: import('svelte').Snippet<[boolean | undefined]> title?: import('svelte').Snippet<[boolean | undefined]>
extended?: import('svelte').Snippet extended?: import('svelte').Snippet
content?: import('svelte').Snippet content?: import('svelte').Snippet
+1 -1
View File
@@ -65,7 +65,7 @@
style: 'grid-area: main', style: 'grid-area: main',
})} })}
{@render suffix?.({ {@render suffix?.({
class: `max-lg:hidden w-full sticky lg:top-16 h-max max-h-screen overflow-auto left-0 bg-slate-100 dark:bg-zinc-950 z-40`, class: `max-lg:hidden flex w-full sticky top-0 lg:top-16 left-0 max-h-[calc(100vh-4rem)] overflow-auto bg-slate-100 dark:bg-zinc-950 z-40`,
style: 'grid-area: suffix;', style: 'grid-area: suffix;',
})} })}
</div> </div>
+1
View File
@@ -71,6 +71,7 @@
moderators={data.community.value.moderators} moderators={data.community.value.moderators}
counts={data.community.value.community_view.counts} counts={data.community.value.community_view.counts}
class="w-full relative" class="w-full relative"
compact="lg"
/> />
</div> </div>
{#snippet extended()} {#snippet extended()}
+2 -1
View File
@@ -157,6 +157,7 @@
class="flex flex-col gap-4 h-full w-full flex-2/3" class="flex flex-col gap-4 h-full w-full flex-2/3"
onsubmit={preventDefault(submit)} onsubmit={preventDefault(submit)}
> >
<ErrorContainer scope={page.url.pathname} />
<Button href="/accounts" class="inline-block mb-4 w-max" rounding="pill"> <Button href="/accounts" class="inline-block mb-4 w-max" rounding="pill">
<Icon src={ArrowLeft} size="16" micro /> <Icon src={ArrowLeft} size="16" micro />
{$t('common.back')} {$t('common.back')}
@@ -296,8 +297,8 @@
</form> </form>
{:else if stage == 'verify'} {:else if stage == 'verify'}
<div class="flex-2/3 flex flex-col h-full justify-center gap-8"> <div class="flex-2/3 flex flex-col h-full justify-center gap-8">
<h2 class="font-medium text-3xl">{$t('toast.verifyEmail')}</h2>
<ErrorContainer scope={page.url.pathname} /> <ErrorContainer scope={page.url.pathname} />
<h2 class="font-medium text-3xl">{$t('toast.verifyEmail')}</h2>
<form <form
onsubmit={e => { onsubmit={e => {
e.preventDefault() e.preventDefault()