Commit 1c14bcb 1 parent 43aad67 commit 1c14bcb Copy full SHA for 1c14bcb
File tree 6 files changed +51
-3
lines changed
engine/src/main/resources/template
6 files changed +51
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
8
8
Back to [ Readme] ( README.md ) .
9
9
10
+ ## [ 3.8.2] - 2024-10-30
11
+
12
+ ### Added
13
+
14
+ * Dark mode
15
+
10
16
## [ 3.8.1] - 2024-09-12
11
17
12
18
### Changed
@@ -918,6 +924,8 @@ the core component is now the reporting engine that is the base for other forms
918
924
919
925
Initial project version on GitHub and Maven Central.
920
926
927
+ [ 3.8.2 ] : https://github.com/trivago/cluecumber-report-plugin/tree/v3.8.2
928
+
921
929
[ 3.8.1 ] : https://github.com/trivago/cluecumber-report-plugin/tree/v3.8.1
922
930
923
931
[ 3.8.0 ] : https://github.com/trivago/cluecumber-report-plugin/tree/v3.8.0
Original file line number Diff line number Diff line change @@ -297,4 +297,23 @@ tr.even td, tr.odd td {
297
297
298
298
.multiRunChildren {
299
299
margin-top : 1rem ;
300
- }
300
+ }
301
+
302
+ html .dark-mode {
303
+ filter : invert (100% ) hue-rotate (180deg );
304
+ }
305
+
306
+ html .dark-mode img ,
307
+ html .dark-mode video ,
308
+ html .dark-mode .color-passed ,
309
+ html .dark-mode .color-failed ,
310
+ html .dark-mode .color-skipped ,
311
+ html .dark-mode .border-color-passed ,
312
+ html .dark-mode .border-color-failed ,
313
+ html .dark-mode .border-color-skipped {
314
+ filter : invert (100% ) hue-rotate (180deg );
315
+ }
316
+
317
+ # dark-mode-toggle {
318
+ margin-right : 10px ;
319
+ }
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ limitations under the License.
61
61
</li >
62
62
</#list >
63
63
</ul >
64
+ <button id =" dark-mode-toggle" class =" btn btn-secondary btn-sm" >Toggle Dark Mode</button >
64
65
<span class =" text-light" >${reportDetails.date} </span >
65
66
</div >
66
67
</nav >
Original file line number Diff line number Diff line change @@ -125,9 +125,29 @@ limitations under the License.
125
125
if (${expandPreviousScenarioRuns? c}) {
126
126
$ (" [data-cluecumber-item='multi-run-button']" ).click ();
127
127
}
128
+
129
+ const isDarkMode = localStorage .getItem (' darkMode' ) === ' enabled' ;
130
+ if (isDarkMode) {
131
+ document .documentElement .classList .add (' dark-mode' );
132
+ }
133
+ updateToggleButton (isDarkMode);
134
+
135
+ document .getElementById (' dark-mode-toggle' ).addEventListener (' click' , toggleDarkMode);
128
136
}
129
137
);
130
138
139
+ function toggleDarkMode () {
140
+ document .documentElement .classList .toggle (' dark-mode' );
141
+ const isDarkMode = document .documentElement .classList .contains (' dark-mode' );
142
+ localStorage .setItem (' darkMode' , isDarkMode ? ' enabled' : ' disabled' );
143
+ updateToggleButton (isDarkMode);
144
+ }
145
+
146
+ function updateToggleButton (isDarkMode ) {
147
+ const button = document .getElementById (' dark-mode-toggle' );
148
+ button .textContent = isDarkMode ? ' Toggle Light Mode' : ' Toggle Dark Mode' ;
149
+ }
150
+
131
151
function resizeIframe (iframe ) {
132
152
setInterval (function () {
133
153
try {
Original file line number Diff line number Diff line change 6
6
7
7
<groupId >blog.softwaretester</groupId >
8
8
<artifactId >maven-example</artifactId >
9
- <version >3.8.1 </version >
9
+ <version >3.8.2 </version >
10
10
<packaging >pom</packaging >
11
11
12
12
<properties >
Original file line number Diff line number Diff line change 21
21
</modules >
22
22
23
23
<properties >
24
- <revision >3.8.1 </revision >
24
+ <revision >3.8.2 </revision >
25
25
<maven .compiler.source>11</maven .compiler.source>
26
26
<maven .compiler.target>11</maven .compiler.target>
27
27
<maven .compiler.release>11</maven .compiler.release>
You can’t perform that action at this time.
0 commit comments