design: tweak design

This commit is contained in:
Xyphyn committed 2023-07-30 14:44:43 -07:00
1 parent ddea19e6b9
commit 62baf475b6
7 files changed
+57 -36

No files matched your search

+2 -2
View File
@@ -10,15 +10,15 @@
import { ToastType, toast } from '$lib/components/ui/toasts/toasts.js'
export let post: PostView
export let actions: boolean = true
export let hideCommunity = false
</script>
<Card class="bg-white flex flex-col w-full p-5 gap-2.5">
<div class="flex flex-row w-full gap-2.5">
<div class="flex flex-col gap-1.5 grow">
<PostMeta
community={post.community}
community={hideCommunity ? undefined : post.community}
user={post.creator}
published={new Date(post.post.published + 'Z')}
upvotes={post.counts.upvotes}
+11 -6
View File
@@ -13,7 +13,7 @@
Trash,
} from 'svelte-hero-icons'
export let community: Community
export let community: Community | undefined = undefined
export let user: Person | undefined = undefined
export let published: Date
@@ -31,15 +31,20 @@
</script>
<span class="flex flex-row gap-2 text-sm items-center">
<Avatar url={community.icon} width={24} alt={community.name} />
{#if community}
<Avatar url={community.icon} width={24} alt={community.name} />
{/if}
<div class="flex flex-col text-xs">
<CommunityLink {community} />
{#if community}
<CommunityLink {community} />
{/if}
<span
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-1 flex-wrap"
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-1 flex-wrap items-center"
>
{#if user}
<UserLink {user} />
<span>•</span>
<div class="mr-0.5 text-zinc-100">
<UserLink avatarSize={20} {user} avatar={!community} />
</div>
{/if}
<RelativeDate date={published} />
{#if upvotes != undefined && downvotes != undefined}