aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Daniel Smith <rdnlsmith@gmail.com> 2019-05-20 14:39:05 -0400
committerGravatar Daniel Smith <rdnlsmith@gmail.com> 2019-05-20 14:39:05 -0400
commit0f848de16ff4711e2d77cd93e345c679faed6cbc (patch)
tree47c257697fb8a60e15924c18a12c93d8fa1e7bbe
parent295ded5c11186179b2fcd7877e1fc47bc57ddda9 (diff)
Darken leading 0 in date
-rw-r--r--app/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/index.js b/app/index.js
index c066693..5f21478 100644
--- a/app/index.js
+++ b/app/index.js
@@ -122,8 +122,15 @@ function setMins(val) {
}
function setDate(val) {
- util.drawDigit(Math.floor(val / 10), date1);
+ let tens = Math.floor(val / 10);
+ util.drawDigit(tens, date1);
util.drawDigit(Math.floor(val % 10), date2);
+
+ if (tens == 0) {
+ date1.style.opacity = 0.2;
+ } else {
+ date1.style.opacity = 1;
+ }
}
function setDay(val) {