-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.html
More file actions
63 lines (54 loc) · 1.91 KB
/
template.html
File metadata and controls
63 lines (54 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>$title$</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.dots.min.js"></script>
</head>
<script>
window.onload = () => {
VANTA.DOTS({
el: "#background",
mouseControls: true,
touchControls: false,
gyroControls: true,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.50,
scaleMobile: 3.00,
color: 0x7d06c3,
color2: 0xe8615a,
backgroundColor: 0x0,
spacing: 24.00,
showLines: true
})
const date = document.querySelector('#present');
if (date) {
let parts = date.innerText.split('–');
let start = parts[0];
function updateDate() {
const d = new Date();
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, '0'); // Months are zero-based
const day = String(d.getDate()).padStart(2, '0');
const hours = String(d.getHours()).padStart(2, '0');
const minutes = String(d.getMinutes()).padStart(2, '0');
const seconds = String(d.getSeconds()).padStart(2, '0');
const formattedDateTime = year + '.' + month + '.' + day + ' ' + hours + ':' + minutes + ':' + seconds;
date.innerText = start + '–' + formattedDateTime;
}
updateDate();
setInterval(updateDate, 1000);
}
}
</script>
<body>
<div id="background"></div>
<div class="container">
$body$
</div>
</body>
</html>