feat: Add community stuff
This commit is contained in:
1 parent
d6ed6fbab1
commit
1e08acb02a
2 files changed
+22
-8
No files matched your search
@@ -1,14 +1,28 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import MultiSelect from '$lib/components/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/MultiSelect.svelte'
|
||||||
import Post from '../../../post/[id]/Post.svelte'
|
import Avatar from '../../../post/[id]/Avatar.svelte'
|
||||||
|
import Post from '../../../post/[id]/Post.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<MultiSelect options={['Community', 'idk']} selected="Community" />
|
<div class="flex flex-row gap-4 justify-between">
|
||||||
|
<div class="flex flex-col gap-4">
|
||||||
<div class="flex flex-col gap-4">
|
|
||||||
{#each data.posts as post}
|
{#each data.posts as post}
|
||||||
<Post {post} />
|
<Post {post} />
|
||||||
{/each}
|
{/each}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="bg-white border border-slate-200 dark:border-zinc-800
|
||||||
|
dark:bg-zinc-900 flex flex-col gap-4 p-8 max-w-sm rounded-md h-max"
|
||||||
|
>
|
||||||
|
<Avatar
|
||||||
|
width={48}
|
||||||
|
url={data.community_view.community.icon ??
|
||||||
|
`https://api.dicebear.com/6.x/initials/svg?seed=${data.community_view.community.name}`}
|
||||||
|
alt={data.community_view.community.name}
|
||||||
|
/>
|
||||||
|
<h1 class="font-bold text-lg">{data.community_view.community.name}</h1>
|
||||||
|
<p>{data.community_view.community.description}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
>
|
>
|
||||||
<div class="flex flex-col gap-2 bg-white dark:bg-zinc-900 p-4 rounded-md">
|
<div class="flex flex-col gap-2 bg-white dark:bg-zinc-900 p-4 rounded-md">
|
||||||
<span class="flex flex-row gap-2 text-sm opacity-70">
|
<span class="flex flex-row gap-2 text-sm opacity-70">
|
||||||
<a href="/">c/{postRes.community.name}</a>
|
<a href="/c/{postRes.community.name}">c/{postRes.community.name}</a>
|
||||||
<span class="opacity-50">{postRes.creator.name}</span>
|
<span class="opacity-50">{postRes.creator.name}</span>
|
||||||
<span class="opacity-50">
|
<span class="opacity-50">
|
||||||
<RelativeDate date={new Date(postRes.post.published)} />
|
<RelativeDate date={new Date(postRes.post.published)} />
|
||||||
|
|||||||
Reference in new issue
Block a user