From ffa7e509ed3fbdb1976bb25fc96dbbe15a9c1388 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Fri, 14 Feb 2025 16:45:03 +1100 Subject: [PATCH] fix up the alert-info width to be width of column its in, rather than hard-code it --- templates/index.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index f57a5f1..5ae8f32 100644 --- a/templates/index.html +++ b/templates/index.html @@ -91,7 +91,7 @@
-
2025
+
2025
{% set first_yr=2025 %} {% for date, dollars in savings %} @@ -121,7 +121,7 @@
Super kicks in!!!
{% endif %} {% if COMP %} -
Note: {{ '$%0.2f' % COMP['amount']|float }} is the final value of the compared to data. Hover over blue labels above to see what compared to values differed
+
Note: {{ '$%0.2f' % COMP['amount']|float }} is the final value of the compared to data. Hover over blue labels above to see what compared to values differed
{% endif %}
@@ -162,6 +162,11 @@ var tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']")) var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) }) + + var parentWidth = $('#info_col').width(); + + // Set the alert's `max-width` to the parent's width + $('#info_alert').css('max-width', parentWidth + 'px'); }; document.addEventListener('DOMContentLoaded', function () {