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}
|
{/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"
|
||||||
|
|||||||
@@ -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,18 +78,18 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</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>
|
||||||
|
{#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>
|
||||||
<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}
|
||||||
|
|||||||
@@ -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,14 +74,16 @@
|
|||||||
{/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">
|
||||||
<CommunityHeader
|
<Header pageHeader>
|
||||||
bind:community={community.community}
|
<CommunityHeader
|
||||||
bind:subscribed={community.subscribed}
|
bind:community={community.community}
|
||||||
bind:blocked={community.blocked}
|
bind:subscribed={community.subscribed}
|
||||||
moderators={data.community.moderators}
|
bind:blocked={community.blocked}
|
||||||
counts={community.counts}
|
moderators={data.community.moderators}
|
||||||
/>
|
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}
|
||||||
|
|||||||
Reference in new issue
Block a user