templates: update BOM height responsiveness
This commit is contained in:
parent
f0a6631af5
commit
6dd9a303af
4
src/wireviz/templates/bom.html
generated
4
src/wireviz/templates/bom.html
generated
@ -1,7 +1,7 @@
|
|||||||
<style>
|
<style>
|
||||||
.A4 #bom { /* BOM on top of title block */
|
.A4 #bom { /* BOM on top of title block */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 38.25mm;
|
bottom: calc({{ titleblock_rows + 1 }} * 4.25mm);
|
||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<!-- BOM TEMPLATE --!>
|
<!-- BOM TEMPLATE --!>
|
||||||
<div id="bom">
|
<div id="bom">
|
||||||
<table id="bom">
|
<table>
|
||||||
{% if not bom_reversed %}
|
{% if not bom_reversed %}
|
||||||
{{ bom_header_gen() }}
|
{{ bom_header_gen() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
6
src/wireviz/templates/din-6771.html
generated
6
src/wireviz/templates/din-6771.html
generated
@ -58,7 +58,11 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: calc(100% - 13 * 4.25mm);
|
{% if sheetsize == 'A4' %}
|
||||||
|
height: calc(100% - {{ [bom_length, 13]|sum }} * 4.25mm);
|
||||||
|
{% else %}
|
||||||
|
height: calc(100% - {{ [bom_length, 13]|max }} * 4.25mm);
|
||||||
|
{% endif %}
|
||||||
/* TODO: auto-adapt to height of title block + BOM table;
|
/* TODO: auto-adapt to height of title block + BOM table;
|
||||||
BOM table might be above (A4) or to the left (A3 and larger) of the title block */
|
BOM table might be above (A4) or to the left (A3 and larger) of the title block */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
2
src/wireviz/templates/titleblock.html
generated
2
src/wireviz/templates/titleblock.html
generated
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#titleblock {
|
#titleblock {
|
||||||
width: 180mm;
|
width: 180mm;
|
||||||
height: 38.25mm;
|
height: calc({{ titleblock_rows }} * 4.25mm));
|
||||||
}
|
}
|
||||||
|
|
||||||
#titleblock table, th, td {
|
#titleblock table, th, td {
|
||||||
|
|||||||
@ -95,6 +95,7 @@ def generate_html_output(
|
|||||||
if bom_reversed:
|
if bom_reversed:
|
||||||
bom_content.reverse()
|
bom_content.reverse()
|
||||||
|
|
||||||
|
|
||||||
if metadata:
|
if metadata:
|
||||||
sheet_current = metadata["sheet_current"]
|
sheet_current = metadata["sheet_current"]
|
||||||
sheet_total = metadata["sheet_total"]
|
sheet_total = metadata["sheet_total"]
|
||||||
@ -113,6 +114,8 @@ def generate_html_output(
|
|||||||
"bom_header": bom_header,
|
"bom_header": bom_header,
|
||||||
"bom_content": bom_content,
|
"bom_content": bom_content,
|
||||||
"bom_columns": bom_columns,
|
"bom_columns": bom_columns,
|
||||||
|
"bom_length": len(bom_content),
|
||||||
|
"titleblock_rows": 9,
|
||||||
}
|
}
|
||||||
|
|
||||||
# prepare metadata replacements
|
# prepare metadata replacements
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user