-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (84 loc) · 2.79 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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/style.css" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./images/favicon-32x32.png"
/>
<title>QRcode - App</title>
</head>
<body>
<main class="d-flex justify-content-center align-items-center vh-100">
<div
class="card text-center p-3 rounded-4 shadow-lg"
style="width: 18rem"
>
<!-- Div QR Code gerado -->
<div class="position-relative">
<img
src="images/image-qr-code.png"
id="default-image"
class="default-image card-img-top rounded-3"
alt="QR-code component"
/>
<div id="qrcode" class="qrcode-geration position-absolute"></div>
</div>
<div class="card-body px-1">
<h5 class="card-title">Crie seu QR Code</h5>
<p class="card-text">
Abra a câmera do seu smartphone aponte-a em direção ao QR Code.
<br />
Pronto! Você já pode compartilhar seu QR Code.
</p>
</div>
<!-- Campo de input para URL -->
<div class="input-group mb-1">
<input
type="text"
id="url-input"
class="form-control"
placeholder="Insira a URL"
aria-label="URL para gerar QR Code"
/>
<button
class="btn btn-primary"
id="generate-btn"
type="button"
onclick="generateQRCode()"
>
QR Code
</button>
</div>
</div>
</main>
<footer class="attribution">
Challenge by
<a
href="https://www.frontendmentor.io/challenges/qr-code-component-iux_sIO_H"
target="_blank"
>Frontend Mentor</a
>. Coded by
<a href="https://github.com/deusdeteneto" target="_blank">Neto</a>.
</footer>
<!-- QRCode.js para geração dinâmica de QR codes -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
<script src="https://cdn.jsdelivr.net/npm/qr-code-styling@1.5.0/lib/qr-code-styling.js"></script>
<script src="script/script.js"></script>
</body>
</html>