-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
60 lines (60 loc) · 1.46 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Simple QR Code Generator</title>
<script type="module" src="index.js"></script>
<style>
:root {
color-scheme: light dark;
--bg-color: #eee;
--error-color: red;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-color: #333;
}
}
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
html, body {
font-family: monospace;
background-color: var(--bg-color);
}
#text {
width: 100%;
}
#error {
color: var(--error-color)
}
button {
display: block;
margin: 0.5em 0 0.5em;
}
canvas {
display: block;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
}
h1 {
margin-top: 0.25em;
margin-bottom: 0.25em;
}
</style>
</head>
<body>
<div class="header"><h1>QR Code Generator</h1><a href="https://github.com/greggman/qr-code">github</a></div>
<textarea id="text" placeholder="enter or paste url (etc...) here"></textarea>
<button id="download" type="button" disabled>download qr code</button>
<canvas></canvas>
<p id="error"></p>
</body>
</html>