This commit is contained in:
Kainoa Kanter 2022-03-05 19:01:27 -08:00
parent b5b6ef5006
commit 4ca9dd5ce9
3 changed files with 56 additions and 48 deletions

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -2,15 +2,23 @@
<html> <html>
<head> <head>
<title>Home</title> <title>Home</title>
<meta charset ="UTF-8"> <meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="style/style.css"> <link rel="stylesheet" type="text/css" href="style/style.css" />
<link rel="shortcut icon" href="icon/buildings (1).png"> <link rel="shortcut icon" href="favicon.png" />
</head> </head>
<body> <body>
<div class="everything"> <div class="everything">
<div id="time" class="time"></div> <div id="time" class="time"></div>
<form action="https://gowogle.voring.me/search" method="GET"> <form action="https://gowogle.voring.me/search" method="GET">
<input autofocus name="q" class="search" type="search" id="search-bar-input" placeholder="" autofocus> <input
autofocus
name="q"
class="search"
type="search"
id="search-bar-input"
placeholder=""
autofocus
/>
</form> </form>
<div class="box"> <div class="box">
<div class="link"> <div class="link">
@ -31,22 +39,22 @@
</div> </div>
<!-- Feel free to add more divs here --> <!-- Feel free to add more divs here -->
</div> </div>
</div> </div>
<script> <script>
function updateClock() { function updateClock() {
let date = new Date(); let date = new Date();
let hours = date.getHours(); let hours = date.getHours();
let minutes = date.getMinutes(); let minutes = date.getMinutes();
let ampm = hours >= 12 ? 'pm' : 'am'; let ampm = hours >= 12 ? "pm" : "am";
hours = hours % 12; hours = hours % 12;
hours = hours ? hours : 12; hours = hours ? hours : 12;
minutes = minutes < 10 ? '0'+minutes : minutes; minutes = minutes < 10 ? "0" + minutes : minutes;
let time = hours + ':' + minutes + ' ' + ampm; let time = hours + ":" + minutes + " " + ampm;
document.getElementById('time').innerHTML = time; document.getElementById("time").innerHTML = time;
setTimeout(updateClock, 1000); setTimeout(updateClock, 1000);
} }
updateClock(); updateClock();
</script> </script>
</body> </body>
</html> </html>