-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
69 lines (63 loc) · 1.9 KB
/
contact.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contact</title>
<link rel="stylesheet" href="tailwind.css" />
</head>
<body>
<div class="grid h-screen">
<div class="z-20 col-start-1 row-start-1">
<nav class="flex justify-center gap-5 p-5 text-lg text-white">
<a href="/">Home</a>
<a href="/about.html">About</a>
<a href="/contact.html">Contact</a>
<a href="/help.html">Help</a>
</nav>
</div>
<div class="h-screen col-start-1 row-start-1">
<img
id="hero"
class="transition-opacity duration-[2s] opacity-0 ease-in object-cover h-full w-full"
width="1920"
height="1080"
alt="Image description"
src="https://images.unsplash.com/photo-1562107383-999fee2d5772?w=1920"
/>
</div>
<div
class="z-10 flex flex-col justify-center col-start-1 row-start-1 overflow-y-hidden"
>
<h1
id="heading"
class="p-10 text-6xl font-bold text-center text-white transform translate-y-10 opacity-0"
>
Contact
</h1>
</div>
</div>
<script>
const img = document.getElementById("hero");
const heading = document.getElementById("heading");
function handleLoading(img, onLoadingComplete) {
const handleLoad = () => {
img.classList.add("fadein");
if (onLoadingComplete) {
onLoadingComplete();
}
};
if (img.complete) {
handleLoad();
} else {
img.onload = handleLoad;
}
}
function loadHeading() {
heading.classList.add("fadeinup");
}
handleLoading(img, loadHeading);
</script>
</body>
</html>