-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
141 lines (122 loc) · 4.89 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
<!DOCTYPE html>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css">
<link rel="stylesheet" href="style.css">
<title>EAN-13 helper tool</title>
<section class="section">
<div class="content">
<h1 class="title is-1 has-text-centered">EAN-13</h1>
<p class="subtitle has-text-centered">
Verify and visualize <strong>EAN-13</strong> codes
</p>
<div class="columns is-mobile is-centered">
<div class="column is-one-quarter-desktop">
<div class="field has-text-centered">
<label class="label">Number</label>
<div class="control">
<input type="text" class="input has-text-centered is-rounded" id="user-input" maxlength="12">
</div>
<p class="help">Your EAN-13 without the check digit (12 digits)</p>
</div>
</div>
</div>
<div id="result" class="is-hidden">
<hr>
<h3 class="title is-3 has-text-centered">Check digit calculation</h2>
<div class="columns is-mobile is-centered is-size-4">
<div id="display-multiplication-calc" class="column is-narrow has-text-right">
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
</div>
<div class="column is-narrow has-text-centered">
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
<span class="is-block">=</span>
</div>
<div id="display-multiplication-res" class="column is-narrow has-text-right">
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block"></span>
<span class="is-block line"></span>
<span id="display-sum" class="is-block is-size-3 sum bordered"></span>
</div>
</div>
<div class="columns is-mobile is-centered">
<div class="column is-narrow is-size-3">
<span id="display-sum-2" class="sum bordered">1</span> ÷ 10 = <span id="display-int-part"
class="bordered int-part"></span>,<span id="display-frac-part"></span>
</div>
</div>
<div class="columns is-mobile is-centered">
<div class="column is-narrow is-size-3">
<span class="is-block"></span>
(<span id="display-int-part-2" class="bordered int-part"></span> + 1) × 10 - <span id="display-sum-3"
class="bordered sum"></span> = <span id="display-dv"></span>
</div>
</div>
<div class="columns is-mobile is-centered">
<div class="column is-narrow is-size-4 has-text-centered">
<p>
The rightmost digit <br />
is selected, thus <br />
the check digit is <span id="display-dv-2" class="is-size-3"></span>
</p>
</div>
</div>
<hr>
<h3 class="title is-3 has-text-centered">Conversion to binary encoding</h2>
<div class="columns is-mobile has-text-centered is-centered">
<div class="column is-half-desktop is-centered">
<table class="table is-hoverable" id="binary-table">
<thead>
<tr>
<th class="has-text-centered">Decimal</th>
<th class="has-text-centered">Binary</th>
<th class="has-text-centered">Table</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<hr>
<h3 class="title is-3 has-text-centered">Barcode visualization</h2>
<div class="columns is-mobile has-text-centered is-centered">
<div class="column is-half-desktop">
<div id="display-barcode"></div>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="script.js"></script>