-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
56 lines (53 loc) · 2.37 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Elda Bio</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
<meta content="width=device-width, initial-scale=1" name="viewport" />
</head>
<body>
<div class="container">
<div class="child">
<img src="eldalogo.png" alt="Logo of Elda Bio" width="225" height="100">
</div>
<div class="child">
<h1>Detect, track, and treat melanoma earlier.</h1>
</div>
<div class="child">
<div class="emailParent">
<form class="emailParent" id="form">
<input class="emailInput" id="email" type="email" name="Email" placeholder="enter your email to keep up">
<input class="submitButton" id='submit' type="submit" value="submit">
</form>
</div>
</div>
<div class="child">
<h2>Elda Bio is coming soon. Want to learn more? Email us at <a class="styledLink" href="mailto:[email protected]?subject=Tell me more about Elda Bio">[email protected].</a></h2>
</div>
</div>
</body>
<script>
const form = document.querySelector("#form")
const submitButton = document.querySelector("#submit")
const scriptURL = 'https://script.google.com/macros/s/AKfycbwu7aPaO13FSlrLIogRbEyfyyRm6M5ZfweMr6TeMEFuGAN1EXZtyTeND77u9AGudLK7uA/exec'
form.addEventListener('submit', e => {
submitButton.disabled = true
e.preventDefault()
let requestBody = new FormData(form)
fetch(scriptURL, { method: 'POST', body: requestBody})
.then(response => {
window.location.assign("success.html")
submitButton.disabled = false
})
.catch(error => {
submitButton.disabled = false
}
)
})
</script>
</html>