gone with forced dark mode

This commit is contained in:
2025-08-24 22:00:45 +10:00
parent f3b828b051
commit 65fc68e0bf
2 changed files with 46 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -11,6 +11,7 @@
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/annotations.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<script src="https://code.highcharts.com/themes/adaptive.js"></script>
<style>
.col-form-label { width:140px; }
html { font-size: 80%; }
@@ -62,7 +63,7 @@
class="col-form-label me-2 text-end float-end {{extra}}">{{el.label}}
</label>
{% if el.display== "readonly" %}
{% set bg="bg-light" %}
{% set bg="bg-body-tertiary" %}
{% set bd="" %}
{% else %}
{% set bg="" %}
@@ -91,7 +92,7 @@
</h5>
<div class="row">
<div class="col-auto"> <div class="pt-1 pb-1 mb-0 alert text-center" style="background:lemonchiffon">2025</div>
<div class="col-auto"> <div class="pt-1 pb-1 mb-0 alert text-center bg-secondary text-light">2025</div>
{# inside started if below, we add blank lines to the start of the year so the dates line up #}
{% for _ in range( 0, padding ) %}
@@ -105,14 +106,14 @@
{% 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" style="background:lemonchiffon">{{yr}}</div>
<div class="pt-1 pb-1 mb-0 alert text-center bg-secondary text-light">{{yr}}</div>
{% endif %}
<font color="black">
<font class="text-secondary">
{{ date }}:&nbsp;
{{ '$%0.2f' % dollars|float }}<br>
</font>
{% if comp_done.val == 0 and yr == comp_yr and mon == comp_mon and day|int >= comp_day|int %}
<font color="blue">
<font class="text-info">
{{ COMP['date'] }}:&nbsp;
{{ '$%0.2f' % COMP['amount']|float }}<br>
</font>
@@ -151,7 +152,7 @@
</div>
</div>
</form>
<div class="row mt-4" id="container" style="width:100%; height:400px;"></div>
<div class="row mt-4 highcharts-dark" id="container" style="width:100%; height:400px;"></div>
<script type="text/javascript">
// make these global so we can also use them in the /save route (via modal)
const savingsData = JSON.parse('{{ savings | tojson }}');
@@ -165,17 +166,17 @@
if( $("#Ioniq6_future option:selected"). text() == 'lease' )
{
// disable buyout
$('#lbl-Car_buyout').addClass('bg-light text-secondary border-secondary')
$('#Car_buyout').addClass('bg-light text-secondary border-secondary').attr('readonly', 'readonly' )
$('#Car_buyout_date').addClass('bg-light text-secondary border-secondary').attr('readonly', 'readonly' )
$('#lbl-Car_buyout').addClass('bg-body-tertiary border-secondary')
$('#Car_buyout').addClass('bg-body-tertiary border-secondary').attr('readonly', 'readonly' )
$('#Car_buyout_date').addClass('bg-body-tertiary border-secondary').attr('readonly', 'readonly' )
}
else
{
// disable lease
$('#lbl-Car_loan').addClass('bg-light text-secondary')
$('#Car_loan').addClass('bg-light text-secondary')
$('#lbl-Car_balloon').addClass('bg-light text-secondary')
$('#Car_balloon').addClass('bg-light text-secondary')
$('#lbl-Car_loan').addClass('bg-body-tertiary')
$('#Car_loan').addClass('bg-body-tertiary')
$('#lbl-Car_balloon').addClass('bg-body-tertiary')
$('#Car_balloon').addClass('bg-body-tertiary')
}
var tooltipTriggerList = [].slice.call(document.querySelectorAll("[data-bs-toggle='tooltip']"))
@@ -215,7 +216,7 @@
plotBands.push({
from: start,
to: end,
color: year % 2 === 0 ? 'white' : 'lemonchiffon' // Alternate colors
color: year % 2 === 0 ? '#101010' : 'black' // Alternate colors
});
year = currentYear;
start = new Date(`${year}-01-01`).getTime();
@@ -226,7 +227,7 @@
plotBands.push({
from: start,
to: end,
color: year % 2 === 0 ? 'white' : 'lemonchiffon'
color: year % 2 === 0 ? 'charcoal' : 'black'
});
const annotations = [];