From 02f564b5153d6dfebcbcc6fbf035d69a6a8a5aaa Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Mon, 30 Mar 2026 19:01:25 +0100 Subject: [PATCH] Colour tweaks and fixes --- templates/about.html | 2 +- templates/add_spot.html | 4 ++-- templates/alerts.html | 6 ++--- templates/bands.html | 6 ++--- templates/base.html | 8 +++---- templates/conditions.html | 4 ++-- templates/map.html | 6 ++--- templates/spots.html | 8 +++---- templates/status.html | 4 ++-- templates/widgets/conditions-area-header.html | 10 --------- templates/widgets/display-area-header.html | 2 +- templates/widgets/filters-area-header.html | 2 +- webassets/css/style.css | 19 +++++----------- webassets/js/alerts.js | 22 +++++++++---------- webassets/js/conditions.js | 12 +++++----- webassets/js/spots.js | 22 +++++++++---------- 16 files changed, 60 insertions(+), 77 deletions(-) delete mode 100644 templates/widgets/conditions-area-header.html diff --git a/templates/about.html b/templates/about.html index 85babb7..134871c 100644 --- a/templates/about.html +++ b/templates/about.html @@ -67,7 +67,7 @@

This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.

- + {% end %} \ No newline at end of file diff --git a/templates/add_spot.html b/templates/add_spot.html index fd08302..90dc3e2 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -69,8 +69,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/alerts.html b/templates/alerts.html index 4710652..a96c1e1 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -51,13 +51,13 @@
-
+
- - + + {% end %} \ No newline at end of file diff --git a/templates/bands.html b/templates/bands.html index 4e58570..60b0d96 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -62,9 +62,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 19f5057..59d0d18 100644 --- a/templates/base.html +++ b/templates/base.html @@ -46,10 +46,10 @@ crossorigin="anonymous"> - - - - + + + + diff --git a/templates/conditions.html b/templates/conditions.html index 73cf094..730c789 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -189,8 +189,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/map.html b/templates/map.html index e8564f2..966c37e 100644 --- a/templates/map.html +++ b/templates/map.html @@ -70,9 +70,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/spots.html b/templates/spots.html index 9013d06..cec290a 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -79,7 +79,7 @@
-
+
@@ -87,9 +87,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/status.html b/templates/status.html index 6bfbd80..f035959 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,8 +59,8 @@ - - + + diff --git a/templates/widgets/conditions-area-header.html b/templates/widgets/conditions-area-header.html deleted file mode 100644 index 942413e..0000000 --- a/templates/widgets/conditions-area-header.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
-
- Conditions -
-
- -
-
-
diff --git a/templates/widgets/display-area-header.html b/templates/widgets/display-area-header.html index 40b27d2..d7bd115 100644 --- a/templates/widgets/display-area-header.html +++ b/templates/widgets/display-area-header.html @@ -4,7 +4,7 @@ Display
- +
\ No newline at end of file diff --git a/templates/widgets/filters-area-header.html b/templates/widgets/filters-area-header.html index dd2a09e..c3b8db6 100644 --- a/templates/widgets/filters-area-header.html +++ b/templates/widgets/filters-area-header.html @@ -4,7 +4,7 @@ Filters
- +
\ No newline at end of file diff --git a/webassets/css/style.css b/webassets/css/style.css index b9cd5b6..60afb58 100644 --- a/webassets/css/style.css +++ b/webassets/css/style.css @@ -193,25 +193,18 @@ tr.new td { } } -/* Fudge apply our own "dark primary" and "dark danger" backgrounds as Bootstrap doesn't do this itself */ -[data-bs-theme=dark] tr.table-primary { - --bs-table-bg: #053680; - --bs-table-border-color: #021b42; - --bs-table-color: white; -} -[data-bs-theme=dark] tr.table-danger { - --bs-table-bg: #74272e; - --bs-table-border-color: #530208; - --bs-table-color: white; -} - /* TABLE */ #table-container { - border-radius: 3px; + border-radius: 5px; + border: 1px solid var(--bs-primary-border-subtle); overflow: hidden; } +#table-container table{ + margin-bottom: 0; +} + /* MAP */ div#map { diff --git a/webassets/js/alerts.js b/webassets/js/alerts.js index b32ae55..725de28 100644 --- a/webassets/js/alerts.js +++ b/webassets/js/alerts.js @@ -54,25 +54,25 @@ function updateTable() { let table = $("#table"); table.find('thead tr').empty(); if (showStartTime) { - table.find('thead tr').append(`${useLocalTime ? "Start (Local)" : "Start UTC"}`); + table.find('thead tr').append(`${useLocalTime ? "Start (Local)" : "Start UTC"}`); } if (showEndTime) { - table.find('thead tr').append(`${useLocalTime ? "End (Local)" : "End UTC"}`); + table.find('thead tr').append(`${useLocalTime ? "End (Local)" : "End UTC"}`); } if (showDX) { - table.find('thead tr').append(`DX`); + table.find('thead tr').append(`DX`); } if (showFreqsModes) { - table.find('thead tr').append(`Frequencies & Modes`); + table.find('thead tr').append(`Frequencies & Modes`); } if (showComment) { - table.find('thead tr').append(`Comment`); + table.find('thead tr').append(`Comment`); } if (showSource) { - table.find('thead tr').append(`Source`); + table.find('thead tr').append(`Source`); } if (showRef) { - table.find('thead tr').append(`Ref.`); + table.find('thead tr').append(`Ref.`); } table.find('tbody').empty(); @@ -86,22 +86,22 @@ function updateTable() { later = alerts.filter(a => moment.unix(a["start_time"]).utc().subtract(24, 'hours').isSameOrAfter()); if (onNow.length > 0) { - table.find('tbody').append('On Now'); + table.find('tbody').append('On Now'); addAlertRowsToTable(table.find('tbody'), onNow); } if (next24h.length > 0) { - table.find('tbody').append('Starting within 24 hours'); + table.find('tbody').append('Starting within 24 hours'); addAlertRowsToTable(table.find('tbody'), next24h); } if (later.length > 0) { - table.find('tbody').append('Starting later '); + table.find('tbody').append('Starting later '); addAlertRowsToTable(table.find('tbody'), later); } if (onNow.length == 0 && next24h.length == 0 && later.length == 0) { - table.find('tbody').append('No alerts match your filters.'); + table.find('tbody').append('No alerts match your filters.'); } } diff --git a/webassets/js/conditions.js b/webassets/js/conditions.js index fb0fa80..c323a61 100644 --- a/webassets/js/conditions.js +++ b/webassets/js/conditions.js @@ -8,7 +8,7 @@ function loadSolarConditions() { // HF - const hfConditionClass = { 'Good': 'table-success', 'Fair': 'table-warning', 'Poor': 'table-danger' }; + const hfConditionClass = { 'Good': 'bg-success-subtle', 'Fair': 'bg-warning-subtle', 'Poor': 'bg-danger-subtle' }; if (jsonData.hf_conditions) { Object.entries(jsonData.hf_conditions).forEach(function([key, condition]) { @@ -26,11 +26,11 @@ function loadSolarConditions() { cell.text(condition); let vhfClass; if (condition === 'Band Closed') { - vhfClass = 'table-danger'; + vhfClass = 'bg-danger-subtle'; } else if (condition.includes('High')) { - vhfClass = 'table-warning'; + vhfClass = 'bg-warning-subtle'; } else { - vhfClass = 'table-success'; + vhfClass = 'bg-success-subtle'; } cell.addClass(vhfClass); }); @@ -130,8 +130,8 @@ function renderDxStats() { const range = max - min; cells.forEach(function({ cell, count }) { const t = range > 0 ? (count - min) / range : 0; - const cls = t === 0 ? 'table-danger' : t < 0.05 ? 'table-warning' : 'table-success'; - cell.removeClass('table-danger table-warning table-success').addClass(cls); + const cls = t === 0 ? 'bg-danger-subtle' : t < 0.05 ? 'bg-warning-subtle' : 'bg-success-subtle'; + cell.removeClass('bg-danger-subtle bg-warning-subtle bg-success-subtle').addClass(cls); }); } diff --git a/webassets/js/spots.js b/webassets/js/spots.js index aea499b..556ab5b 100644 --- a/webassets/js/spots.js +++ b/webassets/js/spots.js @@ -111,39 +111,39 @@ function updateTable() { let table = $("#table"); table.find('thead tr').empty(); if (showTime) { - table.find('thead tr').append(`${useLocalTime ? "Local" : "UTC"}`); + table.find('thead tr').append(`${useLocalTime ? "Local" : "UTC"}`); } if (showDX) { - table.find('thead tr').append(`DX`); + table.find('thead tr').append(`DX`); } if (showFreq) { - table.find('thead tr').append(`Frequency`); + table.find('thead tr').append(`Frequency`); } if (showMode) { - table.find('thead tr').append(`Mode`); + table.find('thead tr').append(`Mode`); } if (showComment) { - table.find('thead tr').append(`Comment`); + table.find('thead tr').append(`Comment`); } if (showBearing) { - table.find('thead tr').append(`Bearing`); + table.find('thead tr').append(`Bearing`); } if (showType) { - table.find('thead tr').append(`Type`); + table.find('thead tr').append(`Type`); } if (showRef) { - table.find('thead tr').append(`Ref.`); + table.find('thead tr').append(`Ref.`); } if (showDE) { - table.find('thead tr').append(`DE`); + table.find('thead tr').append(`DE`); } if (showWorkedCheckbox) { - table.find('thead tr').append(``); + table.find('thead tr').append(``); } table.find('tbody').empty(); if (spots.length == 0) { - table.find('tbody').append('No spots match your filters.'); + table.find('tbody').append('No spots match your filters.'); } // We are regenerating the entire table not just adding a new row, so reset the row counter