-
Notifications
You must be signed in to change notification settings - Fork 0
/
qr.html
49 lines (47 loc) · 2.26 KB
/
qr.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
{{ define "qr" }}
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="UTF-8">
<meta name="application-name" content="">
<meta name="author" content="Matthew Chipperfield">
<meta name="description" content="QR Code Generator">
<meta name="keywords" content="qr, code, barcode, qr code, generator">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<title>QR Code Generator</title>
</head>
<body>
<main class="w3-container w3-col m12 l8">
{{if .Error}}
<section class="w3-panel w3-red">
<h3>{{.Error}}</h3>
</section>
{{end}}
{{if .Code}}
<section class="w3-section w3-center">
<img src="data:image/png;base64, {{.Code}}" alt="Generated QR Code" class="w3-image" />
</section>
<hr class="w3-border-green" />
{{end}}
<section class="w3-section">
<form name="qrcode" method="POST" action="" enctype="application/x-www-form-urlencoded">
<div class="w3-bar">
<label>URL:</label>
<input name="data_type" type="radio" value="url" class="w3-radio" checked />
<label>Phone:</label>
<input name="data_type" type="radio" value="tel" class="w3-radio" />
<label>SMS:</label>
<input name="data_type" type="radio" value="sms" class="w3-radio" />
<label>Email:</label>
<input name="data_type" type="radio" value="email" class="w3-radio" />
</div><br />
<!-- <label for="text">Text to encode:</label><br />-->
<input name="text" type="text" placeholder="https://example@domain.com" value="{{.Text}}" required class="w3-input w3-border w3-mobile" /><br />
<button name="submit" type="submit" value="submit" class="w3-button w3-green w3-mobile ">Generate QR Code!</button>
</form>
</section>
</main>
</body>
</html>
{{ end }}