diff --git a/src/lib/components/furniture/Header.svelte b/src/lib/components/furniture/Header.svelte index 4609672..85c0ef6 100644 --- a/src/lib/components/furniture/Header.svelte +++ b/src/lib/components/furniture/Header.svelte @@ -1,6 +1,5 @@ - - - -
@@ -53,7 +48,8 @@ /> {:else} - + + {/if} diff --git a/src/lib/utils/favicon.ts b/src/lib/utils/favicon.ts index d8916bf..6c3a89c 100644 --- a/src/lib/utils/favicon.ts +++ b/src/lib/utils/favicon.ts @@ -41,12 +41,11 @@ function processSvgForFavicon(svgContent: string, color: string): string { * @returns The CSS variable value or fallback color */ export function getPrimaryColor(): string { - if (typeof window === 'undefined') return '#e3ed70'; - + const fallbackColor = '#e3ed70'; + if (typeof window === 'undefined') return fallbackColor; const computedStyle = getComputedStyle(document.documentElement); const colorValue = computedStyle.getPropertyValue('--color-primary').trim(); - - return colorValue || '#e3ed70'; + return colorValue || fallbackColor; } /** @@ -60,12 +59,8 @@ export function generateFaviconDataUri(iconName: string, color?: string): string if (!svgContent) { return null; } - const faviconColor = color || getPrimaryColor(); const processedSvg = processSvgForFavicon(svgContent, faviconColor); - - // URL encode the SVG for use in data URI const encodedSvg = encodeURIComponent(processedSvg); - return `data:image/svg+xml,${encodedSvg}`; } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 29ebe6b..0ae0806 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -37,7 +37,7 @@ // Dynamic favicon based on page icon const dynamicFavicon = $derived.by(() => { - faviconTrigger; // Include faviconTrigger to force updates when theme changes + faviconTrigger; // Include in order to force updates when theme changes const currentPath = $page.url.pathname; const pageDetailsWithIcon = getPageDetailsWithIcon(currentPath); if (pageDetailsWithIcon?.icon) { @@ -92,8 +92,8 @@ - + {seoData.title} diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte index f2ffc25..0d97bb5 100644 --- a/src/routes/about/+page.svelte +++ b/src/routes/about/+page.svelte @@ -1,6 +1,4 @@