diff --git a/assets/tile.png b/assets/tile.png new file mode 100644 index 0000000..f3fb2a1 Binary files /dev/null and b/assets/tile.png differ diff --git a/assets/tile2.png b/assets/tile2.png new file mode 100644 index 0000000..36f9d52 Binary files /dev/null and b/assets/tile2.png differ diff --git a/canvas.js b/canvas.js index 41e5240..78825db 100644 --- a/canvas.js +++ b/canvas.js @@ -3,19 +3,19 @@ document.querySelectorAll(".clock").forEach((clock) => { var ctx = canvas.getContext("2d"); ctx.resetTransform(); ctx.translate(32, 32); - ctx.strokeStyle = "#FFFFFF"; + ctx.strokeStyle = getComputedStyle(document.documentElement).getPropertyValue('--foreground'); ctx.lineWidth = 2; ctx.lineCap = "round"; update(); }); function update() { document.querySelectorAll(".clock").forEach((clock, i) => { - if (clock.classList.contains("main-clock")) return; var canvas = clock.querySelector("canvas"); var ctx = canvas.getContext("2d"); + ctx.strokeStyle = getComputedStyle(document.documentElement).getPropertyValue('--foreground'); + if (clock.classList.contains("main-clock")) return; ctx.resetTransform(); ctx.translate(32, 32); - ctx.strokeStyle = "#FFFFFF"; ctx.lineWidth = 2; ctx.lineCap = "round"; var canvas = clock.querySelector("canvas"); diff --git a/index.html b/index.html index 03b3a20..8188105 100644 --- a/index.html +++ b/index.html @@ -47,23 +47,29 @@

Customize Color

-


Customize Background


+ -->
@@ -127,7 +137,6 @@
- + \ No newline at end of file diff --git a/styles/clock.css b/styles/clock.css index ded14bc..b495531 100644 --- a/styles/clock.css +++ b/styles/clock.css @@ -18,7 +18,7 @@ overflow: hidden; padding: 16px; box-sizing: border-box; - color: white; + color: var(--foreground); margin: 16px 0; } @@ -40,7 +40,7 @@ margin: 0; margin-top: 16px; padding: 0; - color: white; + color: var(--foreground); font-weight: lighter; vertical-align: middle; } @@ -55,14 +55,14 @@ .body .clock div.labels * { margin: 0; padding: 0; - color: white; + color: var(--foreground); font-weight: lighter; display: inline-block; vertical-align: middle; } .body .clock div.labels .timezone { - color: #c0c0c0; + color: #888888; } canvas { @@ -83,7 +83,7 @@ textarea { border: none; border-radius: 4px; background-color: #00000040; - color: white; + color: var(--foreground); } .deleteclock { @@ -93,7 +93,7 @@ textarea { padding: 0; border: none; background-color: #FF000080; - color: white; + color: var(--foreground); border-radius: 16px; transition: background-color 0.125s; } diff --git a/styles/dialog.css b/styles/dialog.css index e2d1cd8..a0e9ea7 100644 --- a/styles/dialog.css +++ b/styles/dialog.css @@ -17,7 +17,7 @@ min-height: 128px; background-color: var(--background-light); transition: background-color 0.125s; - color: white; + color: var(--foreground); border-radius: 8px; padding: 16px; box-sizing: border-box; @@ -83,6 +83,7 @@ input[type="radio"] + label { height: 64px; border-radius: 4px; box-shadow: 0 0 4px 2px rgba(0,0,0,0.25); + color: #FFFFFF; transition: border 0.25s; box-sizing: border-box; border: 8px solid transparent; @@ -90,6 +91,10 @@ input[type="radio"] + label { background-repeat: no-repeat; } +input[type="radio"] + label[for^="bg"] { + color: var(--foreground); +} + input[type="radio"]:checked + label { border: 8px solid #FFF6; } @@ -108,5 +113,5 @@ input[type="radio"]:focus + label { border: none; border-radius: 4px; background-color: #00000040; - color: white; + color: var(--foreground); } \ No newline at end of file diff --git a/styles/root.css b/styles/root.css index bc909f6..5fff121 100644 --- a/styles/root.css +++ b/styles/root.css @@ -2,5 +2,6 @@ --main-color: #FFFF00; --background: #202020; --background-light: #404040; + --foreground: #FFFFFF; --background-image: url("../assets/clock.png"); } \ No newline at end of file diff --git a/styles/style.css b/styles/style.css index d351bc0..231bb9d 100644 --- a/styles/style.css +++ b/styles/style.css @@ -12,7 +12,7 @@ body { background-image: var(--background-image); background-size: 128px; background-position: center; - opacity: 0.15; + opacity: 0.35; position: fixed; height: 100%; width: 100%; @@ -110,7 +110,7 @@ body { margin: none; background-color: transparent; transition: background-color 0.125s; - color: #FFFFFF; + color: var(--foreground); position: relative; display: flex; flex-direction: row; @@ -162,7 +162,7 @@ body { .header.wide button::after { left: 48px; top: calc(50% - 7px); - color: white; + color: var(--foreground); width: initial; height: 14px; padding: 0; @@ -182,7 +182,7 @@ sep { width: 100%; height: 0; background-color: transparent; - border: 1px dashed #FFFFFF; + border: 1px dashed var(--foreground); margin: 4px; z-index: 9; } @@ -212,7 +212,7 @@ sep { border: none; border-radius: 16px; background-color: transparent; - color: white; + color: var(--foreground); } .poplight button.hide::after {