templates: remove calc, do all through jinja

This commit is contained in:
Laurier Loiselle 2023-04-11 17:02:04 -04:00
parent 77770027ac
commit 19a6c04496
No known key found for this signature in database
GPG Key ID: 345920CC72089A3F
4 changed files with 16 additions and 9 deletions

View File

@ -1,7 +1,7 @@
<style>
.A4 #bom { /* BOM on top of title block */
position: absolute;
bottom: calc({{ titleblock_rows + 1 }} * 4.25mm);
bottom: {{ (titleblock_rows + 1) * 4.25 }}mm;
right: 0;
}

View File

@ -67,11 +67,18 @@
top: 0;
left: 0;
max-width: 100%;
height: calc(100% - {{ bottom_rows }} * 4.25mm);
text-align: center;
vertical-align: middle;
}
#diagram {
{% if sheetsize == A2 %}
height: {{ 400 - bottom_rows * 4.25 }}mm;
{% else %}
height: {{ 277 - bottom_rows * 4.25 }}mm;
{% endif %}
}
#diagram svg, #diagram img {
max-width: 95%;
max-height: 100%;
@ -104,7 +111,7 @@
{{ description }}
</div>
<div id="diagram">
<div id="diagram" class={{ sheetsize }}>
{{ diagram }}
</div>

View File

@ -2,9 +2,9 @@
.A4 #notes { /* NOTES on top of BOM */
position: absolute;
{% if show_bom %}
bottom: calc({{ titleblock_rows + bom_rows + 2 }} * 4.25mm);
bottom: {{ (titleblock_rows + bom_rows + 2) * 4.25 }}mm;
{% else %}
bottom: calc({{ titleblock_rows + 1 }} * 4.25mm);
bottom: {{ (titleblock_rows + 1) * 4.25 }}mm;
{% endif %}
right: 0;
}
@ -12,11 +12,11 @@
.A3 #notes, .A2 #notes { /* NOTES on top of title block */
position: absolute;
{% if notes_on_right %}
bottom: calc({{ titleblock_rows + 1 }} * 4.25mm);
bottom: {{ (titleblock_rows + 1) * 4.25 }}mm;
right: 0;
{% else %}
{% if show_bom %}
bottom: calc({{ bom_rows + 1 }} * 4.25mm);
bottom: {{ (bom_rows + 1) * 4.25 }}mm;
{% else %}
bottom: 0;
{% endif %}

View File

@ -7,7 +7,7 @@
#titleblock {
width: 180mm;
height: calc({{ titleblock_rows }} * 4.25mm));
height: {{ titleblock_rows * 4.25 }}mm;
}
#titleblock table, th, td {
@ -108,7 +108,7 @@
<!-- START OF TEMPLATE --!>
<div id="titleblock">
<table id="titleblock">
<table>
<tr> <!-- ROW 1 --!>
<!-- REVISIONS Column 1 to 4 --!>
{{ revision(1) }}