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
19 changes: 19 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
setInterval(() => {
let today = new Date();
let day = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
];
document.getElementById('day').textContent = `${day[today.getDay()]}`;
document.getElementById('timeS').textContent = `${String(
today.getHours()
).padStart(2, '0')}:${String(today.getMinutes()).padStart(2, '0')}`;
document.getElementById('timeB').textContent = `${String(
today.getHours()
).padStart(2, '0')}:${String(today.getMinutes()).padStart(2, '0')}`;
}, 1000);
37 changes: 37 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!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>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<div class="container">
<div class="left">
<h1>SmartWatch</h1>
</div>
<div class="right">
<div class="watch">
<p id="timeS"></p>
<div class="timeB">
<p id="timeB">14:25</p>
<p id="day">Monday</p>
</div>
<div class="icons">
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="#ffffff" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><path d="M230.5,189.8A80,80,0,0,0,169.6,72.6,80,80,0,1,0,25.5,141.8l-6.2,21.6a13.9,13.9,0,0,0,17.3,17.3l21.6-6.2a80.8,80.8,0,0,0,28.2,8.9,80,80,0,0,0,111.4,39.1l21.6,6.2a13.9,13.9,0,0,0,17.3-17.3Zm-15.4-5.1a7.6,7.6,0,0,0-.9,6.2l6.2,21.5-21.5-6.2a7.6,7.6,0,0,0-6.2.9,64.2,64.2,0,0,1-88.4-23.5A80.2,80.2,0,0,0,176,104a83.6,83.6,0,0,0-1.3-14.3A64,64,0,0,1,224,152,64.8,64.8,0,0,1,215.1,184.7Z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="#ffffff" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><path d="M212.9,25.7a8,8,0,0,0-6.8-1.5l-128,32A8,8,0,0,0,72,64V174.1A36,36,0,1,0,88,204V110.2l112-28v59.9A36,36,0,1,0,216,172V32A7.8,7.8,0,0,0,212.9,25.7Z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="#ffffff" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"></rect><path d="M128,24A104,104,0,1,0,232,128,104.2,104.2,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"></path></svg>

</div>
</div>
<div class="watchBack"></div>
</div>
</div>
<script src="./app.js"></script>
</body>

</html>
81 changes: 81 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500&family=Roboto&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Noto Sans', sans-serif;
/* font-family: 'Roboto', sans-serif; */
}
.container {
border: 1px solid black;
height: 100vh;
width: 100vw;
display: flex;
}

.left {
width: 50vw;
background: #21292f;
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: xx-large;
}

.right {
width: 50vw;
display: flex;
justify-content: center;
align-items: center;
}

.watch {
background: black;
height: 50vh;
width: 22vw;
border-radius: 85px;
color: white;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding: 10px 0;
}

.watchBack {
position: absolute;
background: #3b3b3b;
height: 58vh;
width: 22vw;
border-radius: 105px;
z-index: -1;
}

#timeS {
align-self: flex-start;
position: absolute;
font-size: x-large;
}

.timeB {
display: flex;
flex-direction: column;
align-items: center;
font-size: xxx-large;
}

#day {
font-weight: 600;
}

.icons {
height: 6vh;
width: 21vw;
align-self: end;
position: absolute;
display: flex;
justify-content: space-evenly;
}