forked from Path-Check/paper-cred-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.v-1.html
91 lines (82 loc) · 4.18 KB
/
index.v-1.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
<!doctype html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="stylesheet" href="css/topnav.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>QR Code Generator</title>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DTDMHW3NV6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-DTDMHW3NV6');
</script>
</head>
<body>
<div class="topnav">
<div class="topnavContainer">
<a href="index.html">Signers</a>
<a href="verify.html"><span class="xs-hidden">Universal </span>Verifier</a>
<a class="xs-hidden" href="debug.html">QR Debugger</a>
<a class="xs-hidden" href="https://github.com/Path-Check/paper-cred-demo">Source Code</a>
<a href="https://github.com/Path-Check/paper-cred"><span class="xs-hidden"> QR </span>Specs</a>
<a href="http://vaccine-docs.pathcheck.org"><span class="xs-hidden">Vaccine </span>Docs</a>
<a class="xs-hidden" href="http://pathcheck.org">About PathCheck</a>
</div>
</div>
<div class="center">
<h1>QR Code Generator</h1>
<div class="full-div">
<div class="half">
<textarea id="text-qr1" rows="10" style="width:100%;">jxt:example.com:w3vc:1:MoH/J07BX03/1183738569/OPL/NZ/BgLv0g/Bwtkpo/SMITH/Male/JOHN/urn%3Auvci%3Aaf5vshde843jf831j128fj/Bd5lLo/eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..a3UqIuKSOmCKrdn2knl_hCjiN4f4Ud1eO5ckwEHb623V9vdCwWCDB7GBHlRBYSI8ek2E-By7xysVFwutcpOeDg</textarea>
</div>
<div class="half">
<textarea id="text-qr2" rows="10" style="width:100%;">JXT:EXAMPLE.COM:W3VC:1:MOH/J07BX03/1183738569/OPL/NZ/BGLV0G/BWTKPO/SMITH/MALE/JOHN/XK465POITJ7ZX3EF266OG6G76N6WHV3PD6H7AXPGKLUP33EJQWYZZCHIREKZCEKNASELBCMI3DIIR2MZQWY43FFQRGG4TJOQRDUWZCMI3DIIS5PVVXKKRC4KJDUYEKVXM7NETZMEFDRDPB7YKHOV4O4XETAEDW7LNXK7N52CYFQIGB5RQEPFIQLBEI6HUTMEA4XPDSWFIXBOWXFE46BQ</textarea>
</div>
</div>
<div class="full-div-align-center">
<br/>
<button class="qr-btn" onclick="generateQRCodes()">Create & Study QRs</button>
<br/><br/>
</div>
<div class="full-div">
<div class="half">
<canvas id="qr-code1-code"></canvas><br/>
<pre id="qr-code1-result"></pre>
<pre id="qr-code1-bytes"></pre>
<pre id="qr-code1-mode"></pre>
<pre id="qr-code1-error"></pre>
</div>
<div class="half">
<canvas id="qr-code2-code"></canvas><br/>
<pre id="qr-code2-result"></pre>
<pre id="qr-code2-bytes"></pre>
<pre id="qr-code2-mode"></pre>
<pre id="qr-code2-error"></pre>
</div>
</div>
</div>
<script src="js/qrcode.min.js"></script>
<script src="js/ui-utils.js"></script>
<script>
function e(elem) {
return document.getElementById(elem);
}
function describe(qr) {
return qr.modules.size + "x" + qr.modules.size + " bits " + Math.round((qr.modules.size*qr.modules.size)/8) + " bytes"
}
function generateCode(elemIdSource, elemPrefix) {
let uri = e(elemIdSource).value;
UIUtils.drawsQR(elemPrefix, uri, uri, "Q");
}
function generateQRCodes() {
gtag('event', 'generateQR');
generateCode('text-qr1', "qr-code1");
generateCode('text-qr2', "qr-code2");
}
</script>
</body>
</html>