feat: add sidebar to frontpage
This commit is contained in:
1 parent
2627dbd3f9
commit
6daed6ef9d
1 file changed
+17
-4
+17
-4
@@ -6,26 +6,39 @@
|
|||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||||
import { fly, scale } from 'svelte/transition'
|
import { fly } from 'svelte/transition'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||||
import { authData } from '$lib/lemmy.js'
|
import { authData } from '$lib/lemmy.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'
|
|
||||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||||
|
import Modal from '$lib/components/ui/modal/Modal.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
|
let sidebar = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>Photon</title>
|
<title>Photon</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
<Modal bind:open={sidebar}>
|
||||||
|
<span slot="title">Sidebar</span>
|
||||||
|
<div class="mx-auto">
|
||||||
|
{#await data.streamed.site then site}
|
||||||
|
<SiteCard site={site.site_view} taglines={site.taglines} />
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
<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>
|
<header>
|
||||||
<h1 class="text-3xl font-bold">Frontpage</h1>
|
<h1 class="text-3xl font-bold">Frontpage</h1>
|
||||||
</header>
|
</header>
|
||||||
|
<div class="xl:hidden">
|
||||||
|
<Button on:click={() => (sidebar = !sidebar)}>Sidebar</Button>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-row gap-4 max-w-full w-full justify-between flex-wrap"
|
class="flex flex-row gap-4 max-w-full w-full justify-between flex-wrap"
|
||||||
>
|
>
|
||||||
@@ -93,7 +106,7 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<aside class="hidden 2xl:block">
|
<aside class="hidden xl:block">
|
||||||
{#await data.streamed.site}
|
{#await data.streamed.site}
|
||||||
<StickyCard>
|
<StickyCard>
|
||||||
<div class="h-64 grid place-items-center">
|
<div class="h-64 grid place-items-center">
|
||||||
|
|||||||
Reference in new issue
Block a user