fix: make colors extend past screen borders
This commit is contained in:
1 parent
d42a9e181c
commit
0ade08b3dd
5 files changed
+19
-14
No files matched your search
@@ -6,20 +6,14 @@
|
||||
export let route: { id: string | null } | undefined = undefined
|
||||
|
||||
$: title = route ? routes[(route.id as keyof typeof routes) ?? ''] : ''
|
||||
|
||||
let scroll = 0
|
||||
</script>
|
||||
|
||||
<svelte:window bind:scrollY={scroll} />
|
||||
|
||||
<div class="shell {$$props.class}" style={colorsToVars($colors)}>
|
||||
<slot />
|
||||
<slot
|
||||
name="navbar"
|
||||
class="sticky top-0 border-b border-slate-200 dark:border-zinc-900
|
||||
{scroll > 0
|
||||
? 'bg-slate-50/70 dark:bg-zinc-950/70'
|
||||
: 'bg-slate-50 dark:bg-zinc-950'} transition-colors duration-500"
|
||||
bg-slate-25 dark:bg-zinc-950 transition-colors duration-500"
|
||||
style="grid-area: navbar"
|
||||
{title}
|
||||
/>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<span slot="label">Communities</span>
|
||||
</SidebarButton>
|
||||
{#if $profileData.profiles.length >= 1}
|
||||
<hr class="border-slate-200 dark:border-zinc-800 my-1" />
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
{#each [...$profileData.profiles] as prof, index (prof.id)}
|
||||
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
|
||||
<ProfileButton {index} {prof} />
|
||||
@@ -76,11 +76,11 @@
|
||||
<span slot="label">Accounts</span>
|
||||
</SidebarButton>
|
||||
{/if}
|
||||
<hr class="border-slate-200 dark:border-zinc-800 my-1" />
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
{#if $profile?.user}
|
||||
{#if $profile?.user.moderates.length > 0}
|
||||
<CommunityList items={$profile.user.moderates.map((i) => i.community)} />
|
||||
<hr class="border-slate-200 dark:border-zinc-800 my-1" />
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
{/if}
|
||||
|
||||
<Expandable bind:open={$userSettings.expandCommunities}>
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
import Sidebar from '$lib/components/ui/sidebar/Sidebar.svelte'
|
||||
// @ts-ignore
|
||||
import { pwaInfo } from 'virtual:pwa-info'
|
||||
import { colors, inDarkLegacyTheme, legacyTheme } from '$lib/ui/colors.js'
|
||||
import {
|
||||
colors,
|
||||
colorsToVars,
|
||||
inDarkLegacyTheme,
|
||||
legacyTheme,
|
||||
} from '$lib/ui/colors.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { Button, ModalContainer, Spinner, ToastContainer } from 'mono-svelte'
|
||||
import { onMount } from 'svelte'
|
||||
@@ -61,10 +66,16 @@
|
||||
}
|
||||
})
|
||||
$: title = routes[($page.route.id as keyof typeof routes) ?? '']
|
||||
$: browser ? document.body.setAttribute('style', colorsToVars($colors)) : ''
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<meta name="theme-color" content={darklegacyTheme ? $colors?.zinc?.[950] ?? '#09090b' : $colors?.slate?.[50] ?? '#f8fafc'} />
|
||||
<meta
|
||||
name="theme-color"
|
||||
content={darklegacyTheme
|
||||
? $colors?.zinc?.[950] ?? '#09090b'
|
||||
: $colors?.slate?.[50] ?? '#f8fafc'}
|
||||
/>
|
||||
{#if $site}
|
||||
<title>{$site.site_view.site.name}</title>
|
||||
{#if LINKED_INSTANCE_URL}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { env } from '$env/dynamic/public'
|
||||
|
||||
export let ssr = (env.PUBLIC_SSR_ENABLED?.toLowerCase() ?? 'false') == 'true'
|
||||
export let ssr = (env.PUBLIC_SSR_ENABLED?.toLowerCase() ?? 'false') == 'true'
|
||||
Reference in new issue
Block a user