-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (68 loc) · 3.2 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ["Montserrat", "sans-serif"],
},
},
},
};
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"
integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<title>QR Code Generator</title>
</head>
<body class="bg-slate">
<header class="bg-[#c55339] p-4 mb-10">
<div class="max-w-5xl m-auto">
<div class="text-xl font-bold text-white">QR Code Generator</div>
</div>
</header>
<main>
<div class="flex flex-col-reverse align-center justify-center m-auto md:max-w-5xl md:flex-row">
<div class="w-full md:w-2/3 mr-24 p-10">
<h1 class="text-3xl font-bold mb-5 md:text-4xl">
QR Code Generator
</h1>
<p class="mb-4">Enter your URL and select size to generate QR Code.</p>
<form id="generate" class="mt-4">
<input id="url" type="url" placeholder="Enter a URL"
class="w-full border-2 border-gray-200 rounded p-3 text-gray-dark mr-2 focus:outline-none mb-5 required">
<select id="size"
class="w-full border-2 border-gray-200 rounded p-3 text-gray-dark mr-2 focus:outline-none">
<option value="100" class="">100x100</option>
<option value="200" class="">200x200</option>
<option value="300" class="" selected>300x300</option>
<option value="400" class="">400x400</option>
<option value="500" class="">500x500</option>
</select>
<div class="flex align-center mt-5">
<input type="color" id="color">
<label for="pick the color" class="ml-2">Pick the color</label>
</div>
<button class="bg-gray-600 rounded w-full text-white py-3 px-4 mt-5 hover:bg-[#c55339]"
type="submit">Generate QR Code</button>
</form>
</div>
<div class="w-full md:w-2/3 p-10">
<img src="assets/code.jpg" alt="qr code" class="w-1/2 m-auto md:w-full rounded">
</div>
</div>
<hr />
<div id='generated' class="flex flex-col align-center justify-center m-auto md:max-w-5xl md:flex-row">
<div id="qrcode" class="w-full md:w-2/3 mr-24 p-10"></div>
<div id="download" class="w-full md:w-2/3 p-10"></div>
</div>
</main>
<script src="script.js"></script>
</body>
</html>