File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 3333 # holder {
3434 position : relative;
3535 }
36+ .dark {
37+ color : # fff ;
38+ }
3639 </ style >
3740</ head >
38- < body >
41+ < body id =" body " >
3942
4043 < div id ="holder ">
4144 < div class ="language-javascript " id ="editor "> </ div >
Original file line number Diff line number Diff line change 1+ const urlSearchParams = new URLSearchParams ( window . location . search ) ;
2+ const params = Object . fromEntries ( urlSearchParams . entries ( ) ) ;
3+ if ( params . theme === "dark" ) {
4+ document . getElementById ( "body" ) . classList . remove ( 'light' ) ;
5+ document . getElementById ( "body" ) . classList . add ( 'dark' ) ;
6+ } else {
7+ document . getElementById ( "body" ) . classList . remove ( 'dark' ) ;
8+ document . getElementById ( "body" ) . classList . add ( 'light' ) ;
9+ }
10+
111hljs . configure ( { ignoreUnescapedHTML : true } )
212const jar = CodeJar ( document . querySelector ( '#editor' ) , hljs . highlightElement , { tab : '\t' } ) ;
313jar . updateCode ( `console.log("Hello there!")` )
Original file line number Diff line number Diff line change 130130 color : black;
131131}
132132
133- .react-kanban-card {
133+ .dark . react-kanban-card {
134134 backdrop-filter : blur (16px ) saturate (180% );
135135 -webkit-backdrop-filter : blur (16px ) saturate (180% );
136136 background-color : rgba (17 , 25 , 40 , 0 );
143143}
144144
145145@media (max-width : 1400px ) {
146- .react-kanban-card , .react-kanban-card-adder-form , .react-kanban-card-skeleton {
146+ .dark . react-kanban-card , .react-kanban-card-adder-form , .react-kanban-card-skeleton {
147147 border : 2px ;
148148 background-color : black;
149149 box-sizing : border-box;
Original file line number Diff line number Diff line change 1+ import { useApp } from "./context/appContext"
2+
13const Sandbox = ( ) => {
2- return < iframe style = { { minHeight : 600 , width : "100%" } } src = "sandbox.html" />
4+ const { theme } = useApp ( )
5+ return < iframe style = { { minHeight : 600 , width : "100%" } } src = { `sandbox.html?theme=${ theme } ` } />
36}
47
58export default Sandbox
You can’t perform that action at this time.
0 commit comments