From 2ad23b42573ed98ed6d0dbcdb14ae3cbd6b7bd97 Mon Sep 17 00:00:00 2001 From: Ankur21980 Date: Mon, 21 Mar 2022 20:11:10 +0530 Subject: [PATCH] Ankur Rawat 19BCE10059 --- app.js | 29 ++++++++++++++++++ index.html | 41 ++++++++++++++++++++++++++ index.js | 0 style.css | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 156 insertions(+) create mode 100644 index.html delete mode 100644 index.js diff --git a/app.js b/app.js index e69de29..8c8356c 100644 --- a/app.js +++ b/app.js @@ -0,0 +1,29 @@ +var days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; +var setTime = setInterval(showtime, 1000); + + +function showtime() +{ + var today = new Date(); + var hours = today.getHours(); + var minutes = today.getMinutes(); + var day = today.getDay(); + + + if(hours<10) + { + hours= `0${hours}`; + } + + if(minutes<10) + { + minutes=`0${minutes}`; + + } + + toptime.innerHTML=hours+":"+ minutes; + middletime.innerHTML= hours+":"+minutes; + daydisplay.innerHTML= days[day]; +} + + setInterval(time,1000); \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..feb2e26 --- /dev/null +++ b/index.html @@ -0,0 +1,41 @@ + + + + + + + Smartwatch-ui + + + + + + + + + +
+
+
+

SmartWatch

+
+
+
+
+

+
+

+
+
+
+ + + +
+
+ +
+
+ + + \ No newline at end of file diff --git a/index.js b/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/style.css b/style.css index e69de29..c364467 100644 --- a/style.css +++ b/style.css @@ -0,0 +1,86 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + } + html,body{ + height: 98%; + width: 100%; + + background:black; + } + .container{ + display: flex; + height: 100%; + margin-top: 20px; + + } + .left{ + width: 50%; + background-color:rgb(43, 46, 56); + margin-bottom: 10px; + } + .right{ + width: 50%; + background-color: white; + margin-bottom: 10px; + } + .text{ + position: relative; + top: 285px; + left: 150px; + font-size: 4rem; + font-weight: 800; + color: white; + font-family: 'Times New Roman', Times, serif; + } + + .clock{ + height: 340px; + width: 270px; + top: 140px; + left: 230px; + background: black; + border-radius: 15%; + border-top: 25px solid grey; + border-bottom: 25px solid grey; + color: white; + position: relative; + display: flex; + flex-direction: column; + + } + .clock h4{ + text-align: center; + margin-top: 15px; + } + .centertime{ + text-align: center; + position: relative; + top: 10%; + font-size: 1.5rem; + font-family: 'Times New Roman', Times, serif; + } + .centertime h1{ + font-size: 5rem; + } + .image{ + position: relative; + top: 75px; + display: flex; + justify-content: space-between; + margin: 0px 10px; + } + button{ + background-color: transparent; + margin-top: 75px; + display: flex; + justify-content: space-around; + } + .image>img{ + width:10px; + } + .far,.fas{ + color: white; + font-size: 25px; + } \ No newline at end of file