-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
191 lines (165 loc) Β· 8.65 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/3.4.0/css/bootstrap-colorpicker.min.css" crossorigin="anonymous" referrerpolicy="no-referrer">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap">
<link rel="stylesheet" href="/assets/main.css">
<!-- https://itsjavi.com/bootstrap-colorpicker/tutorial-p02_Advanced_Examples.html -->
<style>
.colorpicker.colorpicker-2x {
width: 272px;
}
.colorpicker-2x .colorpicker-saturation {
width: 200px;
height: 200px;
}
.colorpicker-2x .colorpicker-hue,
.colorpicker-2x .colorpicker-alpha {
width: 30px;
height: 200px;
}
.colorpicker-2x .colorpicker-alpha,
.colorpicker-2x .colorpicker-preview {
background-size: 20px 20px;
background-position: 0 0, 10px 10px;
}
.colorpicker-2x .colorpicker-preview,
.colorpicker-2x .colorpicker-preview div {
height: 30px;
font-size: 16px;
line-height: 160%;
}
.colorpicker-saturation .colorpicker-guide {
height: 10px;
width: 10px;
border-radius: 10px;
margin: -5px 0 0 -5px;
}
</style>
</head>
<body>
<div class="glitch-nav">
<div class="glitch-nav-title">
<p class="glitch-nav-glitch">Glitch.je</p>
</div>
<ul class="glitch-nav-items">
<li class="glitch-nav-item"><a href="https://data.glitch.je">Open Data</a></li>
<li class="glitch-nav-item glitch-nav-item-active"><a href="https://qrcode.glitch.je">QR Code</a></li>
<!-- <li class="glitch-nav-item"><a href="https://cls.glitch.je">CLS Queues</a></li> -->
</ul>
</div>
<div class="container pt-5">
<div class="text-center mb-5">
<h1 class="title">QR Code Generator</h1>
<p class="summary">A simple QR code generator in your browser!</p>
</div>
<div class="row">
<div class="col-12 col-lg-7">
<div class="card">
<div class="card-body">
<div class="notification-container">
<div id="no-text" class="alert alert-danger d-none" role="alert">
<button type="button" class="close" data-dismiss="alert">Γ</button>
Please provide text or a URL for the QR code
</div>
</div>
<div class="form-group">
<label for="text">Text content</label>
<textarea id="text" name="text" class="form-control" maxlength="2048"></textarea>
</div>
<button class="btn btn-block btn-gray my-4 rounded-lg" type="button" data-toggle="collapse"
data-target="#colors-container" data-collapse-button>
<i class="fa fa-fw fa-palette fa-sm mr-1"></i> Colours
<i class="fa fa-fw fa-chevron-down fa-sm" data-chevron-icon></i>
</button>
<div id="colors-container" class="collapse hide">
<div class="row">
<div class="col-sm-6 mb-4">
<div>
<label class="form-label">Foreground colour</label>
<div class="color-picker-wrapper">
<input id="foreground-color" class="color-picker" type="submit"
data-color="black">
</div>
</div>
</div>
<div class="col-sm-6">
<div>
<label class="form-label">Background colour</label>
<div class="color-picker-wrapper">
<input id="background-color" class="color-picker" type="submit"
data-color="white">
</div>
</div>
</div>
</div>
</div>
<button class="btn btn-block btn-gray my-4 rounded-lg" type="button" data-toggle="collapse"
data-target="#options-container" data-collapse-button>
<i class="fa fa-fw fa-wrench fa-sm mr-1"></i> Options
<i class="fa fa-fw fa-chevron-down fa-sm" data-chevron-icon></i>
</button>
<div id="options-container" class="collapse hide">
<div class="form-group">
<label for="ecl"><i class="fa fa-fw fa-check fa-sm mr-1"></i> Error correction
level</label>
<select id="ecl" name="ecl" class="form-control">
<option value="L">L - low (7%)</option>
<option value="M">M - medium (15%)</option>
<option value="Q">Q - high (25%)</option>
<option value="H">H - best (30%)</option>
</select>
</div>
</div>
<button id="create-button" type="button"
class="btn btn-block btn-black rounded-lg">Create</button>
</div>
</div>
</div>
<div class="col-12 col-lg-5">
<div class="card mb-4">
<div class="card-body">
<img id="qrcode-placeholder" src="/assets/placeholder.png">
<div id="qrcode"></div>
</div>
</div>
<button id="download-button" type="button" class="btn btn-block btn-black dropdown-toggle rounded-lg"
data-toggle="dropdown" disabled>Download</button>
<div class="dropdown-menu">
<div id="download-png" class="dropdown-item">Download as PNG</div>
<div id="download-svg" class="dropdown-item">Download as SVG</div>
</div>
</div>
</div>
<footer class="d-flex justify-content-between mt-5 mb-5">
<p>Created by <a href="https://github.com/lukeeey">Luke</a></p>
<p><a href="https://github.com/glitchjsy/qrcode">Source code</a></p>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-colorpicker/3.4.0/js/bootstrap-colorpicker.min.js"
integrity="sha512-94dgCw8xWrVcgkmOc2fwKjO4dqy/X3q7IjFru6MHJKeaAzCvhkVtOS6S+co+RbcZvvPBngLzuVMApmxkuWZGwQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/assets/qrcode.min.js"></script>
<script src="/assets/main.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-RMEXD9EXYF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-RMEXD9EXYF');
</script>
</body>
</html>