-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
143 lines (131 loc) · 4.45 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!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" />
</head>
<body>
<main>
<div class="virtual-container">
<div class="virtual front">
<img src="./images/card-logo.svg" alt="card_logo" />
<p id="virtual-number">1234 5678 9123 0000</p>
<div class="virtual-expiration">
<p id="virtual-name">Jane Appleseed</p>
<p id="virtual-expiration">
<s id="virtual-mm">10</s>/<s id="virtual-yy">22</s></p>
</div>
</div>
<div class="virtual back">
<p id="virtual-cvc">123</p>
</div>
</div>
<div class="form-container">
<div class="form">
<div class="form-name">
<label for="card-name">
<span>CARDHOLDER NAME</span>
</label>
<div class="input">
<input
autocomplete="off"
onkeyup="appendInput('card-name','virtual-name','nameErr')"
placeholder="e.g Jane Appleseed"
name="card-name"
type="text"
id="card-name"
data-maxlength="27"
required
oninput="this.value=this.value.slice(0,this.dataset.maxlength)"
/>
</div>
<p class="err" id="nameErr"> ​ </p>
</div>
<div class="form-number">
<label for="card-name">
<span>CARD NUMBER</span>
</label>
<div class="input">
<input
autocomplete="off"
placeholder="e.g. 1234 5678 9123 0000"
name="card-number"
type="text"
id="credit-card"
required
/>
</div>
<p class="err" id="numberErr"> ​ </p>
</div>
<div class="form-small-inputs">
<div class="form-expiration">
<span>EXP. DATE (MM/YY)</span>
<div class="expiration-mm-yy">
<div class="form-mm">
<div class="input">
<input
autocomplete="off"
onkeypress="appendInput('card-mm','virtual-mm','mmyyErr')"
placeholder="MM"
name="card-mm"
type="number"
id="card-mm"
data-maxlength="2"
required
oninput="this.value=this.value.slice(0,this.dataset.maxlength)"
/>
</div>
</div>
<div class="form-yy">
<div class="input">
<input
autocomplete="off"
onkeypress="appendInput('card-yy','virtual-yy','mmyyErr')"
placeholder="YY"
name="card-yy"
type="number"
id="card-yy"
data-maxlength="2"
required
oninput="this.value=this.value.slice(0,this.dataset.maxlength)"
/>
</div>
</div>
</div>
<p class="err" id="mmyyErr"> ​ </p>
</div>
<div class="form-cvc">
<label for="card-cvc">
<span>CVC</span>
</label>
<div class="input">
<input
autocomplete="off"
onkeypress="appendInput('card-cvc','virtual-cvc','cvcErr')"
placeholder="e.g. 123"
name="card-cvc"
type="number"
id="card-cvc"
data-maxlength="4"
required
oninput="this.value=this.value.slice(0,this.dataset.maxlength)"
/>
</div>
<p class="err" id="cvcErr"> ​ Can't be blank </p>
</div>
</div>
<div class="button">Confirm</div>
</div>
</main>
<script src="app.js"></script>
</body>
</html>