Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -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);
41 changes: 41 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Smartwatch-ui</title>




<script src='https://kit.fontawesome.com/7710ead17.js'></script>
<link rel="stylesheet" href="style.css">
</head>

<body>
<section class="container">
<section class="left">
<div class="text">
<h1>SmartWatch</h1>
</div>
</section>
<section class="right">
<div class="clock">
<h4 id="toptime"></h4>
<div class="centertime">
<h1 id="middletime"></h1>
<h5 id="daydisplay"></h5>
</div>
<div class="image">
<button><img src="./image/chat.png" alt=""></button>
<button><img src="./image/music.png" alt=""></button>
<button><img src="./image/clk.png" alt=""></button>
</div>
</div>
</div>
</section>
</section>
<script src="./app.js"></script>
</body>
</html>
Empty file removed index.js
Empty file.
86 changes: 86 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -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;
}