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'] %}
- | {{ revision.get(key, '') }} |
- {% endfor %}
-
- {% endfor %}
-
+
+
+{% macro revision(row) -%}
+ {% if row == 9 %}
| Rev |
Date |
Name |
Changelog |
+ {% elif revisions|length >= row %}
+ {% set revision = revisions[row-1] %}
+ {{ revision.rev }} |
+ {{ revision.date }} |
+ {{ revision.name }} |
+ {{ revision.changelog }} |
+ {% else %}
+ |
+ |
+ |
+ |
+ {% endif %}
+{%- endmacro %}
+
+
+{% macro author(row) -%}
+ {% set index = row - 2 %}
+ {% if row == 1 %}
+ |
+ Date |
+ Name |
+ {% elif authors|length > index %}
+ {% set author = authors[index] %}
+ {{ author['row'] }} |
+ {{ author['date'] }} |
+ {{ author['name'] }} |
+ {% else %}
+ |
+ |
+ |
+ {% endif %}
+{%- endmacro %}
+
+
+
+
+
+
+
+ {{ revision(1) }}
+
+ {{ author(1) }}
+
+ | {{ company }} |
-
-
-
-
- |
- Date |
- Name |
-
- {% for author in authors %}
-
- | {{ author['row'] }} |
- {{ author['date'] }} |
- {{ author['name'] }} |
-
- {% endfor %}
-
-
-
- |
-
-
-
-
-
+
+
+ {{ 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 }} |
+
+
+
+