Skip to content

Commit d1c5cf1

Browse files
committed
Added a banner to the default admin page. Please have mercy on me =( (C) whatthecommit.com
1 parent 0e5327d commit d1c5cf1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

css-theme/src/app.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ WebFont.load({
1111
const light: HTMLLinkElement = document.querySelector('#light');
1212
const dark: HTMLLinkElement = document.querySelector('#dark');
1313

14-
const theme = localStorage.getItem('theme');
14+
const theme:string = localStorage.getItem('theme');
1515
const body: HTMLElement = document.body;
16-
body.classList.add(theme ? theme : 'dark');
16+
const defaultTheme: string = 'dark';
17+
body.classList.add(theme ? theme : defaultTheme);
1718

1819
dark.onclick = e => {
1920
body.classList.remove('light');

0 commit comments

Comments
 (0)