design: make community header more compact
This commit is contained in:
1 parent
d53cd28726
commit
d581884a1e
3 files changed
+29
-29
No files matched your search
@@ -148,12 +148,14 @@
|
||||
{/if}
|
||||
<div
|
||||
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;"
|
||||
>
|
||||
{#if user}
|
||||
<address class="contents not-italic">
|
||||
{#if view == 'compact'}
|
||||
{#if view == 'compact' && showCommunity}
|
||||
<Icon
|
||||
src={PaperAirplane}
|
||||
size="12"
|
||||
|
||||
@@ -48,15 +48,15 @@
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="p-4 flex flex-col gap-4 items">
|
||||
<div class="space-y-3 flex-1 flex flex-col items-center text-center">
|
||||
<div class="p-4 flex flex-col gap-4">
|
||||
<div class="flex-1 flex flex-row items-center text-left gap-4">
|
||||
<Avatar
|
||||
width={64}
|
||||
url={avatar}
|
||||
alt={name}
|
||||
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
|
||||
this={url ? 'a' : 'span'}
|
||||
href={url}
|
||||
@@ -78,18 +78,18 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if bio}
|
||||
<div class="relative w-full {center ? 'text-center' : 'text-left'}">
|
||||
<div
|
||||
class="p-4 relative bg-white/30 dark:bg-zinc-900/30 border border-slate-300
|
||||
dark:border-zinc-800 border-opacity-50 rounded-xl
|
||||
max-w-full w-full"
|
||||
>
|
||||
<PostBody class="text-sm" view="list" body={bio} clickThrough />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{#if bio}
|
||||
<div class="relative w-full {center ? 'text-center' : 'text-left'}">
|
||||
<div
|
||||
class="p-4 relative bg-white/30 dark:bg-zinc-900/30 border border-slate-300
|
||||
dark:border-zinc-800 border-opacity-50 rounded-xl
|
||||
max-w-full w-full"
|
||||
>
|
||||
<PostBody class="text-sm" view="list" body={bio} clickThrough />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="space-y-3 p-4 pt-0">
|
||||
{#if stats.length > 0}
|
||||
|
||||
@@ -24,16 +24,12 @@
|
||||
XMark,
|
||||
} from 'svelte-hero-icons'
|
||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||
import { profile } from '$lib/auth'
|
||||
import { t } from '$lib/translations.js'
|
||||
import { userSettings } from '$lib/settings.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 CommunityHeader from '$lib/components/lemmy/community/CommunityHeader.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -78,14 +74,16 @@
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
||||
<CommunityHeader
|
||||
bind:community={community.community}
|
||||
bind:subscribed={community.subscribed}
|
||||
bind:blocked={community.blocked}
|
||||
moderators={data.community.moderators}
|
||||
counts={community.counts}
|
||||
/>
|
||||
<Sort selected={data.sort} />
|
||||
<Header pageHeader>
|
||||
<CommunityHeader
|
||||
bind:community={community.community}
|
||||
bind:subscribed={community.subscribed}
|
||||
bind:blocked={community.blocked}
|
||||
moderators={data.community.moderators}
|
||||
counts={community.counts}
|
||||
/>
|
||||
<Sort selected={data.sort} slot="extended" />
|
||||
</Header>
|
||||
{#if community.blocked}
|
||||
<Placeholder
|
||||
icon={XMark}
|
||||
|
||||
Reference in new issue
Block a user