fix: remove sidebar stuff

This commit is contained in:
Xyphyn committed 2023-10-03 20:00:22 -07:00
1 parent a0ce677abc
commit e4a8718ba4
4 files changed
+15 -48

No files matched your search

+11 -36
View File
@@ -23,33 +23,14 @@
<nav
class="flex flex-col pl-4 pr-4 py-4 overflow-auto
gap-1 max-h-[calc(100svh-4rem)]
{$userSettings.expandSidebar
? ''
: 'w-max max-w-max min-w-max'} {$$props.class}"
gap-1 max-h-[calc(100svh-4rem)] {$$props.class}"
style={$$props.style}
>
<!-- <Button
on:click={() =>
($userSettings.expandSidebar = !$userSettings.expandSidebar)}
class="w-max !p-2"
aria-label="Collapse sidebar"
>
<Icon
src={ChevronDoubleLeft}
mini
size="16"
class="transition-transform {$userSettings.expandSidebar
? ''
: 'rotate-180'}"
title="Toggle Sidebar"
/>
</Button> -->
<SidebarButton href="/" expanded={$userSettings.expandSidebar}>
<SidebarButton href="/">
<Icon src={Home} mini={route == '/'} size="20" title="Frontpage" />
<span>Frontpage</span>
</SidebarButton>
<SidebarButton href="/settings" expanded={$userSettings.expandSidebar}>
<SidebarButton href="/settings">
<Icon
src={Cog6Tooth}
mini={route == '/settings'}
@@ -58,7 +39,7 @@
/>
<span>Settings</span>
</SidebarButton>
<SidebarButton expanded={$userSettings.expandSidebar} href="/communities">
<SidebarButton href="/communities">
<Icon mini={route == '/communities'} src={GlobeAlt} size="20" />
<span>Communities</span>
</SidebarButton>
@@ -66,10 +47,10 @@
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
{#each $profileData.profiles as prof, index (prof.id)}
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
<ProfileButton {index} {prof} expanded={$userSettings.expandSidebar} />
<ProfileButton {index} {prof} />
</div>
{/each}
<SidebarButton href="/accounts" expanded={$userSettings.expandSidebar}>
<SidebarButton href="/accounts">
<Icon src={UserGroup} mini size="20" />
<span>Accounts</span>
</SidebarButton>
@@ -77,20 +58,14 @@
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
{#if $profile?.user}
{#if $profile?.user.moderates.length > 0}
<CommunityList
expanded={$userSettings.expandSidebar}
items={$profile.user.moderates.map((i) => i.community)}
/>
<CommunityList items={$profile.user.moderates.map((i) => i.community)} />
<hr class="border-slate-300 dark:border-zinc-800 my-1" />
{/if}
<CommunityList
expanded={$userSettings.expandSidebar}
items={$profile.user.follows.map((i) => i.community)}
/>
<CommunityList items={$profile.user.follows.map((i) => i.community)} />
{:else}
<Button
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
class="hover:bg-slate-200"
href="/login"
color="tertiary"
alignment="left"
@@ -100,7 +75,7 @@
<span>Log In</span>
</Button>
<Button
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
class="hover:bg-slate-200"
href="/signup"
color="tertiary"
alignment="left"
@@ -110,7 +85,7 @@
<span>Sign Up</span>
</Button>
<Button
class="hover:bg-slate-200 {$userSettings.expandSidebar ? '' : '!p-1.5'}"
class="hover:bg-slate-200"
href="/accounts"
color="tertiary"
alignment="left"