Skip to content

Commit 9285e2c

Browse files
authored
feat: default new visitors to tokyonight theme (#62)
1 parent 88355bd commit 9285e2c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const viewport: Viewport = {
5151
// other forbidden characters), which makes classList.add throw
5252
// InvalidCharacterError. The catch then swallows the throw and the
5353
// dark class never lands, reintroducing the light flash.
54-
const themeInitScript = `(function(){try{var t=localStorage.getItem('quorum_theme')||'dark';if(t==='github')t='solarized';var a={light:1,solarized:1,dark:1,tokyonight:1,lovelace:1,gruvbox:1,catppuccin:1,nord:1};if(!a[t])t='dark';var c=document.documentElement.classList;if(t!=='light'&&t!=='solarized'){c.add('dark');if(t!=='dark')c.add(t);}else if(t==='solarized'){c.add('solarized');}}catch(e){}})();`
54+
const themeInitScript = `(function(){try{var t=localStorage.getItem('quorum_theme')||'tokyonight';if(t==='github')t='solarized';var a={light:1,solarized:1,dark:1,tokyonight:1,lovelace:1,gruvbox:1,catppuccin:1,nord:1};if(!a[t])t='tokyonight';var c=document.documentElement.classList;if(t!=='light'&&t!=='solarized'){c.add('dark');if(t!=='dark')c.add(t);}else if(t==='solarized'){c.add('solarized');}}catch(e){}})();`
5555

5656
export default function RootLayout({
5757
children,

src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function ChatPageContent() {
3535
const [locale, setLocale] = useState<Locale>("ko")
3636
const [responseLength, setResponseLength] = useState<ResponseLength>("medium")
3737
const [maxRounds, setMaxRounds] = useState(1)
38-
const [theme, setTheme] = useState<Theme>("dark")
38+
const [theme, setTheme] = useState<Theme>("tokyonight")
3939
const [isSettingsOpen, setIsSettingsOpen] = useState(false)
4040
const [isLoadingThread, setIsLoadingThread] = useState(false)
4141
const [fileWarning, setFileWarning] = useState<string | null>(null)

0 commit comments

Comments
 (0)