feat: Add community list

This commit is contained in:
Xyphyn committed 2023-07-01 17:12:41 -07:00
1 parent 633dc33714
commit 89bd20b8d0
5 files changed
+142 -42

No files matched your search

+15 -15
View File
@@ -1,21 +1,21 @@
<script lang="ts">
import type { GetCommunityResponse } from 'lemmy-js-client'
import type { GetCommunityResponse } from 'lemmy-js-client'
import Avatar from '../../post/[id]/Avatar.svelte'
export let data: GetCommunityResponse
export let data: GetCommunityResponse
</script>
<div class="flex flex-col gap-4">
<div class="flex flex-row gap-4 items-center">
<img
src={data.community_view.community.icon}
alt="test"
class="rounded-full bg-white border-slate-200 border p-2"
width={64}
height={64}
/>
<h1 class="font-bold text-xl">
{data.community_view.community.name}
</h1>
</div>
<slot />
<div class="flex flex-row gap-4 items-center">
<Avatar
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.title}
width={64}
/>
<h1 class="font-bold text-xl">
{data.community_view.community.name}
</h1>
</div>
<slot />
</div>