feat: add #20
This commit is contained in:
1 parent
9a77880305
commit
5024e9edf1
2 files changed
+14
-3
No files matched your search
@@ -4,7 +4,8 @@
|
|||||||
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
||||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||||
import RelativeDate from '$lib/components/util/RelativeDate.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 {
|
import {
|
||||||
Calendar,
|
Calendar,
|
||||||
ChatBubbleOvalLeftEllipsis,
|
ChatBubbleOvalLeftEllipsis,
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
|
|
||||||
export let site: SiteView
|
export let site: SiteView
|
||||||
|
export let taglines: Tagline[] | undefined = undefined
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<StickyCard>
|
<StickyCard>
|
||||||
@@ -51,6 +53,12 @@
|
|||||||
<FormattedNumber number={site.counts.communities} />
|
<FormattedNumber number={site.counts.communities} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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>
|
<p>{site.site.description}</p>
|
||||||
<hr class="border-slate-300 dark:border-zinc-700" />
|
<hr class="border-slate-300 dark:border-zinc-700" />
|
||||||
<Markdown source={site.site.sidebar} />
|
<Markdown source={site.site.sidebar} />
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
import { authData } from '$lib/lemmy.js'
|
import { authData } from '$lib/lemmy.js'
|
||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
import { ArchiveBox, Icon, Plus } from 'svelte-hero-icons'
|
import { ArchiveBox, Icon, Plus } from 'svelte-hero-icons'
|
||||||
|
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
</script>
|
</script>
|
||||||
@@ -21,7 +22,9 @@
|
|||||||
|
|
||||||
<div class="flex flex-row gap-4 w-full">
|
<div class="flex flex-row gap-4 w-full">
|
||||||
<div class="flex flex-col gap-4 max-w-full w-full min-w-0">
|
<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
|
<div
|
||||||
class="flex flex-col sm:flex-row gap-4 max-w-full w-full justify-between flex-wrap"
|
class="flex flex-col sm:flex-row gap-4 max-w-full w-full justify-between flex-wrap"
|
||||||
role="radiogroup"
|
role="radiogroup"
|
||||||
@@ -99,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</StickyCard>
|
</StickyCard>
|
||||||
{:then site}
|
{:then site}
|
||||||
<SiteCard site={site.site_view} />
|
<SiteCard site={site.site_view} taglines={site.taglines} />
|
||||||
{:catch}
|
{:catch}
|
||||||
<StickyCard>
|
<StickyCard>
|
||||||
<h1 class="font-bold text-lg">Failed to load</h1>
|
<h1 class="font-bold text-lg">Failed to load</h1>
|
||||||
|
|||||||
Reference in new issue
Block a user