-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
118 lines (117 loc) · 4.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
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
114
115
116
117
118
<!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"
/>
<link rel="stylesheet" href="style.css" />
<title>Frontend Mentor | Interactive card details form</title>
</head>
<body>
<main>
<div class="container">
<div class="left_section">
<div class="cards">
<div class="front_card">
<img
src="./images/card-logo.svg"
alt="card-logo"
class="card_logo"
/>
<div class="card_container">
<img src="./images/bg-card-front.png" alt="front-card" />
<h1 id="number">0000 0000 0000 0000</h1>
<div class="card_info">
<span id="name">Abc Def</span>
<span id="date">
<span id="month">00</span>
/
<span id="year">00</span>
</span>
</div>
</div>
</div>
<div class="back_card">
<img src="./images/bg-card-back.png" alt="back-card" />
<span id="cvc">000</span>
</div>
</div>
</div>
<div class="right_section">
<form>
<div class="grid_1">
<label for="card_name">Cardholder Name</label>
<input
type="text"
placeholder="eg. Abc Def"
id="card_name"
required
/>
</div>
<div class="grid_2">
<label for="card_number">Card Number</label>
<input
type="number"
oninput="if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
minlength="16"
maxlength="16"
placeholder="eg. 1234 5678 9000 1234"
id="card_number"
required
/>
</div>
<div class="card_information">
<div id="card_date">
<label for="card_date">Exp. Date (MM/YY)</label>
<div class="two_inp">
<div>
<input
type="number"
placeholder="MM"
oninput="if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
minlength="2"
maxlength="2"
id="card_month"
required
/>
</div>
<div>
<input
oninput="if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
type="number"
minlength="2"
maxlength="2"
placeholder="YY"
id="card_year"
required
/>
</div>
</div>
</div>
<div class="grid_4">
<label for="card_cvc">CVC</label>
<input type="number" oninput="if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" maxlength="3" placeholder="***" id="card_cvc" required />
</div>
</div>
<button id="submit_btn" type="submit">Confirm</button>
</form>
<div class="thank hidden">
<img src="./images/icon-complete.svg" alt="Completed" />
<h1>Thank you!</h1>
<p>We've added your card details</p>
<button>Continue</button>
</div>
</div>
</div>
</main>
<!-- Completed state start -->
<script src="https://unpkg.com/imask"></script>
<script src="app.js"></script>
</body>
</html>