From d2b73443bbe552ca998d0bdfef241375ad0b7d36 Mon Sep 17 00:00:00 2001 From: sarthak395 <98270116+sarthak395@users.noreply.github.com> Date: Mon, 23 May 2022 12:50:10 +0530 Subject: [PATCH 1/3] updated script.js --- script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index a3b083f..23ef99c 100644 --- a/script.js +++ b/script.js @@ -7,15 +7,15 @@ const secondHand = document.querySelector('.second-hand'); const seconds = now.getSeconds(); const secondsDegrees = ((seconds / 60) * 360) + 90; - secondHand.style.transform = `rotate(${secondsDegrees}deg)`; + secondHand.style.transform = "rotate(" + secondsDegrees "deg)"; const mins = now.getMinutes(); const minsDegrees = ((mins / 60) * 360) + ((seconds/60)*6) + 90; - minsHand.style.transform = `rotate(${minsDegrees}deg)`; + minsHand.style.transform = "rotate(" minsDegrees "deg)"; const hour = now.getHours(); const hourDegrees = ((hour / 12) * 360) + ((mins/60)*30) + 90; - hourHand.style.transform = `rotate(${hourDegrees}deg)`; + hourHand.style.transform = "rotate(" hourDegrees "deg)"; } setInterval(setDate, 1000); From 459fedaacaee5ce6be2c5515928e04f545627d1c Mon Sep 17 00:00:00 2001 From: sarthak395 <98270116+sarthak395@users.noreply.github.com> Date: Mon, 23 May 2022 12:51:04 +0530 Subject: [PATCH 2/3] updated script.js again --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 23ef99c..ebd3d4a 100644 --- a/script.js +++ b/script.js @@ -11,11 +11,11 @@ const secondHand = document.querySelector('.second-hand'); const mins = now.getMinutes(); const minsDegrees = ((mins / 60) * 360) + ((seconds/60)*6) + 90; - minsHand.style.transform = "rotate(" minsDegrees "deg)"; + minsHand.style.transform = "rotate(" + minsDegrees + "deg)"; const hour = now.getHours(); const hourDegrees = ((hour / 12) * 360) + ((mins/60)*30) + 90; - hourHand.style.transform = "rotate(" hourDegrees "deg)"; + hourHand.style.transform = "rotate(" + hourDegrees + "deg)"; } setInterval(setDate, 1000); From 186562143a26c6045f73bbf1008a17d47659fc47 Mon Sep 17 00:00:00 2001 From: sarthak395 <98270116+sarthak395@users.noreply.github.com> Date: Mon, 23 May 2022 12:53:02 +0530 Subject: [PATCH 3/3] updated main.css included photo of a clock to make it look more natural --- main.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.css b/main.css index 5876d15..a4a1380 100644 --- a/main.css +++ b/main.css @@ -16,6 +16,9 @@ } .clock { + background: url(https://media.geeksforgeeks.org/wp-content/uploads/20210302161254/imgonlinecomuaCompressToSizeOmNATjUMFKw-300x300.jpg); + background-size: 100%; + width: 30rem; height: 30rem; border:20px solid white; @@ -47,4 +50,4 @@ transform: rotate(90deg); transition: all 0.05s; transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); - } \ No newline at end of file + }