mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-16 18:05:35 -04:00
fix: eliminate white flash on page load for dark theme users (#7358)
Co-authored-by: Docker User <user@example.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com> Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
@@ -50,6 +50,12 @@ export default defineNuxtConfig({
|
||||
content: "Mealie is a recipe management app for your kitchen.",
|
||||
},
|
||||
],
|
||||
script: [
|
||||
{
|
||||
innerHTML: `(function(){try{var d=localStorage.getItem('vueuse-color-scheme');var m=d==='dark'||(d!=='light'&&matchMedia('(prefers-color-scheme:dark)').matches);document.documentElement.style.backgroundColor=m?'#1E1E1E':'#FFFFFF'}catch(e){}})()`,
|
||||
type: "text/javascript",
|
||||
},
|
||||
],
|
||||
link: [
|
||||
{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" },
|
||||
{ rel: "shortcut icon", type: "image/png", href: "/icons/icon-x64.png" },
|
||||
|
||||
Reference in New Issue
Block a user