Browse Source

Fix typos

master
Nyymix 2 months ago
parent
commit
11797f5f06
  1. 6
      main.css
  2. 4
      main.js

6
main.css

@ -20,8 +20,6 @@ body {
position: absolute;
bottom: 50%;
left: 50%;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
transform-origin: bottom;
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
}
@ -34,7 +32,7 @@ body {
.clock .hands.min {
width: 4px;
height: 35%;
height: 37%;
background-color: #000000;
}
@ -42,6 +40,8 @@ body {
width: 2px;
height: 42%;
background-color: #ff0000;
border-top-left-radius: 40%;
border-top-right-radius: 40%;
}
.clock .dot {

4
main.js

@ -5,9 +5,9 @@ function setClock() {
const secRatio = currentDate.getSeconds() / 60;
const minRatio = (secRatio + currentDate.getMinutes()) / 60;
const horRatio = (minRatio + currentDate.getHours()) / 12;
const hrsRatio = (minRatio + currentDate.getHours()) / 12;
document.getElementById('sek').style.setProperty('--rotation', secRatio * 360);
document.getElementById('min').style.setProperty('--rotation', minRatio * 360);
document.getElementById('hrs').style.setProperty('--rotation', horRatio * 360);
document.getElementById('hrs').style.setProperty('--rotation', hrsRatio * 360);
}
Loading…
Cancel
Save