mirror of
https://github.com/BillyOutlast/posthog.com.git
synced 2026-02-04 03:11:21 +01:00
set initial theme (#13411)
This commit is contained in:
@@ -981,8 +981,8 @@ const isLabel = (item: any) => !item?.url && item?.name
|
||||
const getInitialSiteSettings = (isMobile: boolean, compact: boolean) => {
|
||||
const siteSettings = {
|
||||
experience: 'posthog',
|
||||
colorMode: 'light',
|
||||
theme: 'light',
|
||||
colorMode: (typeof window !== 'undefined' && (window as any).__theme) || 'light',
|
||||
theme: (typeof window !== 'undefined' && (window as any).__theme) || 'light',
|
||||
skinMode: 'modern',
|
||||
cursor: 'default',
|
||||
wallpaper: 'keyboard-garden',
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
window.__onThemeChange(newTheme)
|
||||
}
|
||||
var preferredTheme
|
||||
var slug = window.location.pathname.substring(1)
|
||||
var darkQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
||||
darkQuery.addListener(function (e) {
|
||||
if (!localStorage.getItem('theme')) {
|
||||
|
||||
Reference in New Issue
Block a user