-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
91 lines (80 loc) · 4.15 KB
/
index.html
File metadata and controls
91 lines (80 loc) · 4.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Free QR Code Generator - Convert any URL into a QR code instantly">
<title>QR Code Generator</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Custom Styles -->
<link rel="stylesheet" href="style.css">
</head>
<body class="min-h-screen bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50">
<div class="container mx-auto px-4 py-8 md:py-16">
<!-- Header -->
<header class="text-center mb-12">
<h1 class="text-4xl md:text-5xl font-bold text-gray-800 mb-4">
QR Code Generator
</h1>
<p class="text-lg text-gray-600">
Convert any URL into a QR code instantly
</p>
</header>
<!-- Main Content -->
<main class="max-w-2xl mx-auto">
<!-- Input Card -->
<div class="bg-white rounded-2xl shadow-xl p-6 md:p-8 mb-8 transform transition-all duration-300 hover:shadow-2xl">
<div class="mb-6">
<label for="urlInput" class="block text-sm font-semibold text-gray-700 mb-2">
Enter URL
</label>
<input
type="text"
id="urlInput"
placeholder="https://example.com"
class="w-full px-4 py-3 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-indigo-500 focus:ring-2 focus:ring-indigo-200 transition-all duration-200"
autocomplete="url"
>
<p id="errorMessage" class="text-red-500 text-sm mt-2 hidden"></p>
</div>
<button
id="generateBtn"
class="w-full bg-gradient-to-r from-indigo-600 to-purple-600 text-white font-semibold py-3 px-6 rounded-lg hover:from-indigo-700 hover:to-purple-700 transform transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-4 focus:ring-indigo-300 active:scale-95"
>
Generate QR Code
</button>
</div>
<!-- QR Code Display Card -->
<div id="qrCodeCard" class="bg-white rounded-2xl shadow-xl p-6 md:p-8 hidden transform transition-all duration-300">
<div class="text-center">
<h2 class="text-2xl font-bold text-gray-800 mb-6">Your QR Code</h2>
<!-- QR Code Container -->
<div id="qrcode" class="flex justify-center mb-6 qr-container"></div>
<!-- Download Button -->
<button
id="downloadBtn"
class="bg-gradient-to-r from-green-500 to-emerald-600 text-white font-semibold py-3 px-8 rounded-lg hover:from-green-600 hover:to-emerald-700 transform transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-4 focus:ring-green-300 active:scale-95"
>
<svg class="inline-block w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"></path>
</svg>
Download QR Code
</button>
</div>
</div>
</main>
<!-- Footer -->
<footer class="text-center mt-16 text-gray-600">
<p class="text-sm">
Made with ❤️ | Open Source on
<a href="#" class="text-indigo-600 hover:text-indigo-800 font-semibold transition-colors">GitHub</a>
</p>
</footer>
</div>
<!-- QRCode.js Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>
<!-- Custom JavaScript -->
<script src="app.js"></script>
</body>
</html>