-
Notifications
You must be signed in to change notification settings - Fork 0
/
Contact.html
executable file
·94 lines (76 loc) · 2.49 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
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
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title> Urban Sports Club</title>
<meta name="description" content="Dummy form acting as signup page">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content=""/>
<meta property="og:type" content=""/>
<meta property="og:url" content=""/>
<meta property="og:image" content=""/>
<link rel="manifest" href="site.webmanifest">
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/utility-classes.css">
<link href="./css/Contact.css" rel=stylesheet>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js"></script>
<meta name="theme-color" content="#fafafa">
</head>
<body class="flex set-size">
<div class="hero">
<div class="sign1">Sign up to the <br> club! 😀</div>
<div class="sign2">Coming this summer.</div>
<div class="form">
<label>
<input class="emailinput" placeholder="Email" required size="320" type="email">
</label>
<button id='submitBtn'
onclick="validateEmail()" type="button">
I'm Interested
</button>
</div>
</div>
<script>
function validateEmail() {
let email = document.getElementsByClassName('emailinput')[0];
let emailValue = email.value;
if (/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(emailValue)) {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 3000,
timerProgressBar: false,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'success',
title: ' Success! You will be notified when the club is ready.'
})
} else {
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 3000,
timerProgressBar: false,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: ' Uh oh! Please enter a valid email.'
})
}
}
</script>
</body>
</html>