Senden und Abbruch laufen über den Treiber, Orca-Doppelzeilen und tote Ideen-API fallen weg, Drucker folgen der Datei, Etikettenformat liegt in den Einstellungen.
53 lines
1.6 KiB
HTML
53 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{ title }}</title>
|
|
{% include "_etikett_style.html" %}
|
|
</head>
|
|
<body>
|
|
<div class="toolbar">
|
|
<button type="button" onclick="window.print()">Drucken</button>
|
|
<a class="ghost" href="/material?spool={{ spool.id }}">Zurück</a>
|
|
</div>
|
|
<div class="sheet">
|
|
<div class="meta">
|
|
<h1>{{ spool.name }}</h1>
|
|
<p class="code">{{ spool.chargen_nr or spool.code }}</p>
|
|
<p>
|
|
{% if spool.colors %}
|
|
<span class="dots">
|
|
{% for color in spool.colors %}
|
|
<span class="dot" style="background:{{ color.hex }}"></span>
|
|
{% endfor %}
|
|
</span>
|
|
{% endif %}
|
|
{{ spool.color or spool.material_type }}
|
|
</p>
|
|
<p>{{ spool.material_type }}{% if spool.brand %} · {{ spool.brand }}{% endif %}</p>
|
|
<p>{{ '%.0f'|format(spool.remaining_g) }} g{% if spool.ace_slot %} · ACE {{ spool.ace_slot }}{% endif %}</p>
|
|
{% if spool.hersteller_charge %}
|
|
<p>Hersteller: {{ spool.hersteller_charge }}</p>
|
|
{% endif %}
|
|
</div>
|
|
<div class="qr-wrap">
|
|
<canvas id="qr" width="80" height="80"></canvas>
|
|
</div>
|
|
</div>
|
|
<script src="{{ url_for('static', filename='qrcode.min.js') }}?v=1"></script>
|
|
<script>
|
|
const qrMm = {{ (etikett.qr_mm if etikett is defined else 20)|tojson }};
|
|
QRCode.toCanvas(document.getElementById("qr"), {{ qr_url|tojson }}, {
|
|
width: 80,
|
|
margin: 1,
|
|
color: { dark: "#111111", light: "#ffffff" }
|
|
}, () => {
|
|
const node = document.getElementById("qr");
|
|
node.style.width = qrMm + "mm";
|
|
node.style.height = qrMm + "mm";
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|