simple visual treatment of key dates

This commit is contained in:
2025-09-11 20:45:34 +10:00
parent 45d173e236
commit 4594630b9e
2 changed files with 24 additions and 4 deletions

View File

@@ -99,19 +99,38 @@
<br>
{% endfor %}
{% set car_done=namespace( val=0 ) %}
{% for date, dollars in savings %}
{% set yr=date[:4] %}
{% set mon=date[5:7] %}
{% set day=date[8:10 ] %}
{% set car_yr=key_dates['D_hyundai_owned'][:4] %}
{% set car_mon=key_dates['D_hyundai_owned'][5:7] %}
{% set car_day=key_dates['D_hyundai_owned'][8:10 ] %}
{% if yr|int > first_yr|int and mon == '01' and day|int <= 14 %}
</div><div class="col-auto">
<div class="pt-1 pb-1 mb-0 alert text-center bg-secondary text-light">{{yr}}</div>
{% endif %}
{% if date == key_dates['D_quit_date'] %}
<font class="text-info">
<label data-bs-toggle="tooltip" title="D quits">
{% elif (yr == car_yr and mon == car_mon and day >= car_day and car_done.val == 0) %}
{%set car_done.val=1 %}
<font class="text-info">
<label data-bs-toggle="tooltip" title="We own car">
{% else %}
<font class="text-secondary">
{{ date }}:&nbsp;
{{ '$%0.2f' % dollars|float }}<br>
</font>
<label>
{% endif %}
{{ date }}:&nbsp;
{{ '$%0.2f' % dollars|float }}<br>
</label>
</font><br>
{% if comp_done.val == 0 and yr == comp_yr and mon == comp_mon and day|int >= comp_day|int %}
<font class="text-info">
{{ COMP['date'] }}:&nbsp;