CS50_Labs/Lab8/homepage/index.html

56 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<script>
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
document.addEventListener('DOMContentLoaded', async function() {
while (true){
// get date
var date = new Date();
// convert date to string
var n = date.toDateString();
// get time as string
var time = date.toLocaleTimeString();
document.getElementById('time').innerHTML = n + ' ' + time;
await sleep(999)
};
});
</script>
<link href="styles.css" rel="stylesheet">
<title>Jiri Karlik - Homepage</title>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<div class="jumbotron text-center">
<h1>Introduction</h1>
<p>Hi, my name is Jiří Karlík and this is my homepage website for CS50 pset8.</p>
<img class="portrait" src="media/portrait.png" alt="Portrait of Jiri.">
</div>
<div class="container">
<div class="row">
<div class="col-sm-4 menu">
<h3><button onclick="location.href='about.html'" type="button">About Me</button></h3>
</div>
<div class="col-sm-4 menu">
<h3><button onclick="location.href='interests.html'" type="button">Interests</button></h3>
</div>
<div class="col-sm-4 menu">
<h3><button onclick="location.href='contact.html'" type="button">Contact</button></h3>
</div>
</div>
</div>
<footer>
<p id="time"></p>
</footer>
</body>
</html>