From 03ba5dfb3ed9855485939d616fa1fd9c98ed6ca4 Mon Sep 17 00:00:00 2001 From: Swayam Vasavada Date: Wed, 28 Feb 2024 23:20:58 +0530 Subject: [PATCH] Created new project Digital Clock --- .../amandeep sigh parihar/index.html | 0 .../amandeep sigh parihar/index.js | 0 .../amandeep sigh parihar/style.css | 0 DigitalClock/swayamvasavada/index.html | 13 +++++++++++++ DigitalClock/swayamvasavada/script.js | 9 +++++++++ DigitalClock/swayamvasavada/style.css | 19 +++++++++++++++++++ 6 files changed, 41 insertions(+) rename {Digital clock => DigitalClock}/amandeep sigh parihar/index.html (100%) rename {Digital clock => DigitalClock}/amandeep sigh parihar/index.js (100%) rename {Digital clock => DigitalClock}/amandeep sigh parihar/style.css (100%) create mode 100644 DigitalClock/swayamvasavada/index.html create mode 100644 DigitalClock/swayamvasavada/script.js create mode 100644 DigitalClock/swayamvasavada/style.css diff --git a/Digital clock/amandeep sigh parihar/index.html b/DigitalClock/amandeep sigh parihar/index.html similarity index 100% rename from Digital clock/amandeep sigh parihar/index.html rename to DigitalClock/amandeep sigh parihar/index.html diff --git a/Digital clock/amandeep sigh parihar/index.js b/DigitalClock/amandeep sigh parihar/index.js similarity index 100% rename from Digital clock/amandeep sigh parihar/index.js rename to DigitalClock/amandeep sigh parihar/index.js diff --git a/Digital clock/amandeep sigh parihar/style.css b/DigitalClock/amandeep sigh parihar/style.css similarity index 100% rename from Digital clock/amandeep sigh parihar/style.css rename to DigitalClock/amandeep sigh parihar/style.css diff --git a/DigitalClock/swayamvasavada/index.html b/DigitalClock/swayamvasavada/index.html new file mode 100644 index 000000000..3fb88cd3e --- /dev/null +++ b/DigitalClock/swayamvasavada/index.html @@ -0,0 +1,13 @@ + + + + + + Digital Clock + + + + +
+ + \ No newline at end of file diff --git a/DigitalClock/swayamvasavada/script.js b/DigitalClock/swayamvasavada/script.js new file mode 100644 index 000000000..c5fee896c --- /dev/null +++ b/DigitalClock/swayamvasavada/script.js @@ -0,0 +1,9 @@ +const clockContainer = document.getElementById('clock-container'); + +function updateTime() { + const currentTime = new Date().toLocaleTimeString(); + + clockContainer.innerText = currentTime; +} + +setInterval(updateTime, 1000); \ No newline at end of file diff --git a/DigitalClock/swayamvasavada/style.css b/DigitalClock/swayamvasavada/style.css new file mode 100644 index 000000000..5ce420a4e --- /dev/null +++ b/DigitalClock/swayamvasavada/style.css @@ -0,0 +1,19 @@ +* { + margin: 0; + padding: 0; +} + +body { + background-color: black; + color: white; +} + +#clock-container { + display: flex; + justify-content: center; + align-items: center; + width: 100vw; + height: 100vh; + font-size: 4rem; + font-weight: bold; +} \ No newline at end of file