-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (111 loc) · 3.91 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>QRCode</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<style>
body {
text-align: center;
background: rgb(22, 27, 34);
margin: 0 auto;
padding: 10px;
}
.text {
text-align: center;
width: 240px;
height: 35px;
margin: 0 auto;
background-color: #ffffff;
color: black;
border: 0;
border-radius: 2px;
font-size: 9px;
font-family: system-ui;
margin: 5px;
}
.item
{
background: repeating-linear-gradient(45deg, black, transparent 100px);
padding: 15px 15px 5px 15px;
border-radius: 5px;
display: inline-block!important;
}
#text:focus {
outline: none;
}
img {
display: inline!important;
border: 25px solid white;
border-radius: 2px;
}
</style>
<script>
window.console = window.console || function(t) {};
</script>
<script>
if (document.location.search.match(/type=embed/gi)) {
window.parent.postMessage("resize", "*");
}
</script>
</head>
<body >
<div class="w3-row">
<div class="w3-row" style="margin-top: 15px;">
<div id="item-1" class="w3-col m6 l3" >
<div class="item">
<div id="qrcode-1" class="id"></div>
<input id="text-1" type="text" class="text" disabled/>
<h5 id="h-1" style="color: white;font-family: system-ui;"></h5>
</div>
</div>
<div id="item-2" class="w3-col m6 l3" >
<div class="item" >
<div id="qrcode-2" class="id"></div>
<input id="text-2" type="text" class="text" disabled/>
<h5 id="h-2" style="color: white;font-family: system-ui;"></h5>
</div>
</div>
<div id="item-3" class="w3-col m6 l3" >
<div class="item" >
<div id="qrcode-3" class="id"></div>
<input id="text-3" type="text" class="text" disabled/>
<h5 id="h-3" style="color: white;font-family: system-ui;"></h5>
</div>
</div>
<div id="item-4" class="w3-col m6 l3" >
<div class="item" >
<div id="qrcode-4" class="id"></div>
<input id="text-4" type="text" class="text" disabled/>
<h5 id="h-4" style="color: white;font-family: system-ui;"></h5>
</div>
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js'></script>
<script id="rendered-js">
var ids = window.location.search.replace("?ids=","").split(",");
$("#item-1").hide();
$("#item-2").hide();
$("#item-3").hide();
$("#item-4").hide();
ids.forEach((element,i) => {
var d = i + 1;
$("#item-"+d).show();
var qrcode = new QRCode(document.getElementById("qrcode-"+d), {
text: element,
width: 190,
height: 190,
colorDark : "#000000",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
$("#text-"+d).val(element.split('!')[0])
$("#h-"+d).text(i+1)
});
</script>
</body>
</html>