forked from monospaced/angular-qrcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
166 lines (153 loc) · 4.12 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
<!DOCTYPE html>
<html lang="en-gb" data-ng-app="monospaced.qrcode" id="ng-app">
<head>
<meta charset="utf-8">
<title>Angular QR Code</title>
<!--[if lte IE 8]>
<script>document.createElement('qrcode');</script>
<![endif]-->
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="//necolas.github.io/normalize.css/2.1.1/normalize.css">
<style>
html {
overflow-y: scroll;
background: #fff;
color: #1c000e;
}
body {
margin: 16px;
text-align: center;
}
h1 {
margin: 0 8px 8px;
font-weight: normal;
font-size: 30px;
}
h2 {
margin: 24px 8px;
font-weight: normal;
font-size: 24px;
}
small {
display: block;
clear: both;
margin: 0 8px;
}
p,
pre {
overflow: hidden;
margin: 16px 0;
}
form {
margin: 0 auto 8px;
width: 274px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
label {
float: left;
width: 60px;
color: #888;
text-align: left;
line-height: 2.125;
cursor: pointer;
}
input,
textarea {
float: right;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 7px 3px 7px 7px;
width: 204px;
border: 1px solid #ccc;
}
textarea {
resize: vertical;
}
select {
float: right;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 7px 3px 7px 7px;
width: 204px;
height: 34px;
border: 1px solid #ccc;
}
a {
color: #000;
text-decoration: none;
-webkit-transition: all 250ms ease-in-out;
-moz-transition: all 250ms ease-in-out;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
a:hover,
a:focus,
a:active {
color: #0067ce;
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
.qrcode {
display: block;
margin: 24px auto 16px;
max-width: 100%;
}
.qrcode-link {
display: table;
margin: 24px auto 16px;
}
.qrcode-link .qrcode {
margin: 0;
}
.footer {
margin: 16px auto;
width: 290px;
}
</style>
</head>
<body data-ng-init="foo='here comes qr!';bar='https://github.com/monospaced/angular-qrcode';v=5;e='M';s=274;">
<h1>Angular QR Code</h1>
<pre><qrcode></qrcode></pre>
<qrcode version="{{v}}" error-correction-level="{{e}}" size="{{s}}" data="{{foo}}"></qrcode>
<form>
<p>
<label for="data">Data</label>
<textarea id="data" data-ng-model="foo" maxlength="2953"></textarea>
</p>
<p>
<label for="size">Size</label>
<input id="size" type="number" data-ng-model="s">
</p>
<p>
<label for="version">Version</label>
<input id="version" type="number" data-ng-model="v" min="1" max="40">
</p>
<p>
<label for="level" title="Error Correction Level">Level</label>
<select id="level" data-ng-model="e" data-ng-options="option.version as option.name for option in [{name:'Low', version:'L'},{name:'Medium', version:'M'},{name:'Quartile', version:'Q'},{name:'High', version:'H'}]"></select>
</p>
</form>
<h2>Downloadable</h2>
<qrcode version="{{v}}" error-correction-level="{{e}}" size="{{s}}" data="{{foo}}" download></qrcode>
<h2>Linked</h2>
<qrcode version="{{v}}" error-correction-level="H" size="274" data="{{bar}}" href="{{bar}}"></qrcode>
<form>
<p>
<label for="data">Data</label>
<textarea id="data" data-ng-model="bar" maxlength="2953"></textarea>
</p>
</form>
<div class="footer">
<small>
<a href="http://monospaced.github.io/">Monospaced Labs</a>
</small>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<script src="//monospaced.github.io/bower-qrcode-generator/js/qrcode.js"></script>
<script src="//monospaced.github.io/bower-qrcode-generator/js/qrcode_UTF8.js"></script>
<script src="angular-qrcode.js"></script>
</body>
</html>