Commit 1f040e65 authored by colmoneill's avatar colmoneill
Browse files

trying gitlab pages again

parent 35a38310
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>UI Programming 21 22</title>
<link href="screen.css" rel="stylesheet" text="text/css">
</head>
<body>
<h1 id="main">Hello world</h1>
<section class="visual-time">
<div class="time-indic" id="hours"></div>
<div class="time-indic" id="minutes"></div>
<div class="time-indic" id="seconds"></div>
</section>
<script src="script.js"></script>
</body>
</html>
\ No newline at end of file
html{
background-color: black;
font-family: monospace;
}
h1{
color: white;
text-align: center;
margin-top: 50px;
}
section.visual-time{
margin-top: 100px;
}
div.time-indic{
background-color: white;
display: block;
text-align: center;
width: 20px;
min-height: 100px;
clear: both;
margin: 0 auto;
margin-bottom: 20px;
}
\ No newline at end of file
function currentTime() {
var date = new Date(); /* creating object of Date class */
var hour = date.getHours();
var min = date.getMinutes();
var sec = date.getSeconds();
var operand = 4;
document.getElementById("main").innerHTML = hour + " : " + min + " : " + sec;
var visHours = document.getElementById("hours");
visHours.style.width = hour * operand + "px";
var visMins = document.getElementById("minutes");
visMins.style.width = min * operand + "px";
var visSecs = document.getElementById("seconds");
visSecs.style.width = sec * (operand * 2) +"px";
if (sec < 10) {
visHours.style.opacity = "0.0" + sec;
visMins.style.opacity = "0.0" + sec;
visSecs.style.opacity = "0.0" + sec;
}
else{
visHours.style.opacity = "0." + sec;
visMins.style.opacity = "0." + sec;
visSecs.style.opacity = "0." + sec;
}
var t = setTimeout(function(){ currentTime() }, 1000); /* setting timer */
}
currentTime()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment