diff --git a/examples/demo02.yml b/examples/demo02.yml
index 32f8b47..4c81498 100644
--- a/examples/demo02.yml
+++ b/examples/demo02.yml
@@ -23,6 +23,7 @@ metadata:
notes: |
+ - NO BOM by config! WOW!
- Wire color is a recommendation
- Label harnesses with text given in diagram
- Label every connector to match the designation in the drawing
@@ -30,6 +31,10 @@ metadata:
- Cover all cables with 1/2" or 1/8" black sleeving as required. Make it very long for wrapping test
+options:
+ show_bom: False
+ notes_on_right: False
+
templates: # defining templates to be used later on
- &molex_f
diff --git a/examples/ex05.yml b/examples/ex05.yml
index 93531a3..7041460 100644
--- a/examples/ex05.yml
+++ b/examples/ex05.yml
@@ -36,4 +36,4 @@ connections:
- X3: [1-4]
options:
- notes_to_right: False
+ notes_on_right: False
diff --git a/src/wireviz/templates/din-6771.html b/src/wireviz/templates/din-6771.html
index 3948eeb..a48a0ff 100644
--- a/src/wireviz/templates/din-6771.html
+++ b/src/wireviz/templates/din-6771.html
@@ -53,18 +53,21 @@
height: 400mm;
}
+ /* custom count of rows depending on the sheetsize */
+ {% if not show_bom %}
+ {% set bottom_rows = titleblock_rows + 1 %}
+ {% elif sheetsize == 'A4' %}
+ {% set bottom_rows = bom_rows + titleblock_rows + 1 %}
+ {% else %}
+ {% set bottom_rows = [bom_rows, titleblock_rows]|max + 1 %}
+ {% endif %}
+
#diagram {
position: relative;
top: 0;
left: 0;
max-width: 100%;
- {% if sheetsize == 'A4' %}
- height: calc(100% - {{ [bom_rows, 13, ]|sum }} * 4.25mm);
- {% else %}
- height: calc(100% - {{ [bom_rows, 13]|max }} * 4.25mm);
- {% endif %}
- /* 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 */
+ height: calc(100% - {{ bottom_rows }} * 4.25mm);
text-align: center;
vertical-align: middle;
}
@@ -105,9 +108,14 @@
{{ diagram }}
-
+ {% if show_notes %}
{{ notes }}
+ {% endif %}
+
+ {% if show_bom %}
{{ bom }}
+ {% endif %}
+
{{ titleblock }}
diff --git a/src/wireviz/templates/notes.html b/src/wireviz/templates/notes.html
index fe5ea25..e24e518 100644
--- a/src/wireviz/templates/notes.html
+++ b/src/wireviz/templates/notes.html
@@ -1,17 +1,25 @@