-
Notifications
You must be signed in to change notification settings - Fork 47
/
style-examples.html
354 lines (336 loc) · 12 KB
/
style-examples.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500&display=swap"
rel="stylesheet"
/>
<link rel="shortcut icon" href="favicon.ico" />
<link
rel="stylesheet"
type="text/css"
href="vendor/main.css"
/>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/color-brewer.min.css"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin="anonymous"
/>
<script src="https://js.verygoodvault.com/vgs-collect/2.23.0/vgs-collect.js"></script>
</head>
<body>
<main>
<div
class="alert alert-success alert-dismissible hidden show fade request-success"
role="alert"
>
<strong>Request successfully submitted!</strong>
<button
type="button"
class="close"
data-dismiss="alert"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div
class="alert alert-danger alert-dismissible hidden show fade request-error"
role="alert"
>
<strong></strong>
<button
type="button"
class="close"
data-dismiss="alert"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<section class="container pt-5 py-lg-5 pb-5">
<div class="text-center">
<h1 class="mb-2">VGS Collect.js examples</h1>
<p class="mb-4">
VGS Collect.js is a javascript library that allows you to integrate
secure fields with non-secure fields in your page. <br />The secure
fields behave like traditional input fields while preventing access
to the unsecured data.
</p>
<div class="flex justify-content-center navigation-links">
<a
target="_blank"
href="https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it"
class="btn btn-primary"
>
Documentation
</a>
<a
target="_blank"
href="./style-examples.html"
class="btn btn-primary"
>
Style Examples
</a>
<a
target="_blank"
href="./masked-examples.html"
class="btn btn-primary"
>
Input Masking
</a>
</div>
</div>
</section>
<section id="credit-card-example" class="container pt-lg-5">
<div class="row">
<div class="col-md-6">
<a
href="https://codesandbox.io/s/qkwrmwyyk9?fontsize=14&module=%2Fscript.js"
target="_blank"
class="source-link"
>
<i class="fas fa-code"></i>
Play with the style
</a>
<div class="form-container">
<div class="card-front">
<div class="shadow"></div>
<div class="image-container">
<span class="amount">PAYING: <strong>$1</strong></span>
<span class="card-image">
<i class="far fa-credit-card"></i>
</span>
</div>
<form id="cc-form">
<div id="cc-number" class="card-number-container">
<label for="cc-number" class="hidden">Card Number</label>
<span class="field-space"></span>
</div>
<div id="cc-holder" class="cardholder-container">
<label for="cc-holder" class="hidden">Card Holder</label>
<span class="field-space"></span>
</div>
<div id="cc-exp" class="exp-container">
<label for="cc-exp" class="hidden">Expiration</label>
<span class="field-space"></span>
</div>
<div id="cc-cvc" class="cvc-container">
<label for="cc-cvc" class="hidden"> CVC/CVV</label>
<span class="field-space"></span>
<!--<p>Last 3 or 4 digits</p>-->
</div>
</form>
</div>
<div class="card-back">
<div class="card-stripe"></div>
</div>
<button type="submit" class="card-btn" id="cc-form-submit">
Submit <i class="fas fa-arrow-circle-right"></i>
</button>
</div>
</div>
<div class="col-md-6 styles-code-example">
<pre><code class="javascript">
const field = form.field('#space-for-field', {
type: 'card-number',
name: 'card-number',
placeholder: '4111111111111111',
css: {
border: 'none',
background: 'rgba(215, 224, 235, 0.18);',
height: '40px',
lineHeight: 'normal'
padding: '0 10px',
color: 'white',
fontSize: '12px',
boxSizing: 'border-box',
borderRadius: '4px',
letterSpacing: '.7px',
'&::placeholder': {
color: 'white',
fontSize: '12px',
opacity: '.5',
},
}
});
</code>
</pre>
</div>
</div>
</section>
<section>
<h4 class="center-block mb-4">Field styling examples</h4>
<div class="example-1 px-3">
<a
href="https://codesandbox.io/s/pyqj0xo467?fontsize=14&module=%2Fscript.js"
target="_blank"
class="source-link"
>
<i class="fas fa-code"></i>
Play with the style
</a>
<form class="payment-form-example" id="payment-form">
<div class="header">
<p class="title">Payment form</p>
<div class="d-flex justify-content-between align-items-center">
<span class="total">Total</span>
<span class="amount">$ 32.99</span>
</div>
</div>
<div class="fields">
<div id="payment-cc-number" class="field-container">
<label for="cc-number">Card Number</label>
<span class="field-space"></span>
</div>
<div id="payment-cc-holder" class="field-container">
<label for="cc-holder">Card Holder</label>
<span class="field-space"></span>
</div>
<div id="payment-cc-exp" class="field-container">
<label for="cc-exp">Expiration</label>
<span class="field-space"></span>
</div>
<div id="payment-cc-cvc" class="field-container">
<label for="cc-cvc"> CVC/CVV</label>
<span class="field-space"></span>
<!--<p>Last 3 or 4 digits</p>-->
</div>
<button type="submit" class="btn" id="payment-form-submit">
Pay
</button>
</div>
</form>
</div>
<div class="example-2 px-3">
<a
href="https://codesandbox.io/s/5v2vpqp39p?fontsize=14&module=%2Fscript.js"
target="_blank"
class="source-link"
>
<i class="fas fa-code"></i>
Play with the style
</a>
<form class="signup-form-example mb-5" id="signup-form">
<div id="signup-email" class="field-container">
<label for="signup-email" class="hidden">Email or phone</label>
<span class="field-space"></span>
</div>
<div id="signup-password" class="field-container">
<label for="signup-password" class="hidden">Password</label>
<span class="field-space"></span>
</div>
<div id="signup-name" class="field-container">
<label for="signup-name" class="hidden">Name</label>
<span class="field-space"></span>
</div>
<div id="signup-birthday" class="field-container">
<label for="signup-birthday" class="hidden">Birthday</label>
<span class="field-space"></span>
</div>
<button type="submit" class="btn" id="signup-form-submit">
Sign up
</button>
</form>
</div>
<div class="example-3 px-3">
<a
href="https://codesandbox.io/s/7m576jk5nj?fontsize=14&module=%2Fscript.js"
target="_blank"
class="source-link"
>
<i class="fas fa-code"></i>
Play with the style
</a>
<form
class="pii-form-example d-flex justify-content-between"
id="pii-form"
>
<div class="fields d-flex justify-content-between">
<div class="field-container" id="pii-first-name">
<label for="pii-first-name" class="hidden">Name</label>
<span class="field-space"></span>
</div>
<div
class="field-container d-flex align-items-center"
id="pii-ssn"
>
<label for="pii-ssn" class="mb-0">SSN</label>
<span class="field-space"></span>
</div>
</div>
<button type="submit" class="btn">Submit</button>
</form>
</div>
</section>
</main>
<footer class="page-footer font-small cyan darken-3">
<div class="container">
<div class="row">
<div class="col-md-12 py-2">
<div class="d-flex justify-content-center">
<a
href="https://github.com/verygoodsecurity/"
class="p-2"
target="_blank"
>
<i class="fab fa-github-square"></i>
</a>
<a
href="https://www.linkedin.com/company/18142614/"
class="p-2"
target="_blank"
>
<i class="fab fa-linkedin"></i>
</a>
<a
href="https://www.instagram.com/verygoodsecurity/"
class="p-2"
target="_blank"
>
<i class="fab fa-instagram"></i>
</a>
<a href="https://twitter.com/getvgs" class="p-2" target="_blank">
<i class="fab fa-twitter-square"></i>
</a>
<a
href="https://www.facebook.com/getvgs/"
class="p-2"
target="_blank"
>
<i class="fab fa-facebook-square"></i>
</a>
</div>
</div>
</div>
</div>
<div class="footer-copyright text-center pb-3">
© 2024 VERY GOOD SECURITY, Inc.
</div>
</footer>
<script src="vendor/jquery-3.3.1.min.js"></script>
<script src="vendor/bootstrap/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
$(".alert").alert();
</script>
<script src="js/script.js"></script>
<script src="styles-examples/credit-card-custom.js"></script>
<script src="styles-examples/payment-form-custom.js"></script>
<script src="styles-examples/signup-form-custom.js"></script>
<script src="styles-examples/pii-form-custom.js"></script>
</body>
</html>