Graphical overhaul.

Remove all legacy pixeldrain pages, handlers and assets.
Remove old theming engine.
Make logo responsive to the accent colour.
Lots of other stuff.
This commit is contained in:
2026-10-01 02:06:00 +02:00
parent 7b2e4b4240
commit 58db683fc8
98 changed files with 1025 additions and 6475 deletions

View File

@@ -19,6 +19,7 @@ import MenuEntry from "./MenuEntry.svelte";
import { writable } from "svelte/store";
import { breadcrumbs_store } from "./BreadcrumbStore";
import ProgressBar from "util/ProgressBar.svelte";
import NovaLogo, { update_favicon } from "util/NovaLogo.svelte";
// The menu swipe will be detected if it was less than this much pixels from the
// screen edge
@@ -38,13 +39,24 @@ onMount(async () => {
menu_close()
}
// The page template already applied the branding saved on the previous
// visit, the favicon follows it
update_favicon()
await loading_run(async () => {
const user = await get_user()
if (user.username === undefined || user.username === "") {
if (!user?.username) {
// Forget the branding of a user who logged out
localStorage.removeItem("branding")
document.documentElement.style = ""
update_favicon()
return
}
const root = await fs_get_node("/me")
document.documentElement.style = css_from_path(root.path)
const branding = css_from_path(root.path)
document.documentElement.style = branding
localStorage.setItem("branding", branding)
update_favicon()
})
})
@@ -166,7 +178,7 @@ const set_offset = (off: number) => {
<a class="button" style="flex: 1 1 auto;" href="/" use:highlight_current_page>
<span style="flex: 1 1 auto;">Nova.storage</span>
<img src="/res/img/nova_64.png" style="width: 1.5em; height: 1.5em; flex: 0 0 auto;" alt="Nova.storage logo">
<NovaLogo style="width: 1.5em; height: 1.5em; flex: 0 0 auto;"/>
</a>
{#if $user !== null}
@@ -252,10 +264,6 @@ const set_offset = (off: number) => {
<i class="icon">speed</i>
<span>Speedtest</span>
</a>
<a class="button" href="/appearance" use:highlight_current_page>
<i class="icon">palette</i>
<span>Themes</span>
</a>
<a class="button" href="https://docs.nova.storage" use:highlight_current_page>
<i class="icon">text_snippet</i>
<span>Documentation</span>
@@ -299,7 +307,8 @@ const set_offset = (off: number) => {
flex-direction: row;
color: var(--body_text_color);
background-image: var(--background_image);
/* Without a branding image there's a faint glow in the accent colour */
background-image: var(--background_image, radial-gradient(ellipse 70% 60% at 15% 0%, color-mix(in srgb, var(--accent_color) 7%, transparent), transparent));
background-color: var(--background_color);
background-size: var(--background_image_size, initial);
background-position: var(--background_image_position, initial);