fix: make colors extend past screen borders

This commit is contained in:
Xylight committed 2024-03-05 18:31:57 -08:00
1 parent d42a9e181c
commit 0ade08b3dd
4 files changed
+18 -13

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "photon-lemmy", "name": "photon-lemmy",
"version": "1.28.0", "version": "1.28.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
+1 -7
View File
@@ -6,20 +6,14 @@
export let route: { id: string | null } | undefined = undefined export let route: { id: string | null } | undefined = undefined
$: title = route ? routes[(route.id as keyof typeof routes) ?? ''] : '' $: title = route ? routes[(route.id as keyof typeof routes) ?? ''] : ''
let scroll = 0
</script> </script>
<svelte:window bind:scrollY={scroll} />
<div class="shell {$$props.class}" style={colorsToVars($colors)}> <div class="shell {$$props.class}" style={colorsToVars($colors)}>
<slot /> <slot />
<slot <slot
name="navbar" name="navbar"
class="sticky top-0 border-b border-slate-200 dark:border-zinc-900 class="sticky top-0 border-b border-slate-200 dark:border-zinc-900
{scroll > 0 bg-slate-25 dark:bg-zinc-950 transition-colors duration-500"
? 'bg-slate-50/70 dark:bg-zinc-950/70'
: 'bg-slate-50 dark:bg-zinc-950'} transition-colors duration-500"
style="grid-area: navbar" style="grid-area: navbar"
{title} {title}
/> />
+3 -3
View File
@@ -56,7 +56,7 @@
<span slot="label">Communities</span> <span slot="label">Communities</span>
</SidebarButton> </SidebarButton>
{#if $profileData.profiles.length >= 1} {#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)} {#each [...$profileData.profiles] as prof, index (prof.id)}
<div animate:flip={{ duration: 300, easing: expoOut }} class="w-full"> <div animate:flip={{ duration: 300, easing: expoOut }} class="w-full">
<ProfileButton {index} {prof} /> <ProfileButton {index} {prof} />
@@ -76,11 +76,11 @@
<span slot="label">Accounts</span> <span slot="label">Accounts</span>
</SidebarButton> </SidebarButton>
{/if} {/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}
{#if $profile?.user.moderates.length > 0} {#if $profile?.user.moderates.length > 0}
<CommunityList items={$profile.user.moderates.map((i) => i.community)} /> <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} {/if}
<Expandable bind:open={$userSettings.expandCommunities}> <Expandable bind:open={$userSettings.expandCommunities}>
+13 -2
View File
@@ -8,7 +8,12 @@
import Sidebar from '$lib/components/ui/sidebar/Sidebar.svelte' import Sidebar from '$lib/components/ui/sidebar/Sidebar.svelte'
// @ts-ignore // @ts-ignore
import { pwaInfo } from 'virtual:pwa-info' 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 { userSettings } from '$lib/settings.js'
import { Button, ModalContainer, Spinner, ToastContainer } from 'mono-svelte' import { Button, ModalContainer, Spinner, ToastContainer } from 'mono-svelte'
import { onMount } from 'svelte' import { onMount } from 'svelte'
@@ -61,10 +66,16 @@
} }
}) })
$: title = routes[($page.route.id as keyof typeof routes) ?? ''] $: title = routes[($page.route.id as keyof typeof routes) ?? '']
$: browser ? document.body.setAttribute('style', colorsToVars($colors)) : ''
</script> </script>
<svelte:head> <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} {#if $site}
<title>{$site.site_view.site.name}</title> <title>{$site.site_view.site.name}</title>
{#if LINKED_INSTANCE_URL} {#if LINKED_INSTANCE_URL}