This commit is contained in:
Xyphyn committed 2023-07-26 12:45:34 -07:00
1 parent 9a77880305
commit 5024e9edf1
2 files changed
+14 -3

No files matched your search

+9 -1
View File
@@ -4,7 +4,8 @@
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 { getClient } from '$lib/lemmy.js'
import type { SiteView, Tagline } from 'lemmy-js-client'
import {
Calendar,
ChatBubbleOvalLeftEllipsis,
@@ -15,6 +16,7 @@
} from 'svelte-hero-icons'
export let site: SiteView
export let taglines: Tagline[] | undefined = undefined
</script>
<StickyCard>
@@ -51,6 +53,12 @@
<FormattedNumber number={site.counts.communities} />
</span>
</div>
{#if taglines && taglines.length > 0}
<p>
{taglines[Math.floor(Math.random() * taglines.length)].content}
</p>
<hr class="border-slate-300 dark:border-zinc-700" />
{/if}
<p>{site.site.description}</p>
<hr class="border-slate-300 dark:border-zinc-700" />
<Markdown source={site.site.sidebar} />
+5 -2
View File
@@ -11,6 +11,7 @@
import { authData } from '$lib/lemmy.js'
import { userSettings } from '$lib/settings.js'
import { ArchiveBox, Icon, Plus } from 'svelte-hero-icons'
import Markdown from '$lib/components/markdown/Markdown.svelte'
export let data
</script>
@@ -21,7 +22,9 @@
<div class="flex flex-row gap-4 w-full">
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
<header><h1 class="text-3xl font-bold">Frontpage</h1></header>
<header>
<h1 class="text-3xl font-bold">Frontpage</h1>
</header>
<div
class="flex flex-col sm:flex-row gap-4 max-w-full w-full justify-between flex-wrap"
role="radiogroup"
@@ -99,7 +102,7 @@
</div>
</StickyCard>
{:then site}
<SiteCard site={site.site_view} />
<SiteCard site={site.site_view} taglines={site.taglines} />
{:catch}
<StickyCard>
<h1 class="font-bold text-lg">Failed to load</h1>