Skip to content

Commit

Permalink
feat: add homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsierradz committed Dec 27, 2022
1 parent 30d0ef0 commit dc21301
Showing 1 changed file with 86 additions and 0 deletions.
86 changes: 86 additions & 0 deletions home/homepage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />

<title>Home</title>
<style type="text/css" media="screen">
body {
background-color: #f5f5f5;
margin: 0px;
}

.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}

#clock {
font-family: monospace;
font-size: 5rem;
font-weight: 600;
color: #000000;
margin-bottom: 0.25em;
}

.inline {
display: inline-block;
}

@media only screen and (max-width: 960px) {
.container {
height: auto;
}

#clock {
margin-top: 1em;
}

.container > .bookmark-container {
flex-direction: column;
width: 60%;
}
}
</style>
</head>

<body>
<div class="container">
<div id="clock"></div>
</div>

<script>
// Get current time and format
getTime = () => {
let date = new Date(),
min = date.getMinutes(),
sec = date.getSeconds(),
hour = date.getHours();

return (
"" +
(hour < 10 ? "0" + hour : hour) +
":" +
(min < 10 ? "0" + min : min) +
":" +
(sec < 10 ? "0" + sec : sec)
);
};

window.onload = () => {
// Set up the clock
document.getElementById("clock").innerHTML = getTime();
// Set clock interval to tick clock
setInterval(() => {
document.getElementById("clock").innerHTML = getTime();
}, 500);
};
</script>
</body>
</html>

0 comments on commit dc21301

Please sign in to comment.