Skip to content

Commit b3fa338

Browse files
committed
add support for digital clock time color
1 parent 1fcc028 commit b3fa338

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ planned for 2025-04-01
1616
### Added
1717

1818
- Added Arabic translation.
19+
- add support for css on digital clock hour/minute thru css using clock_hour and clock_minute classes
1920

2021
### Changed
2122

modules/default/clock/clock.js

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ Module.register("clock", {
146146
}
147147

148148
if (this.config.displayType !== "analog" && this.config.showTime) {
149+
let ts = timeString.split(":");
150+
timeString = `<span class="clock_hour">${ts[0]}</span>:<span class="clock_minute">${ts[1]}</span>`;
149151
timeWrapper.innerHTML = timeString;
150152
secondsWrapper.innerHTML = now.format("ss");
151153
if (this.config.showPeriodUpper) {

0 commit comments

Comments
 (0)