-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
127 lines (127 loc) · 4.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bar Code Reader</title>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js "></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css"
/>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">Bar Code Reader</a>
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarColor02"
aria-controls="navbarColor02"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Read</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Generate</a>
</li>
<!-- <li class="nav-item"> -->
<!-- <a class="nav-link" href="#">QR Code</a> -->
<!-- </li> -->
<!-- <li class="nav-item"> -->
<!-- <a class="nav-link" href="#">About</a> -->
<!-- </li> -->
</ul>
</div>
</div>
</nav>
<div class="container my-4 justify-content-center d-flex">
<form class="w-100 custom-form gap-3 d-flex flex-column">
<div class="form-floating">
<select
class="form-select"
id="read-option"
aria-label="Floating label select example"
onchange="onUpdateReadOption(event)"
>
<option value="file" selected>File</option>
<option value="camera">Camera</option>
</select>
<label for="read-option">Read from</label>
</div>
<div class="justify-content-center d-block" id="file-input-container">
<label for="file-input" class="form-label"
>Insert your file here</label
>
<input class="form-control" type="file" id="file-input" />
<div class="d-flex gap-3">
<button class="btn btn-dark mt-3 w-100">Submit</button>
<input
type="reset"
class="btn btn-light mt-3 w-100"
onclick="clearReader()"
/>
</div>
<div class="mt-3 d-flex gap-1 d-none">
<input
type="text"
class="form-control"
id="reader-result"
readonly
/>
<button
class="btn border custom-form__clipboard-btn d-flex"
title="Copy to clipboard"
onclick="copyToClipboard(event)"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"
/>
</svg>
</button>
</div>
</div>
</form>
</div>
<div
id="toast"
class="toast align-items-center border-0 position-absolute bottom-0 mb-1 start-50 translate-middle"
role="alert"
aria-live="assertive"
aria-atomic="true"
>
<div class="d-flex">
<div class="toast-body">
</div>
<button
type="button"
class="btn-close btn-close-white me-2 m-auto"
data-bs-dismiss="toast"
aria-label="Close"
></button>
</div>
</div>
<div id="reader" width="600px" height="600px"></div>
<script src="https://unpkg.com/html5-qrcode@2.0.9/dist/html5-qrcode.min.js"></script>
<script src="src/scripts.js" defer type="module"></script>
</body>
</html>