diff --git a/src/wireviz/templates/titleblock.html b/src/wireviz/templates/titleblock.html index 826412c..e3a591d 100644 --- a/src/wireviz/templates/titleblock.html +++ b/src/wireviz/templates/titleblock.html @@ -1,67 +1,126 @@ -
- - - {% for revision in revisions %} - - {% for key in ['rev', 'changelog', 'date', 'name'] %} - - {% endfor %} - - {% endfor %} - + + +{% macro revision(row) -%} + {% if row == 9 %} + {% elif revisions|length >= row %} + {% set revision = revisions[row-1] %} + + + + + {% else %} + + + + + {% endif %} +{%- endmacro %} + + +{% macro author(row) -%} + {% set index = row - 2 %} + {% if row == 1 %} + + + + {% elif authors|length > index %} + {% set author = authors[index] %} + + + + {% else %} + + + + {% endif %} +{%- endmacro %} + + + +
+
{{ revision.get(key, '') }}
Rev Date Name Changelog {{ revision.rev }} {{ revision.date }} {{ revision.name }} {{ revision.changelog }} DateName {{ author['row'] }} {{ author['date'] }} {{ author['name'] }}
+ + + {{ revision(1) }} + + {{ author(1) }} + + -
{{ company }}
- - - - - - - - {% for author in authors %} - - - - - - {% endfor %} - - - - - - -
DateName
{{ author['row'] }} {{ author['date'] }} {{ author['name'] }}
+ + + {{ revision(2) }} + + {{ author(2) }} + + - - - - - - - - - - - - - - - - - - - - - - -
{{ company }}
{{ address }}
{{ title }}
{{ pn }} {{ revision }}
Sheet {{ sheet_current }} of {{ sheet_total }}
-
+ + + {{ revision(3) }} + + {{ author(3) }} + + {{ address }} + + + + {{ revision(4) }} + + {{ author(4) }} + + + + + + {{ revision(5) }} + + {{ author(5) }} + + {{ title }} + + + + + {{ revision(6) }} + + + {% if logo %} + + {% endif %} + + + + + + + {{ revision(7) }} + + + {{ pn }} + {{ revision }} + + + + + {{ revision(8) }} + + + + + + + {{ revision(9) }} + + + Sheet {{ sheet_current }} of {{ sheet_total }} + + + +