-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
169 lines (149 loc) · 3.8 KB
/
index.html
File metadata and controls
169 lines (149 loc) · 3.8 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR Code Hidden Message Generator</title>
<link rel="preload" href="./qrcodegen-v1.8.0-es6.js" as="script">
<style>
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body {
margin: 0;
padding: 0;
}
.app {
margin: 0 auto;
padding: 1px;
width: min(960px, 100vw);
}
header h1 {
margin: 0 0 1px;
padding: 0;
}
header p {
margin: 0 0 1px;
padding: 0;
}
form {
display: flex;
flex-direction: column;
gap: 1px;
margin: 0;
padding: 0;
}
label {
display: flex;
flex-direction: column;
gap: 1px;
margin: 0;
padding: 0;
}
textarea,
select,
input[type="number"],
input[type="text"] {
margin: 0;
padding: 1px;
}
textarea {
resize: vertical;
min-height: 120px;
}
.options {
display: flex;
flex-direction: column;
gap: 1px;
margin: 0;
padding: 0;
}
.output {
margin-top: 1px;
display: flex;
flex-direction: column;
gap: 1px;
align-items: flex-start;
}
.qr-visual {
margin: 0;
padding: 1px;
}
.status {
margin: 0;
padding: 0;
}
.qr-meta {
display: flex;
flex-direction: column;
gap: 1px;
margin: 0;
padding: 1px;
}
</style>
</head>
<body>
<main class="app">
<header>
<h1>QR Code Hidden Message Generator</h1>
<p>Encode visible text plus an optional hidden UTF-8 message placed in the QR padding area.</p>
</header>
<form id="qr-form">
<label>
Message to encode
<textarea id="qr-text" required placeholder="Type the text to convert into a QR code with an optional hidden payload">Hello from QrHiddenMessage!</textarea>
</label>
<label>
Hidden padding message (optional)
<input id="qr-hidden" type="text" placeholder="Embed a hidden UTF-8 message in the padding">
</label>
<div class="options">
<label>
Error correction
<select id="qr-ecl">
<option value="L" selected>Low (7% tolerance)</option>
<option value="M">Medium (15% tolerance)</option>
<option value="Q">Quartile (25% tolerance)</option>
<option value="H">High (30% tolerance)</option>
</select>
</label>
<label>
Pixel size
<input id="qr-scale" type="number" min="2" max="20" step="1" value="8">
</label>
<label>
Quiet zone
<input id="qr-margin" type="number" min="0" max="10" step="1" value="4">
</label>
</div>
</form>
<section class="output">
<div>
<img id="qr-image" class="qr-visual" alt="QR code preview will appear here" />
<canvas id="qr-canvas" width="240" height="240" hidden aria-hidden="true"></canvas>
<div class="qr-meta" aria-live="polite">
<div>
<strong>Version</strong>
<span id="qr-version">–</span>
</div>
<div>
<strong>Size (modules)</strong>
<span id="qr-size">–</span>
</div>
<div>
<strong>Error correction</strong>
<span id="qr-ecl-display">–</span>
</div>
<div>
<strong>Mask</strong>
<span id="qr-mask">–</span>
</div>
</div>
</div>
<p class="status" id="qr-status">Ready to generate your QR code.</p>
</section>
</main>
<script src="./qrcodegen-v1.8.0-es6.js"></script>
<script src="./app.js"></script>
</body>
</html>