Renamed label_system templates folder to recommended snake_style style

This commit is contained in:
Jan Böhmer 2023-02-04 23:15:11 +01:00
parent 06f86176b6
commit 12d4c2f4d9
16 changed files with 12 additions and 12 deletions

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{ meta_title }}</title>
<meta name="author" content="{{ partdb_title }}">
<meta name="description" content="Label for {{ meta_title }}">
<meta name="keywords" content="Part-DB, Label, Barcode">
<style>
{% include("label_system/labels/label_style.css.twig") %}
{{ options.additionalCss | escape("html") }}
</style>
</head>
<body>
{% for element in elements %}
<div class="page">
{% if options.barcodeType == 'none' %}
{% include "label_system/labels/label_page_none.html.twig" %}
{% elseif options.barcodeType in ['qr', 'datamatrix'] %}
{% include "label_system/labels/label_page_qr.html.twig" %}
{% elseif options.barcodeType in ['code39', 'code93', 'code128'] %}
{% include "label_system/labels/label_page_1d.html.twig" %}
{% endif %}
</div>
{% endfor %}
</body>
</html>

View file

@ -0,0 +1,27 @@
<div>
<div class="lines-container">
{{ element.lines | raw }}
</div>
<div class="C39-container" style="">
<img class="C39" src="{{ element.barcode | data_uri(mime='image/svg+xml') }}" height="30px"><br>
<span class="C39-text">{{ element.barcode_content }}</span>
</div>
</div>
{#
<div>
<div class="row">
<div class="col-5">
<div class="C39-container">
<img class="C39" src="{{ inlineData(element.barcode, 'image/svg+xml') }}" width="100%" height="50px" style="">
</div>
</div>
<div class="col-7">
<div class="lines-container">
{{ element.lines | raw }}
</div>
</div>
</div>
</div>
#}

View file

@ -0,0 +1 @@
{{ element.lines | raw }}

View file

@ -0,0 +1,17 @@
<div>
<div class="row">
<div class="col-5">
<div class="qr-container">
<a href="{{ element.barcode_content }}">
<img class="qr" src="{{ element.barcode | data_uri(mime='image/svg+xml') }}" width="100%" style="">
</a>
</div>
{#{{ element.barcode | raw }} #}
</div>
<div class="col-7">
<div class="lines-container">
{{ element.lines | raw }}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,175 @@
@page {
margin: 12px 6px;
}
.page {
page-break-inside: avoid;
page-break-before: avoid;
page-break-after: always;
overflow: hidden;
/* Absolute position prevents automatic page breaks */
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* Last page should not break */
.page:last-of-type {
page-break-after: avoid;
}
body {
font-family: "DejaVu Sans Mono";
font-size: 12px;
line-height: 1.0;
}
p {
margin: 0;
}
hr {
margin: 2px;
}
.qr {
max-width: 80%;
}
.qr-container a {
display: block;
}
.C39 {
max-width: 150px;
}
.C39-container {
display: inline-block;
align-content: center;
text-align: left;
position: fixed;
bottom: 32px;
}
.C39-text {
display: block;
font-size: 6pt;
}
/**************************************
Grid system token from simplegrid.io
SIMPLE GRID
(C) ZACH COLE 2016
************************************/
.font-light {
font-weight: 300;
}
.font-regular {
font-weight: 400;
}
.font-heavy {
font-weight: 700;
}
/* POSITIONING */
.left {
text-align: left;
}
.right {
text-align: right;
}
.center {
text-align: center;
margin-left: auto;
margin-right: auto;
}
.justify {
text-align: justify;
}
/* ==== GRID SYSTEM ==== */
.container {
width: 90%;
margin-left: auto;
margin-right: auto;
}
.row {
position: relative;
width: 100%;
page-break-after: avoid;
page-break-before: avoid;
page-break-inside: avoid;
}
.row [class^="col"] {
float: left;
margin: 0 0.5%;
min-height: 0.125rem ;
}
.row::after {
content: "";
display: table;
clear: both;
}
.col-1 {
width: 4.33%;
}
.col-2 {
width: 12.66%;
}
.col-3 {
width: 21%;
}
.col-4 {
width: 29.33%;
}
.col-5 {
width: 37.66%;
}
.col-6 {
width: 46%;
}
.col-7 {
width: 54.33%;
}
.col-8 {
width: 62.66%;
}
.col-9 {
width: 71%;
}
.col-10 {
width: 79.33%;
}
.col-11 {
width: 87.66%;
}
.col-12 {
width: 96%;
}