This repository was archived by the owner on Apr 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 font-weight : 400 ;
4545 font-style : normal;
4646}
47+
48+ .splash-screen {
49+ background-color : # 4a423b !important ;
50+ }
Original file line number Diff line number Diff line change 1+ var isDark = window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ;
2+
3+ var body = document . querySelector ( 'body' ) ;
4+ var html = document . querySelector ( 'html' ) ;
5+ var defClassName = 'splash-screen' ;
6+
7+ if ( ! isDark ) {
8+ body ?. classList . remove ( defClassName ) ;
9+ html . classList . remove ( defClassName ) ;
10+ }
Original file line number Diff line number Diff line change 11<!doctype html>
2- < html class ="mode__full-page light ">
2+ < html class ="mode__full-page light splash-screen ">
33 <!--
44 Hello! Thanks for showing interest in our code.
55 Interested in joining our team? To learn more, email us:
3131 type ="font/woff2 "
3232 />
3333 </ head >
34- < body >
34+ < body class =" splash-screen " >
3535 < div id ="app "> </ div >
36+ < script src ="/assets/splash-screen.js "> </ script >
3637 < script src ="browser-polyfill.js "> </ script >
3738 </ body >
3839</ html >
Original file line number Diff line number Diff line change 11<!doctype html>
2- < html class ="mode__popup light ">
2+ < html class ="mode__popup light splash-screen ">
33 < head >
44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1 " />
66 < link href ="/assets/base.css " rel ="stylesheet " />
77 </ head >
8- < body >
8+ < body class =" splash-screen " >
99 < div id ="app "> </ div >
10+ < script src ="/assets/splash-screen.js "> </ script >
1011 < script src ="browser-polyfill.js "> </ script >
1112 </ body >
1213</ html >
Original file line number Diff line number Diff line change @@ -47,10 +47,26 @@ function setUserSelectedTheme(theme: UserSelectedTheme) {
4747interface ThemeSwitcherProviderProps {
4848 children : React . JSX . Element | React . JSX . Element [ ] ;
4949}
50+
51+ function removeDefaultBg ( ) {
52+ const body = document . querySelector ( 'body' ) ;
53+ const html = document . querySelector ( 'html' ) ;
54+ const defClassName = 'splash-screen' ;
55+
56+ if ( ! body || ! html ) return ;
57+
58+ body . classList . remove ( defClassName ) ;
59+ html . classList . remove ( defClassName ) ;
60+ }
61+
5062export function ThemeSwitcherProvider ( { children } : ThemeSwitcherProviderProps ) {
5163 const userSelectedTheme = useUserSelectedTheme ( ) ;
5264 const [ theme , setTheme ] = useState < ComputedTheme > ( ( ) => getComputedTheme ( userSelectedTheme ) ) ;
5365
66+ useEffect ( ( ) => {
67+ removeDefaultBg ( ) ;
68+ } , [ ] ) ;
69+
5470 useEffect ( ( ) => {
5571 switch ( userSelectedTheme ) {
5672 case 'system' : {
You can’t perform that action at this time.
0 commit comments