redo the way we do padding to be much more accurate

This commit is contained in:
2025-05-24 16:19:29 +10:00
parent 5b6b6297ea
commit 67c855b731
3 changed files with 23 additions and 20 deletions

View File

@@ -93,27 +93,15 @@
<div class="row">
<div class="col-auto"> <div class="pt-1 pb-1 mb-0 alert text-center" style="background:lemonchiffon">2025</div>
{% set first_yr=2025 %}
{% set started=namespace( val=0 ) %}
{% set mon_cnt=namespace( now=4 ) %}
{# inside started if below, we add blank lines to the start of the year so the dates line up #}
{% for _ in range( 0, padding ) %}
<br>
{% endfor %}
{% for date, dollars in savings %}
{% set yr=date[:4] %}
{% set mon=date[5:7] %}
{% set day=date[8:10 ] %}
{# inside started if below, we add blank lines to the start of the year so the dates line up #}
{% if started.val == 0 %}
{% if day|int > 14 %}
<br>
{% else %}
<br>
<br>
{% endif %}
{% for _ in range( 1, 2*mon_cnt.now ) %}
<br>
{% endfor %}
{% set started.val = 1 %}
{% endif %}
{% if yr|int > first_yr|int and mon == '01' and day|int <= 14 %}
</div><div class="col-auto">