-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (67 loc) · 2.21 KB
/
index.html
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
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Jujutsu Kaisen</title>
<link rel="stylesheet" href="style.css" />
<script>
document.addEventListener("DOMContentLoaded", function () {
console.log("loaded");
// Get the video element
var video = document.querySelector(".vid");
const loaderContainer = document.querySelector(".loader-container");
const loader = document.querySelector(".loader");
const container = document.querySelector(".container");
var isLoaded = false;
console.log(video);
video.addEventListener("canplay", function () {
isLoaded = true;
loader.style.display = "none";
loaderContainer.style.display = "none";
container.style.display = "block";
// Play the video
if (isLoaded) {
document.addEventListener("click", function eventHandler() {
video.play();
video.muted = false;
this.removeEventListener("click", eventHandler);
});
}
});
video.onended = function () {
video.remove();
document.querySelector(".bgImg").style.display = "block";
};
});
</script>
</head>
<body>
<div class="loader-container">
<div class="loader"></div>
</div>
<div class="container">
<div class="header">
<div class="header-item">Anime-Codes</div>
<div class="header-item">Satura Gojo</div>
<div class="header-item">Yuju Itadori</div>
<div class="header-item">Ryomen Sakuna</div>
</div>
<div class="bgImg"></div>
<div class="bgVid">
<video class="vid" src="bgVidAnime.mp4" preload="auto"></video>
</div>
<div class="content">
<div class="hero">
<h1 class="heading">Jujutsu Kaisen</h1>
<h1 class="info">A Manga Series</h1>
</div>
</div>
<div class="footer">
<a href="https://github.com/aais1" target="_blank"
><div class="footer-item">© Ali Aais</div></a
>
</div>
</div>
</body>
</html>