Add Aztec Code Generation
This commit is contained in:
@@ -989,6 +989,17 @@ function TS_IndexElement(
|
||||
}
|
||||
});
|
||||
}
|
||||
function BuildQR(mid) {
|
||||
let svg = bwipjs.toSVG({
|
||||
bcid: 'azteccode', // Barcode type
|
||||
text: mid, // Text to encode
|
||||
height: 12, // Bar height, in millimeters
|
||||
includetext: true, // Show human-readable text
|
||||
textxalign: 'center', // Always good to set this
|
||||
textcolor: 'ff0000', // Red text
|
||||
});
|
||||
return `<span style="display: inline-block; height: 300px; width: 300px;">${svg}</span>`
|
||||
}
|
||||
|
||||
const PAGES = {};
|
||||
function SetPages() {
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
>
|
||||
</div>
|
||||
<script src="static/showdown.min.js"></script>
|
||||
<script src="static/qrcode/bwip-min.js"></script>
|
||||
<script src="static/jquery.js"></script>
|
||||
<script src="static/gun.js"></script>
|
||||
<script src="static/webrtc.js"></script>
|
||||
|
||||
@@ -14,7 +14,8 @@ PAGES.materiales = {
|
||||
var btn_guardar = safeuuid();
|
||||
var btn_borrar = safeuuid();
|
||||
container.innerHTML = `
|
||||
<h1>Material <code id="${nameh1}"></code></h1>
|
||||
<h1>Material <code id="${nameh1}"></code></h1><br>
|
||||
${BuildQR(mid)}
|
||||
<fieldset>
|
||||
<label>
|
||||
Referencia<br>
|
||||
|
||||
Reference in New Issue
Block a user