fixed light theme
This commit is contained in:
@@ -40,6 +40,8 @@ try {
|
||||
<title>{title} | {siteConfig.title}</title>
|
||||
{siteConfig.custom_css && <style set:html={siteConfig.custom_css} />}
|
||||
<script is:inline define:vars={{ defaultTheme: siteConfig.theme }}>
|
||||
// Prevention of FOUC (Flash of Unstyled Content)
|
||||
// Immediately apply theme before rendering
|
||||
const savedTheme = localStorage.getItem('user-theme') || defaultTheme;
|
||||
document.documentElement.className = savedTheme;
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user