diff --git a/.env.example b/.env.example index 802684c..fe99724 100644 --- a/.env.example +++ b/.env.example @@ -17,3 +17,4 @@ PUBLIC_BLOSSOM_URL= # Blossom server URL for uploads (e.g., h # Theme color overrides — quote the value, a leading # is read as a comment otherwise PUBLIC_ACCENT_COLOR= # override the accent color (default #e32a6d), e.g. "#00ff00"; hover shade derived PUBLIC_SECONDARY_COLOR= # override the secondary color (default #ffaf25), e.g. "#0000ff"; hover shade derived +PUBLIC_FAVICON= # favicon URL (absolute, or /favicon.png for a file in static/); default is a filled circle in the accent color diff --git a/src/lib/assets/favicon.svg b/src/lib/assets/favicon.svg deleted file mode 100644 index cc5dc66..0000000 --- a/src/lib/assets/favicon.svg +++ /dev/null @@ -1 +0,0 @@ -svelte-logo \ No newline at end of file diff --git a/src/lib/config.ts b/src/lib/config.ts index be93f91..3f7f4c2 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -62,3 +62,14 @@ export const BLOSSOM_URL = (env.PUBLIC_BLOSSOM_URL ?? "").replace(/\/$/, ""); // CSS variables defined in layout.css. Hover shades are derived in the layout. export const ACCENT_COLOR = env.PUBLIC_ACCENT_COLOR ?? ""; export const SECONDARY_COLOR = env.PUBLIC_SECONDARY_COLOR ?? ""; + +// Favicon: any URL (absolute, or root-relative for a file in static/). The +// default is a ring in the accent color (a circle with a transparent hole of +// half its radius), inlined as an SVG data URI. +const DEFAULT_ACCENT = "#e32a6d"; +export const FAVICON = + env.PUBLIC_FAVICON || + "data:image/svg+xml," + + encodeURIComponent( + ``, + ); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b475b4e..75d19b3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,6 +1,5 @@ - +