-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
318 lines (277 loc) · 16.8 KB
/
Copy pathindex.html
File metadata and controls
318 lines (277 loc) · 16.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QR Studio | Offline QR Code Generator & Scanner</title>
<meta name="description"
content="A free, offline-capable Progressive Web App to create and scan QR codes securely on your device.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://qr.blzr.sbs/">
<meta property="og:title" content="QR Studio | Free Offline QR Generator & Scanner">
<meta property="og:description"
content="Create, customize, and scan QR codes securely on your device. 100% free, fully offline, and privacy-focused PWA.">
<meta property="og:image" content="https://qr.blzr.sbs/assets/og-image.webp">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="Preview of the QR Studio application interface">
<meta property="og:site_name" content="QR Studio">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://qr.blzr.sbs/">
<meta name="twitter:title" content="QR Studio | Offline QR Generator">
<meta name="twitter:description"
content="Create, customize, and scan QR codes securely on your device. 100% free and fully offline.">
<meta name="twitter:image" content="https://qr.blzr.sbs/assets/og-image.webp">
<meta name="twitter:image:alt" content="Preview of the QR Studio application interface">
<meta name="theme-color" content="#6750A4">
<link rel="icon" type="image/svg+xml" href="/assets/icon-monochrome.svg">
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png">
<link rel="mask-icon" href="/assets/icon-monochrome.svg" color="#6750A4">
<link rel="manifest" href="site.webmanifest">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
<script>
try {
const settings = JSON.parse(localStorage.getItem('qr_settings'));
const savedAppTheme = settings?.theme || 'system';
if (savedAppTheme !== 'system') document.documentElement.setAttribute('data-theme', savedAppTheme);
} catch (e) {}
</script>
</head>
<body>
<main id="app-content" aria-live="polite">
<section id="create-view" class="view active" aria-labelledby="create-heading">
<h1 id="create-heading">Create QR Code</h1>
<div class="m3-card">
<label class="field-label" for="qr-type">QR Content Type</label>
<select id="qr-type" class="m3-input" aria-label="Select the type of QR code to generate"></select>
<div id="dynamic-form-container" role="form"></div>
<button id="btn-generate" class="m3-button primary" style="width: 100%; margin-top: 12px;">Generate QR</button>
</div>
<div id="qr-result-card" class="m3-card" style="display: none;" aria-live="assertive">
<button id="btn-clear-qr-result" class="icon-btn-close" aria-label="Clear Generated QR"><span
class="material-symbols-outlined">close</span></button>
<div id="qr-canvas-container" aria-label="Generated QR Code image"></div>
<div class="action-buttons" style="justify-content: center;">
<button id="btn-download" class="m3-button primary"><span class="material-symbols-outlined"
aria-hidden="true">download</span> Download</button>
<button id="btn-share-qr" class="m3-button secondary"><span class="material-symbols-outlined"
aria-hidden="true">share</span> Share</button>
</div>
</div>
</section>
<section id="scan-view" class="view" aria-labelledby="scan-heading">
<h1 id="scan-heading">Scan QR Code</h1>
<div class="m3-card">
<div class="action-buttons" style="margin-top: 0; margin-bottom: 16px;">
<button id="btn-start-scan" class="m3-button primary"><span class="material-symbols-outlined"
aria-hidden="true">camera</span> Start Camera</button>
<button id="btn-stop-scan" class="m3-button" style="display:none;">Stop Camera</button>
<label for="qr-file-upload" class="m3-button secondary" style="margin:0;"><span
class="material-symbols-outlined" aria-hidden="true">image</span> Load Image</label>
<input type="file" id="qr-file-upload" accept="image/*" style="display: none;">
</div>
<div id="scanner-controls" style="display: none; margin-bottom: 12px; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--md-surface-variant); padding: 12px; border-radius: 8px;">
<select id="camera-select" class="m3-input" style="width: 100%; margin:0;" aria-label="Select Camera"></select>
<div style="display: flex; align-items: center; gap: 12px; width: 100%;">
<label for="qrbox-size" class="field-label" style="margin:0; white-space: nowrap;">Scan Box Size</label>
<input type="range" id="qrbox-size" min="100" max="500" value="250" style="flex: 1; cursor: pointer;">
</div>
</div>
<div id="reader" style="width: 100%; border-radius: 12px; overflow: hidden; background: #000;"></div>
</div>
<div id="scan-result-card" class="m3-card" style="display: none;" aria-live="polite">
<button id="btn-clear-scan-result" class="icon-btn-close" aria-label="Clear Scanned Result"><span
class="material-symbols-outlined">close</span></button>
<h3>Decoded Result</h3>
<img id="scan-image-preview" src=""
style="display:none; width: 100px; height: 100px; object-fit: contain; border-radius: 8px; margin-bottom: 12px; background: #fff;"
alt="Uploaded QR Image">
<textarea id="scan-result-text" class="m3-input" rows="4" readonly></textarea>
<div class="action-buttons">
<button id="btn-open-link" class="m3-button primary" style="display: none;">Open Link</button>
<button id="btn-copy-result" class="m3-button secondary">Copy</button>
<button id="btn-share-result" class="m3-button secondary">Share Text</button>
</div>
</div>
</section>
<section id="settings-view" class="view" aria-labelledby="settings-heading">
<h1 id="settings-heading">Settings & Customization</h1>
<div class="m3-card">
<h3>App Preferences</h3>
<div class="setting-row">
<label for="app-theme-selector">App Theme</label>
<select id="app-theme-selector" class="m3-input" style="width: auto; margin:0;">
<option value="system">System Default</option>
<option value="light">Light Mode</option>
<option value="dark">Dark Mode</option>
</select>
</div>
</div>
<div class="m3-card">
<h3>QR Appearance (Auto-Saved)</h3>
<div class="setting-row">
<label for="color-fg">Foreground Color</label>
<input type="color" id="color-fg">
</div>
<div class="setting-row" style="margin-bottom: 0;">
<label for="color-bg">Background Color</label>
<input type="color" id="color-bg">
</div>
<div class="contrast-box">
<span id="contrast-text">Checking Contrast...</span>
<small id="contrast-subtext">Calculating ratio...</small>
</div>
<div class="setting-row">
<label for="error-correction">Error Correction</label>
<select id="error-correction" class="m3-input" style="width: auto; margin:0;">
<option value="L">Low (7%)</option>
<option value="M">Medium (15%)</option>
<option value="Q">Quartile (25%)</option>
<option value="H">High (30%)</option>
</select>
</div>
<hr aria-hidden="true">
<h3>Integrated Logo</h3>
<p style="font-size: 14px; margin-bottom: 12px; opacity: 0.8;">Upload a logo to embed in the center of your QR
codes.</p>
<input type="file" id="logo-input" class="m3-input" accept="image/png, image/jpeg">
<div id="logo-preview-container" class="m3-card"
style="display: none; padding: 8px; margin-top: 8px; align-items: center; width: max-content;">
<button id="btn-clear-logo" class="icon-btn-close" style="top: -10px; right: -10px;"
aria-label="Remove uploaded logo"><span class="material-symbols-outlined">close</span></button>
<img id="logo-preview" src="" alt="Uploaded Logo Preview"
style="width: 50px; height: 50px; border-radius: 8px; object-fit: contain; background: #fff;">
</div>
<hr aria-hidden="true">
<h3>Corner & Dot Styling</h3>
<div class="setting-block">
<div class="setting-row">
<label for="dotStyle">Main Dots</label>
<select id="dotStyle" class="m3-input" style="width: auto; margin:0;">
<option value="square">Square</option>
<option value="dots">Dots</option>
<option value="rounded">Rounded</option>
<option value="classy">Classy</option>
<option value="classy-rounded">Classy Rounded</option>
<option value="extra-rounded">Extra Rounded</option>
</select>
</div>
<div class="setting-row">
<label for="cornerSquareStyle">Corner Squares</label>
<select id="cornerSquareStyle" class="m3-input" style="width: auto; margin:0;">
<option value="none">None</option>
<option value="square">Square</option>
<option value="dots">Dots</option>
<option value="rounded">Rounded</option>
<option value="classy">Classy</option>
<option value="classy-rounded">Classy Rounded</option>
<option value="extra-rounded">Extra Rounded</option>
</select>
</div>
<div class="setting-row" style="margin-bottom: 0;">
<label for="cornerDotStyle">Corner Dots</label>
<select id="cornerDotStyle" class="m3-input" style="width: auto; margin:0;">
<option value="none">None</option>
<option value="square">Square</option>
<option value="dots">Dots</option>
<option value="rounded">Rounded</option>
<option value="classy">Classy</option>
<option value="classy-rounded">Classy Rounded</option>
<option value="extra-rounded">Extra Rounded</option>
</select>
</div>
</div>
</div>
<div class="m3-card">
<h3>About & FAQ</h3>
<p style="font-size: 14px; margin-bottom: 16px; line-height: 1.5; opacity: 0.9;"><strong>QR Studio -
v2.0</strong><br>A privacy-focused, offline-capable Progressive Web App for creating and scanning QR codes
securely on your device.</p>
<h4>Frequently Asked Questions</h4>
<details class="faq-item">
<summary>Is this app truly offline?</summary>
<p>Yes! Once loaded for the first time, your browser caches the app using a Service Worker. After that, you
don't need an internet connection to generate or scan QR codes.</p>
</details>
<details class="faq-item">
<summary>What happens to the data?</summary>
<p>Nothing leaves your device. Since this is a static site, all QR code generation and scanning happen
entirely locally within your browser. We do not collect, store, or transmit any usage data, analytics, or
personal information.</p>
</details>
<details class="faq-item">
<summary>What additional 3rd party libraries are being used?</summary>
<p>This app relies on two excellent open-source libraries: <strong>html5-qrcode</strong> for scanning QR codes
via your camera or images, and <strong>qr-code-styling</strong> for generating and customizing the QR codes.
</p>
</details>
<details class="faq-item">
<summary>How can I install on my phone?</summary>
<p>On Android (Chrome), tap the browser's three-dot menu and select "Install App" or "Add to Home Screen". On
iOS (Safari), tap the Share icon and select "Add to Home Screen". This lets you use it in full-screen mode
like a native app.</p>
</details>
<details class="faq-item">
<summary>What is this PWA?</summary>
<p>PWA stands for Progressive Web App. It is a modern web technology that allows a website to function exactly
like a native mobile or desktop app, offering features like offline capabilities, home screen installation,
and seamless performance.</p>
</details>
<details class="faq-item">
<summary>What is Error Correction?</summary>
<p>Error correction allows a QR code to be partially obscured, damaged, or covered (like adding a center logo)
while still remaining scannable. Higher error correction levels (like 'High') make the QR code pattern
denser but much more resilient to damage.</p>
</details>
<details class="faq-item">
<summary>Why is the contrast ratio important?</summary>
<p>If the background and foreground colors are too similar (e.g., light gray on white), older smartphone
cameras will fail to read the QR code. Use the built-in checker to aim for a contrast ratio of at least
4.5:1 to ensure scanners can easily read it.</p>
</details>
<details class="faq-item">
<summary>What do the "Corner & Dot Styling" options do?</summary>
<p>Customizing these options changes the physical shape of your QR code's pattern:<br><br>
<strong>Main Dots:</strong> Changes the shape of the primary data modules (the small blocks making up the bulk of the QR code).<br><br>
<strong>Corner Squares:</strong> Changes the outer border shape of the three large alignment markers located in the corners.<br><br>
<strong>Corner Dots:</strong> Changes the shape of the solid inner block inside those three large corner markers.</p>
</details>
<details class="faq-item">
<summary>Where can I find the source code for this app?</summary>
<p>This project is completely open-source and transparent. You can view, audit, or contribute to the source
code on GitHub at <a href="https://github.com/1bl4z3r/qr" target="_blank" rel="noopener"
style="color: var(--md-primary); text-decoration: none; font-weight: 500;">https://github.com/1bl4z3r/qr</a>.
</p>
</details>
</div>
</section>
<div id="update-toast" class="m3-card" style="display: none; position: fixed; bottom: calc(var(--nav-size) + 20px); left: 50%; transform: translateX(-50%); z-index: 9999; background: var(--md-surface-variant); align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); width: max-content; max-width: 90vw;">
<span style="font-weight: 500;">A new version is available!</span>
<button id="btn-update-refresh" class="m3-button primary" style="margin: 0; padding: 8px 16px;">Update</button>
</div>
</main>
<nav class="m3-nav" role="navigation" aria-label="Main Application Navigation">
<button class="nav-item active" data-target="create-view"><span
class="material-symbols-outlined">qr_code_2</span><span>Create</span></button>
<button class="nav-item" data-target="scan-view"><span
class="material-symbols-outlined">document_scanner</span><span>Scan</span></button>
<button class="nav-item" data-target="settings-view"><span
class="material-symbols-outlined">settings</span><span>Settings</span></button>
</nav>
<script src="https://unpkg.com/html5-qrcode"></script>
<script src="https://unpkg.com/qr-code-styling@1.5.0/lib/qr-code-styling.js"></script>
<script src="app.js"></script>
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./service-worker.js', { scope: './' });
});
}
</script>
</body>
</html>