From 920bf060e9eec1011daacf3382ec448c3ab913a8 Mon Sep 17 00:00:00 2001 From: Laurier Loiselle Date: Wed, 25 Jan 2023 13:26:52 -0500 Subject: [PATCH] templates: titleblock style defined within --- src/wireviz/templates/titleblock.html | 72 +++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/src/wireviz/templates/titleblock.html b/src/wireviz/templates/titleblock.html index e3a591d..2c671d6 100644 --- a/src/wireviz/templates/titleblock.html +++ b/src/wireviz/templates/titleblock.html @@ -1,13 +1,80 @@ + {% macro revision(row) -%} + {% set index = 8 - row %} {% if row == 9 %} Rev Date Name Changelog - {% elif revisions|length >= row %} - {% set revision = revisions[row-1] %} + {% elif revisions|length > index %} + {% set revision = revisions[index] %} {{ revision.rev }} {{ revision.date }} {{ revision.name }} @@ -39,7 +106,6 @@ {% endif %} {%- endmacro %} -