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
15 changes: 15 additions & 0 deletions Task - 2/IIT2019008/digitalClock/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function change(){
var all = new Date();
var req = [all.getHours(),all.getMinutes(),all.getSeconds()];
for (var i=0; i<3; i++){
req[i] = String(req[i]);
if (req[i].length==1){
req[i] = 0+req[i];
}
}
document.querySelector(".hour").textContent = req[0];
document.querySelector(".minute").textContent = req[1];
document.querySelector(".second").textContent = req[2];
}
change();
setInterval(change, 1000);
17 changes: 17 additions & 0 deletions Task - 2/IIT2019008/digitalClock/digitalClock.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>
Clock
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class=time>
<div class=hour></div>
<div class=minute></div>
<div class=second></div>
</div>
<script src=app.js></script>
</body>
</html>
33 changes: 33 additions & 0 deletions Task - 2/IIT2019008/digitalClock/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
body{
font-size: 100px;
color: rgb(20, 65, 61);

}
.time{
width: 30%;
margin: 0px auto;
}
.hour{
float: left;
border-radius: 20%;
background-color: rgb(149, 197, 197);
margin: 15px;
margin-top: 50%;
padding: 15px;
}
.minute{
border-radius: 20%;
float: left;
background-color: rgb(149, 197, 197);
margin: 15px;
padding: 15px;
margin-top: 50%;
}
.second{
border-radius: 20%;
margin: 15px;
padding: 15px;
float: left;
background-color: rgb(149, 197, 197);
margin-top: 50%;
}
1 change: 1 addition & 0 deletions Task - 2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upload your Task two codes here ;)