why the heck is the site card breaking
This commit is contained in:
1 parent
66eca58d01
commit
6181c5138a
10 files changed
+213
-228
No files matched your search
@@ -141,13 +141,11 @@
|
||||
<span class="mx-4 text-xs opacity-80 text-left my-2">Post Actions</span>
|
||||
<MenuButton
|
||||
on:click={() => {
|
||||
if (typeof navigator != 'undefined') {
|
||||
navigator.clipboard.writeText(
|
||||
`${$page.url.origin}/post/${
|
||||
$authData?.instance ?? DEFAULT_INSTANCE_URL
|
||||
}/${postRes.post.id}`
|
||||
)
|
||||
}
|
||||
navigator.clipboard.writeText(
|
||||
`${$page.url.origin}/post/${
|
||||
$authData?.instance ?? DEFAULT_INSTANCE_URL
|
||||
}/${postRes.post.id}`
|
||||
)
|
||||
}}
|
||||
>
|
||||
<Icon src={Square2Stack} width={16} mini />
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<script lang="ts">
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
|
||||
import type { SiteView } from 'lemmy-js-client'
|
||||
import {
|
||||
Calendar,
|
||||
ChatBubbleOvalLeftEllipsis,
|
||||
Icon,
|
||||
Newspaper,
|
||||
PencilSquare,
|
||||
UserGroup,
|
||||
} from 'svelte-hero-icons'
|
||||
|
||||
export let site: SiteView
|
||||
</script>
|
||||
|
||||
<StickyCard>
|
||||
<!-- {#if site.site.icon} -->
|
||||
<!-- <Avatar width={64} url={site.site.icon} alt={site.site.name} /> -->
|
||||
<!-- {/if} -->
|
||||
<span class="flex flex-row items-center gap-1 text-sm">
|
||||
<Icon src={Calendar} width={16} height={16} mini />
|
||||
<RelativeDate date={new Date(site.site.published)} />
|
||||
</span>
|
||||
<div class="text-sm flex flex-row flex-wrap gap-3">
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={UserGroup} width={16} height={16} mini />
|
||||
<FormattedNumber number={site.counts.users} />
|
||||
</span>
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={PencilSquare} width={16} height={16} mini />
|
||||
<FormattedNumber number={site.counts.posts} />
|
||||
</span>
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={ChatBubbleOvalLeftEllipsis} width={16} height={16} mini />
|
||||
<FormattedNumber number={site.counts.comments} />
|
||||
</span>
|
||||
<span class="flex flex-row items-center gap-1">
|
||||
<Icon src={Newspaper} width={16} height={16} mini />
|
||||
<FormattedNumber number={site.counts.communities} />
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<h1 class="font-bold text-lg">{site.site.name}</h1>
|
||||
</div>
|
||||
<Markdown source={site.site.description} />
|
||||
</StickyCard>
|
||||
@@ -80,8 +80,10 @@
|
||||
</script>
|
||||
|
||||
<li
|
||||
class="py-3 {$page.url.hash == `#${node.comment_view.comment.id}`
|
||||
class="py-2 {$page.url.hash == `#${node.comment_view.comment.id}`
|
||||
? 'bg-slate-200 dark:bg-zinc-800'
|
||||
: ''} {node.depth == 0
|
||||
? 'border-b border-black/10 dark:border-white/10'
|
||||
: ''}"
|
||||
id="#{node.comment_view.comment.id.toString()}"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user