-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathdonations.html
More file actions
63 lines (59 loc) · 2.2 KB
/
Copy pathdonations.html
File metadata and controls
63 lines (59 loc) · 2.2 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Practicing Bootstrap</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="d-flex justify-content-center align-items-center vh-100 bg-light">
<div class="card shadow" style="min-width: 400px">
<div class="card-header text-center">
<h2>Donate</h2>
</div>
<div class="card-body">
<form id="donationsForm" class="fs-3">
<div class="mb-3">
<label class="form-label">Name on Card</label>
<input type="text" class="form-control fs-4" placeholder="Biggus Dickus" required>
</div>
<div class="mb-3">
<label class="form-label">Card Number</label>
<input type="text" class="form-control fs-4" placeholder="6767 6767 6767 6767" required>
</div>
<div class="row">
<div class="col">
<label class="form-label">Expiry Date</label>
<input type="text" class="form-control fs-4" placeholder="MM/YY" required>
</div>
<div class="col">
<label class="form-label">CVV</label>
<input type="text" class="form-control fs-4" placeholder="420" required>
</div>
</div>
<button type="submit" class="btn btn-primary w-100 mt-3 fs-3">Donate $10</button>
</form>
<div id="donationsFormLoading" class="text-center mt-3 d-none">
<div class="spinner-border text-primary" role="status"></div>
<div class="mt-2 fs-4">Processing...</div>
</div>
<div id="donationsFormMessage" class="text-success fw-bold text-center fs-2 mt-3 d-none">
✅ $1000 donated idiot
</div>
</div>
</div>
<script>
const form = document.getElementById('donationsForm')
const loading = document.getElementById('donationsFormLoading')
const message = document.getElementById('donationsFormMessage')
form.addEventListener('submit', e => {
e.preventDefault()
loading.classList.remove('d-none')
message.classList.add('d-none')
setTimeout(() => {
loading.classList.add('d-none')
message.classList.remove('d-none')
}, 1000)
})
</script>
</body>
</html>