design: tweak design
This commit is contained in:
1 parent
ddea19e6b9
commit
62baf475b6
7 files changed
+57
-36
No files matched your search
@@ -32,6 +32,8 @@
|
||||
<Navbar />
|
||||
<ToastContainer />
|
||||
<Moderation />
|
||||
<main class="mx-auto max-w-5xl p-4 flex-1 w-full">
|
||||
<slot />
|
||||
</main>
|
||||
<div class="flex flex-row w-full mx-auto max-w-6xl">
|
||||
<main class="p-4 flex-[3]">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
@@ -12,6 +12,7 @@
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -20,14 +21,11 @@
|
||||
|
||||
<svelte:head>
|
||||
<title>{data.posts.posts[0]?.community.name}</title>
|
||||
<meta
|
||||
name="og:title"
|
||||
content={data.community.community_view.community.name}
|
||||
/>
|
||||
{#if data.community.community_view.community.description}
|
||||
<meta name="og:title" content={data.community.community.name} />
|
||||
{#if data.community.community.description}
|
||||
<meta
|
||||
name="og:description"
|
||||
content={data.community.community_view.community.description}
|
||||
content={data.community.community.description}
|
||||
/>
|
||||
{/if}
|
||||
<meta name="og:url" content={$page.url.toString()} />
|
||||
@@ -36,15 +34,27 @@
|
||||
<Modal bind:open={sidebar}>
|
||||
<span slot="title">Sidebar</span>
|
||||
<div class="mx-auto">
|
||||
<CommunityCard community_view={data.community.community_view} />
|
||||
<CommunityCard community_view={data.community} />
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
<div class="flex flex-col md:flex-row gap-4 w-full">
|
||||
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
||||
<h1 class="text-2xl font-bold">
|
||||
{data.community.community_view.community.title}
|
||||
</h1>
|
||||
<div class="flex flex-row gap-3 items-center">
|
||||
<Avatar
|
||||
width={48}
|
||||
url={data.community.community.icon}
|
||||
alt={data.community.community.name}
|
||||
/>
|
||||
<div class="flex flex-col gap-0">
|
||||
<h1 class="font-bold text-xl">{data.community.community.title}</h1>
|
||||
<span class="dark:text-zinc-400 text-slate-600 text-sm">
|
||||
!{data.community.community.name}@{new URL(
|
||||
data.community.community.actor_id
|
||||
).hostname}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md:hidden">
|
||||
<Button color="secondary" on:click={() => (sidebar = true)}>
|
||||
Sidebar
|
||||
@@ -68,7 +78,7 @@
|
||||
</div>
|
||||
{#each data.posts.posts as post, index (post.post.id)}
|
||||
<div in:fly={{ y: -8, opacity: 0, delay: index < 4 ? index * 100 : 0 }}>
|
||||
<Post {post} />
|
||||
<Post hideCommunity={true} {post} />
|
||||
</div>
|
||||
{/each}
|
||||
<Pageination
|
||||
@@ -82,6 +92,6 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="hidden md:block">
|
||||
<CommunityCard community_view={data.community.community_view} />
|
||||
<CommunityCard community_view={data.community} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -20,9 +20,11 @@ export async function load(req: any) {
|
||||
sort: sort,
|
||||
auth: get(authData)?.token,
|
||||
}),
|
||||
community: await getClient().getCommunity({
|
||||
name: req.params.name,
|
||||
auth: get(authData)?.token,
|
||||
}),
|
||||
community: (
|
||||
await getClient().getCommunity({
|
||||
name: req.params.name,
|
||||
auth: get(authData)?.token,
|
||||
})
|
||||
).community_view,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user