-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkontak.html
113 lines (107 loc) · 5.29 KB
/
kontak.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!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" />
<link rel="shortcut icon" href="assets/img/logo.png" type="image/x-icon" />
<link rel="stylesheet" href="./styles/style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous" />
<title>Pesan</title>
</head>
<body id="main-content" style="display: none">
<video autoplay loop muted>
<source src="assets/video/bgvideo1.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
<header>
<div class="container">
<nav class="nav bg-light">
<img src="assets/img/logo2.png" class="nav-img" />
</nav>
</div>
</header>
<main>
<section id="message">
<div class="container pesan text-light">
<h2 style="text-align: center">Pesan</h2>
<form name="submit-pesan">
<div class="alert alert-primary alert-dismissible fade show d-none my-alert" role="alert">
<strong>Thank You !</strong> we have received your message.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email</label>
<input type="email" class="form-control text-light" placeholder="Masukkan Alamat Email" id="exampleInputEmail1" aria-describedby="emailHelp" name="email" style="background-color: rgba(255, 255, 255, 0.19)" />
</div>
<div class="mb-3">
<label for="exampleInputName" class="form-label">Nama Lengkap</label>
<input type="text" class="form-control text-light" placeholder="Masukkan Nama Lengkap" id="exampleInputNme" name="nama" style="background-color: rgba(255, 255, 255, 0.19)" />
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Pesan</label>
<textarea class="form-control text-light" placeholder="Masukkan Pesan" id="exampleFormControlTextarea1" rows="3" name="pesan" style="background-color: rgba(255, 255, 255, 0.19)"></textarea>
</div>
<button type="submit" class="btn btn-primary btn-kirim" style="background-color: #0051ff">Submit</button>
<button class="btn btn-primary btn-outline-light btn-loading d-none shadow" type="button">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
Loading...
</button>
</form>
</div>
</section>
</main>
<footer>
<div class="sosmed">
<a href="https://www.youtube.com/@domination_tech"><i class="fab fa-youtube"></i></a>
<a href="https://www.instagram.com/dominationtech/"><i class="fab fa-instagram"></i></a>
<a href="https://www.tiktok.com/@dominationtech"><i class="fab fa-tiktok"></i></a>
<a href="https://github.com/Dominationtech"><i class="fab fa-github"></i></a>
<p>Domination Tech © 2023</p>
</div>
</footer>
<script src="js/validasi_kontak.js"></script>
<script>
const scriptURL = "https://script.google.com/macros/s/AKfycbwU28-js1UoyC0gDV16bgVkZOyRG1L2JtDrIeS3O9U625OIdX35elMI4C5z3rBYeKjz/exec";
const form = document.forms["submit-pesan"];
const btnKirim = document.querySelector(".btn-kirim");
const btnLoading = document.querySelector(".btn-loading");
const myAlert = document.querySelector(".my-alert");
form.addEventListener("submit", (e) => {
e.preventDefault();
btnLoading.classList.toggle("d-none");
btnKirim.classList.toggle("d-none");
fetch(scriptURL, { method: "POST", body: new FormData(form) })
.then((response) => {
btnLoading.classList.toggle("d-none");
btnKirim.classList.toggle("d-none");
myAlert.classList.toggle("d-none");
form.reset();
console.log("Success!", response);
})
.catch((error) => console.error("Error!", error.message));
});
</script>
<script>
var video = document.querySelector("video");
video.addEventListener("canplaythrough", function () {
// Video telah dimuat, tampilkan konten utama
document.getElementById("main-content").style.display = "block";
});
</script>
<script>
var video = document.querySelector("video");
if (!video.canPlayType) {
document.body.classList.add("no-video");
}
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
</body>
</html>