design: make community header more compact

This commit is contained in:
Xylight committed 2024-10-01 16:34:43 -07:00
1 parent d53cd28726
commit d581884a1e
3 files changed
+12 -12

No files matched your search

@@ -148,12 +148,14 @@
{/if} {/if}
<div <div
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 items-center class="text-slate-600 dark:text-zinc-400 flex flex-row gap-2 items-center
no-list-margin {view == 'compact' ? 'min-[480px]:mx-2' : ''}" no-list-margin {view == 'compact' && showCommunity
? 'min-[480px]:mx-2'
: ''}"
style="grid-area: stats;" style="grid-area: stats;"
> >
{#if user} {#if user}
<address class="contents not-italic"> <address class="contents not-italic">
{#if view == 'compact'} {#if view == 'compact' && showCommunity}
<Icon <Icon
src={PaperAirplane} src={PaperAirplane}
size="12" size="12"
+4 -4
View File
@@ -48,15 +48,15 @@
/> />
</div> </div>
{/if} {/if}
<div class="p-4 flex flex-col gap-4 items"> <div class="p-4 flex flex-col gap-4">
<div class="space-y-3 flex-1 flex flex-col items-center text-center"> <div class="flex-1 flex flex-row items-center text-left gap-4">
<Avatar <Avatar
width={64} width={64}
url={avatar} url={avatar}
alt={name} alt={name}
class=" ring-slate-25 dark:ring-zinc-925 bg-slate-25 dark:bg-zinc-925" class=" ring-slate-25 dark:ring-zinc-925 bg-slate-25 dark:bg-zinc-925"
/> />
<div class="flex flex-col items-center"> <div class="flex flex-col">
<svelte:element <svelte:element
this={url ? 'a' : 'span'} this={url ? 'a' : 'span'}
href={url} href={url}
@@ -78,6 +78,7 @@
</div> </div>
{/if} {/if}
</div> </div>
</div>
{#if bio} {#if bio}
<div class="relative w-full {center ? 'text-center' : 'text-left'}"> <div class="relative w-full {center ? 'text-center' : 'text-left'}">
<div <div
@@ -90,7 +91,6 @@
</div> </div>
{/if} {/if}
</div> </div>
</div>
<div class="space-y-3 p-4 pt-0"> <div class="space-y-3 p-4 pt-0">
{#if stats.length > 0} {#if stats.length > 0}
<div class="text-sm flex flex-row flex-wrap gap-3 mx-auto"> <div class="text-sm flex flex-row flex-wrap gap-3 mx-auto">
+4 -6
View File
@@ -24,16 +24,12 @@
XMark, XMark,
} from 'svelte-hero-icons' } from 'svelte-hero-icons'
import Placeholder from '$lib/components/ui/Placeholder.svelte' import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { profile } from '$lib/auth'
import { t } from '$lib/translations.js' import { t } from '$lib/translations.js'
import { userSettings } from '$lib/settings.js' import { userSettings } from '$lib/settings.js'
import { site } from '$lib/lemmy.js' import { site } from '$lib/lemmy.js'
import { postFeeds } from '$lib/lemmy/postfeed.js'
import EntityHeader from '$lib/components/ui/EntityHeader.svelte'
import CommunityLink from '$lib/components/lemmy/community/CommunityLink.svelte'
import Subscribe from '../../communities/Subscribe.svelte'
import { resumables } from '$lib/lemmy/item' import { resumables } from '$lib/lemmy/item'
import CommunityHeader from '$lib/components/lemmy/community/CommunityHeader.svelte' import CommunityHeader from '$lib/components/lemmy/community/CommunityHeader.svelte'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
export let data export let data
@@ -78,6 +74,7 @@
{/if} {/if}
<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 pageHeader>
<CommunityHeader <CommunityHeader
bind:community={community.community} bind:community={community.community}
bind:subscribed={community.subscribed} bind:subscribed={community.subscribed}
@@ -85,7 +82,8 @@
moderators={data.community.moderators} moderators={data.community.moderators}
counts={community.counts} counts={community.counts}
/> />
<Sort selected={data.sort} /> <Sort selected={data.sort} slot="extended" />
</Header>
{#if community.blocked} {#if community.blocked}
<Placeholder <Placeholder
icon={XMark} icon={XMark}