New files.
This commit is contained in:
28
index.html
Normal file
28
index.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Purplebored</title>
|
||||||
|
<link rel="stylesheet" href="style.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="ascii-logo">
|
||||||
|
_____ _ _ _
|
||||||
|
| __ \ | | | | | |
|
||||||
|
| |__) | _ _ __ _ __ | | ___| |__ ___ _ __ ___ __| |
|
||||||
|
| ___/ | | | '__| '_ \| |/ _ \ '_ \ / _ \| '__/ _ \/ _` |
|
||||||
|
| | | |_| | | | |_) | | __/ |_) | (_) | | | __/ (_| |
|
||||||
|
|_| \__,_|_| | .__/|_|\___|_.__/ \___/|_| \___|\__,_|
|
||||||
|
| |
|
||||||
|
|_|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="time-widget">
|
||||||
|
<div id="location">Europe/Warsaw</div>
|
||||||
|
<div id="time"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="script.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
16
script.js
Normal file
16
script.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Time Widget.
|
||||||
|
function updateTime() {
|
||||||
|
const now = new Date();
|
||||||
|
const options = {
|
||||||
|
timeZone: 'Europe/Warsaw',
|
||||||
|
hour: 'numeric',
|
||||||
|
minute: 'numeric',
|
||||||
|
second: 'numeric',
|
||||||
|
hour12: false
|
||||||
|
};
|
||||||
|
const timeString = now.toLocaleTimeString('en-US', options);
|
||||||
|
document.getElementById('time').textContent = timeString;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateTime();
|
||||||
|
setInterval(updateTime, 1000);
|
||||||
31
style.css
Normal file
31
style.css
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
body {background-color: #000;}
|
||||||
|
/* Ascii logo */
|
||||||
|
.ascii-logo {
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre;
|
||||||
|
color: #6200ff;
|
||||||
|
top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* time widget */
|
||||||
|
.time-widget {
|
||||||
|
position: fixed;
|
||||||
|
top: 50px;
|
||||||
|
right: 10px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background-color: black;
|
||||||
|
color: #6200ff;
|
||||||
|
padding: 10px;
|
||||||
|
border: 2px solid white;
|
||||||
|
width: 100px;
|
||||||
|
text-align: center;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
#time {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#location {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user