From ba77b5186b6ac0d5ccd17138b95ed4c9f870e199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20Salih=20Bozk=C4=B1r?= <150898451+MehmetBozkir@users.noreply.github.com> Date: Mon, 18 Dec 2023 18:44:27 +0300 Subject: [PATCH] second commit --- app.js | 26 ++++++++++++++++++++++++++ detail.css | 4 ++-- index.html | 7 ++++--- 3 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 app.js diff --git a/app.js b/app.js new file mode 100644 index 0000000..a5fcc6b --- /dev/null +++ b/app.js @@ -0,0 +1,26 @@ +let countDownDate = new Date("Nov 17, 2023 21:00:00"); + +let x = setInterval(function () { + let now = new Date().getTime(); + + let spentTime = now - countDownDate; + + let day = Math.floor(spentTime / (1000 * 60 * 60 * 24)); + let hour = Math.floor((spentTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + let minute = Math.floor((spentTime % (1000 * 60 * 60)) / (1000 * 60)); + let second = Math.floor((spentTime % (1000 * 60)) / 1000); + let millisecond = Math.floor(spentTime % 1000); + + document.getElementById("time").innerHTML = + "Time Spent: " + + day + + "d " + + hour + + "h " + + minute + + "m " + + second + + "s " + + millisecond + + "ms "; +}); diff --git a/detail.css b/detail.css index 5173ad7..c73db61 100644 --- a/detail.css +++ b/detail.css @@ -4,8 +4,8 @@ --black: #373737; --sect1: #ff9900; --sect2: #2196f3; - --sect3: #e63232; - --sect4: #8bc34a; + --sect3: #8bc34a; + --sect4: #e63232; --sect5: #8946ff; } diff --git a/index.html b/index.html index d2a2618..3313f4f 100644 --- a/index.html +++ b/index.html @@ -6,13 +6,14 @@
Fill in here mehmet
+