forked from vitorvelosodev/credit-card-input-page
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (66 loc) · 3.07 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
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- displays site properly based on user's device -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<title>Frontend Mentor | Interactive card details form</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="./images/favicon-32x32.png" type="image/x-icon">
<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=Space+Grotesk:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- Feel free to remove these styles or customise in your own stylesheet 👍 -->
<style>
.attribution { font-size: 11px; text-align: center; }
.attribution a { color: hsl(228, 45%, 44%); }
</style>
</head>
<body>
<div id="container-lg">
<main id="form-container">
<form action="POST">
<div id="card-name-number">
<div id="name-field">
<label for="cardholder-name">Cardholder Name</label>
<input type="text" id="cardholder-name" placeholder="e.g. Jane Apleeseed" maxlength="24">
<span id="wrong-name"></span>
</div>
<div id="number-field">
<label for="card-number">Card Number</label>
<input type="text" id="card-number" placeholder="e.g. 1234 5678 9123 0000" maxlength="19">
<span id="wrong-number"></span>
</div>
</div>
<div id="card-date-cvc">
<div id="card-date-field">
<label for="card-month">Exp. Date (MM/YY)</label>
<input type="number" id="card-month" placeholder="MM">
<input type="number" id="card-year" placeholder="YY">
<span id="wrong-year"></span>
</div>
<div id="card-cvc-field">
<label for="card-cvc">CVC</label>
<input type="number" id="card-cvc" placeholder="e.g. 123">
<span id="wrong-cvc"></span>
</div>
</div>
<button type="submit" id="submit">Confirm</button>
<span id="error-msg"></span>
</form>
</main>
<!-- Completed state start -->
<div id="second-screen">
<svg width="80" height="80" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="40" r="40" fill="url(#a)"/><path d="M28 39.92 36.08 48l16-16" stroke="#fff" stroke-width="3"/><defs><linearGradient id="a" x1="-23.014" y1="11.507" x2="0" y2="91.507" gradientUnits="userSpaceOnUse"><stop stop-color="#6348FE"/><stop offset="1" stop-color="#610595"/></linearGradient></defs></svg>
<p>THANK YOU!</p>
<p>We've added your card details</p>
<button id="btn-second-screen">Continue</button>
</div>
</div>
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
</div>
<script type="module" src="./script.js"></script>
</body>
</html>