Skip to content

Commit a31ba78

Browse files
authored
make Light / Night Switch to be Dual Logic
set the dark and light switch to be switching between preset CSS class colors of defined dark and light, and not just one color like before. Resolves a lot of issues, where the default user preference settings were similar to the default switch setting that had one color only. Happy flip switching everyone !
1 parent 574b593 commit a31ba78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ <h2> :: Click and Switch the Colors :: </h2>
415415

416416
<p>
417417
Dark Mode:
418-
<a href="javascript:void(0);" onclick="ClassSwitch('html' , 'dark' , 'ColorMode');" title="Lights ON, OFF." >
418+
<a href="javascript:void(0);" onclick="DualFlipClassSwitch('html' , 'dark' , 'snow-white' , 'ColorMode');" title="Lights ON, OFF." >
419419
🌓 ⇄ 💡
420420
</a>
421421

@@ -441,11 +441,11 @@ <h2> :: Click and Switch the Colors :: </h2>
441441

442442
<br />
443443

444-
<button onclick="ClassSwitch('html' , 'snow-white' , 'ColorMode');" >
444+
<button onclick="DualFlipClassSwitch('html' , 'snow-white' , 'dark' , 'ColorMode');" >
445445
<b style="font-size:1.2rem; background-color: #ddd ; color:#fff;"> &nbsp; ❅ &nbsp; </b>
446446
</button>
447447

448-
<button onclick="ClassSwitch('html' , 'dark' , 'ColorMode');" >
448+
<button onclick="DualFlipClassSwitch('html' , 'dark' , 'snow-white' , 'ColorMode');" >
449449
Dark <b style="font-size:1.2rem; background-color: #1a1414 ; color:#d1d1d1;"> &nbsp; 🌓 ⇄ 💡 &nbsp; </b>
450450
</button>
451451

@@ -493,11 +493,11 @@ <h5> Be healthy and happy ! </h5>
493493

494494
<b> &#x23FB; On / Off Color : </b> <br />
495495

496-
<button onclick="ClassSwitch('html' , 'snow-white' , 'ColorMode');" >
496+
<button onclick="DualFlipClassSwitch('html' , 'snow-white' , 'dark' , 'ColorMode');" >
497497
<b style="font-size:1.2rem; background-color: #ddd ; color:#fff;"> &nbsp; ❅ &nbsp; </b>
498498
</button>
499499

500-
<button onclick="ClassSwitch('html' , 'dark' , 'ColorMode');" >
500+
<button onclick="DualFlipClassSwitch('html' , 'dark' , 'snow-white' , 'ColorMode');" >
501501
<b style="font-size:1.2rem; background-color: #1a1414 ; color:#d1d1d1;"> &nbsp; 🌓 &nbsp; </b>
502502
</button>
503503

0 commit comments

Comments
 (0)