-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (72 loc) · 1.83 KB
/
index.html
File metadata and controls
73 lines (72 loc) · 1.83 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>QR Code Scanner</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html,
body {
padding: 0;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.wrapper {
padding: 0 4rem;
}
#canvas {
position: absolute;
}
#scanned {
display: flex;
flex-direction: column;
gap:1rem;
}
#video-wrapper {
height: 480px;
position: relative;
border-radius: 10px;
overflow: hidden;
}
</style>
</head>
<body>
<template id="scaned-item">
<style>
.wrapper {
--gradient-start: #c471ed;
--gradient-end: #f7797d;
border: none;
border-radius: 1rem;
padding: 1rem;
background: linear-gradient(var(--gradient-start), var(--gradient-end));
box-shadow: 0 3px -3px 10px #000;
}
.wrapper span {
font-family: Arial, Helvetica, sans-serif;
color: white;
display: block;
}
</style>
<div class="wrapper">
<span>Value: <slot name="raw"></slot></span>
<span>Format: <slot name="format"></slot></span>
</div>
</template>
<div class="wrapper">
<h1>QR Code Scanner</h1>
<div style="display: flex; gap: 1rem">
<div id="video-wrapper">
<canvas id="canvas" width="640" height="480"></canvas>
<video id="video" width="640" height="480" autoplay></video>
</div>
<div>
<h1>Recently Scanned</h1>
<div id="scanned"></div>
</div>
</div>
</div>
<script src="./main.js" async></script>
</body>
</html>