-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqrGen.html
More file actions
87 lines (78 loc) · 3.29 KB
/
qrGen.html
File metadata and controls
87 lines (78 loc) · 3.29 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
<!-- v2.3 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QrGen</title>
<link href="https://minisoft.it/icons/fix.png" rel="shortcut icon" type="image/x-icon" />
<link href="https://minisoft.it/icons/fix.png" rel="apple-touch-icon" />
<script src="https://cdn.jsdelivr.net/gh/papnkukn/qrcode-svg@master/dist/qrcode.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#006E81',
'primary-dark': '#006E81',
secondary: '#814000',
}
}
}
}
</script>
</head>
<body class="bg-gray-100 flex flex-col min-h-screen">
<header class="bg-white border-b border-gray-200">
<div class="container mx-auto px-4 py-6 max-w-4xl">
<h1 class="text-3xl font-bold text-center text-gray-800">QrGen</h1>
<p class="text-gray-600 text-center mt-1">Real-time QR-Code Generator</p>
</div>
</header>
<main class="container mx-auto px-4 py-8 max-w-4xl flex-grow">
<!-- Instructions Section -->
<div class="bg-white rounded-lg shadow-md p-6 mb-8">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Instructions</h2>
<div class="bg-slate-50 border-l-4 border-primary p-4 rounded-r">
<ol class="list-decimal pl-5 space-y-1">
<li>Enter the text you want to convert into a QR code in the input field below.</li>
<li>The QR code will be generated in real-time as you type.</li>
</ol>
</div>
</div>
<div class="bg-white rounded-lg shadow-md p-6">
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Enter text</label>
<input type="text" class="w-full p-3 border border-gray-300 rounded-lg"
placeholder="Type anything..." oninput="updateQR(this.value)">
</div>
<div id="qrcode" class="flex justify-center mt-6"></div>
</div>
</div>
</main>
<footer class="bg-white border-t border-gray-200 mt-auto">
<div class="container mx-auto px-4 py-6 max-w-4xl">
<p class="text-gray-600 text-center">© <a href="https://minisoft.it/" class="text-primary hover:text-primary-dark">Minisoft</a> — All rights reserved</p>
</div>
</footer>
<script>
function updateQR(value) {
const qrContainer = document.getElementById('qrcode');
qrContainer.innerHTML = '';
if (!value) return;
const qr = new QRCode({
content: value,
padding: 2,
width: 256,
height: 256,
color: "#006e81",
background: "#ffffff",
ecl: "M"
});
qrContainer.innerHTML = qr.svg();
}
</script>
</body>
</html>