misc: add buttons for 0 communities

This commit is contained in:
Xyphyn committed 2023-07-31 13:21:33 -07:00
1 parent b4bcadf40d
commit 13a4b06e41
6 files changed
+69 -46

No files matched your search

+5 -39
View File
@@ -6,10 +6,6 @@
import 'nprogress/nprogress.css'
import ToastContainer from '$lib/components/ui/toasts/ToastContainer.svelte'
import Moderation from '$lib/components/lemmy/moderation/Moderation.svelte'
import { user } from '$lib/lemmy.js'
import Button from '$lib/components/input/Button.svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
import { Home, Icon } from 'svelte-hero-icons'
import Sidebar from '$lib/components/ui/Sidebar.svelte'
nProgress.configure({
@@ -34,47 +30,17 @@
}
</script>
<div class="flex flex-col">
<div class="flex flex-col min-h-screen">
<Navbar />
<ToastContainer />
<Moderation />
<div
class="flex flex-row w-full max-w-full lg:divide-x dark:divide-zinc-800
divide-slate-200"
class="flex flex-row h-full w-full max-w-full lg:divide-x dark:divide-zinc-800
divide-slate-200 flex-1"
>
<Sidebar let:expanded>
<Button
class="hover:bg-slate-200 {expanded ? '' : '!p-1.5'}"
href="/"
color="tertiary"
alignment="left"
>
<Icon src={Home} solid size="20" />
<span class:hidden={!expanded}>Frontpage</span>
</Button>
{#if $user}
{#each $user.follows
.map((f) => f.community)
.sort((a, b) => a.title.localeCompare(b.title)) as follow}
<Button
class="hover:bg-slate-200 {expanded ? '' : '!p-1.5'}"
color="tertiary"
alignment="left"
href="/c/{follow.name}@{new URL(follow.actor_id).hostname}"
>
<Avatar
url={follow.icon}
alt={follow.name}
width={20}
slot="icon"
/>
<span class:hidden={!expanded}>{follow.title}</span>
</Button>
{/each}
{/if}
</Sidebar>
<Sidebar />
<main
class="p-3 lg:p-6 min-w-0 w-full flex-[3] xl:rounded-tl-lg
class="p-3 lg:p-6 min-w-0 w-full flex-[3] lg:rounded-tl-lg
border-slate-200 dark:border-zinc-900 border-t"
>
<slot />
+1 -1
View File
@@ -93,7 +93,7 @@
}}
/>
</div>
<aside class="hidden md:block">
<aside class="hidden 2xl:block">
{#await data.streamed.site}
<StickyCard>
<div class="h-64 grid place-items-center">
+1 -1
View File
@@ -67,7 +67,7 @@
</svelte:head>
<Card class="p-6 max-w-lg w-full mx-auto">
<form on:submit|preventDefault={logIn} class="flex flex-col gap-4">
<form on:submit|preventDefault={logIn} class="flex flex-col gap-6">
<h1 class="font-bold text-2xl">Log in</h1>
<div class="flex flex-row w-full items-center gap-2">
<TextInput