This commit is contained in:
eric
2026-03-10 11:48:50 -05:00
parent eb33ed9360
commit 296d703307
41 changed files with 9072 additions and 121 deletions

10
app/theme-init.ts Normal file
View File

@@ -0,0 +1,10 @@
/**
* 主题初始化 - 在 React 水合前执行,避免主题闪烁
*/
export const themeInitScript = `
(function() {
var theme = localStorage.getItem('nomadvip-theme');
var resolved = theme === 'light' ? 'light' : (theme === 'dark' ? 'dark' : (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'));
document.documentElement.classList.add(resolved);
})();
`;