From b79496a1c928118da9ef4d1d52a048ef10d81f57 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 9 Mar 2024 10:55:40 -0800 Subject: [PATCH] feat: redesign communityitem --- .../lemmy/community/CommunityItem.svelte | 47 ++++++++++--------- .../lemmy/community/CommunityLink.svelte | 10 ++-- src/lib/components/lemmy/post/PostBody.svelte | 2 +- src/routes/communities/+page.svelte | 6 +-- 4 files changed, 36 insertions(+), 29 deletions(-) diff --git a/src/lib/components/lemmy/community/CommunityItem.svelte b/src/lib/components/lemmy/community/CommunityItem.svelte index f0e96aea..cfaf4658 100644 --- a/src/lib/components/lemmy/community/CommunityItem.svelte +++ b/src/lib/components/lemmy/community/CommunityItem.svelte @@ -18,6 +18,8 @@ import { addSubscription } from '$lib/lemmy/user.js' import Avatar from '$lib/components/ui/Avatar.svelte' import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte' + import LabelStat from '$lib/components/ui/LabelStat.svelte' + import PostBody from '../post/PostBody.svelte' export let community: CommunityView @@ -28,17 +30,17 @@ -
+
- +
- +
- - !{community.community.name}@{new URL(community.community.actor_id).hostname} - + {#if community.community.description} + + {/if}
-
- - -
-
- - -
-
- - -
+ + +
diff --git a/src/lib/components/lemmy/community/CommunityLink.svelte b/src/lib/components/lemmy/community/CommunityLink.svelte index 1750d905..49352309 100644 --- a/src/lib/components/lemmy/community/CommunityLink.svelte +++ b/src/lib/components/lemmy/community/CommunityLink.svelte @@ -13,7 +13,8 @@ {#if avatar} @@ -26,10 +27,13 @@ {/if} {#if name} - + {#if showInstance} {community.title} - + @{new URL(community.actor_id).hostname} {:else} diff --git a/src/lib/components/lemmy/post/PostBody.svelte b/src/lib/components/lemmy/post/PostBody.svelte index 89fc5834..9442a7a3 100644 --- a/src/lib/components/lemmy/post/PostBody.svelte +++ b/src/lib/components/lemmy/post/PostBody.svelte @@ -19,7 +19,7 @@
-
    +
      {#if data.communities.length == 0}