File tree Expand file tree Collapse file tree 4 files changed +55
-5
lines changed Expand file tree Collapse file tree 4 files changed +55
-5
lines changed Original file line number Diff line number Diff line change 54
54
list-style-type : disc !important ;
55
55
margin-left : 1rem ;
56
56
}
57
+
58
+ .dark-mode {
59
+ background : # 1a1a1a !important ;
60
+ color : # ffffff !important ;
61
+ }
62
+ .dark-mode .bg-white {
63
+ background-color : # 2d2d2d !important ;
64
+ border-color : # 404040 !important ;
65
+ }
66
+
67
+ .dark-mode input [type = "text" ],
68
+ .dark-mode input [type = "date" ],
69
+ .dark-mode # scrumReport {
70
+ background-color : # 404040 !important ;
71
+ border-color : # 505050 !important ;
72
+ color : # ffffff !important ;
73
+ }
74
+ .dark-mode h3 ,
75
+ .dark-mode h4 ,
76
+ .dark-mode p ,
77
+ .dark-mode label {
78
+ color : # ffffff !important ;
79
+ }
80
+
81
+ .dark-mode hr {
82
+ border-color : # 505050 !important ;
83
+ }
Original file line number Diff line number Diff line change 19
19
</ style >
20
20
</ head >
21
21
< body >
22
- < div class ="pl-2 py-4 rounded-2xl ">
23
- < div class ="bg-white pl -4 py-4 mx-2 mb-2 rounded-3xl ">
22
+ < div class ="pl-1 py-4 rounded-2xl ">
23
+ < div class ="bg-white px -4 py-4 mx-4 mb-2 rounded-3xl ">
24
24
< div class ="flex justify-between py-2 ">
25
25
< h3 class ="text-3xl font-semibold "> Scrum Helper</ h3 >
26
- < img src ="icons/night-mode.png " alt ="Night Mode " class ="w-7 h-7 mx-3 ">
26
+ < img src ="icons/night-mode.png " alt ="Night Mode " class ="w-7 h-7 mx-3 cursor-pointer ">
27
27
</ div >
28
28
< div >
29
29
< p class ="font-semibold "> SCRUM helper prefills the Scrums in google groups, with your FOSSASIA's contributions.</ p >
@@ -41,7 +41,7 @@ <h3 class="text-3xl font-semibold ">Scrum Helper</h3>
41
41
</ div >
42
42
43
43
< div class ="rounded-2xl ">
44
- < div class =" border-gray-100 border-2 bg-white rounded-3xl pl -4 py-2 mx-2 my-2 ">
44
+ < div class =" border-gray-100 border-2 bg-white rounded-3xl px -4 py-4 mx-4 my-2 ">
45
45
< div >
46
46
< h4 > Your Project Name</ h4 >
47
47
< input id ="projectName " type ="text " class ="w-full border-2 border-gray-200 bg-gray-200 rounded-xl text-gray-800 p-2 my-2 " placeholder ="Enter your project name ">
Original file line number Diff line number Diff line change @@ -80,4 +80,27 @@ document.getElementById('customDateContainer').addEventListener('click', () => {
80
80
// document.querySelectorAll('input[name="timeframe"]').forEach(radio => radio.checked = false);
81
81
// document.getElementById('startingDate').disabled = false;
82
82
// document.getElementById('endingDate').disabled = false;
83
- // });
83
+ // });
84
+
85
+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
86
+ const darkModeToggle = document . querySelector ( 'img[alt="Night Mode"]' ) ;
87
+ const body = document . body ;
88
+
89
+ chrome . storage . local . get ( [ 'darkMode' ] , function ( result ) {
90
+ if ( result . darkMode ) {
91
+ body . classList . add ( 'dark-mode' ) ;
92
+ darkModeToggle . src = 'icons/light-mode.png' ;
93
+ }
94
+ } ) ;
95
+
96
+ darkModeToggle . addEventListener ( 'click' , function ( ) {
97
+ body . classList . toggle ( 'dark-mode' ) ;
98
+ const isDarkMode = body . classList . contains ( 'dark-mode' ) ;
99
+
100
+ // Save preference
101
+ chrome . storage . local . set ( { darkMode : isDarkMode } ) ;
102
+
103
+ // Toggle icon
104
+ this . src = isDarkMode ? 'icons/light-mode.png' : 'icons/night-mode.png' ;
105
+ } ) ;
106
+ } )
You can’t perform that action at this time.
0 commit comments