diff --git a/templates/about.html b/templates/about.html index 5f8a1bd..6d72bc2 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 a8a430d..626e685 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 9a89095..5e27775 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -56,8 +56,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/bands.html b/templates/bands.html index f6e397c..13f19ac 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 803376f..ca3ec9b 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 1ba1c4f..38fd1b3 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -3,7 +3,7 @@
- Band Conditions + Propagation Conditions
@@ -96,49 +96,50 @@ Solar Weather
-
-
Solar Flux
-
+
+
Solar Flux
+
SFI: Sunspots:
-
+
-
-
Geomagnetic
-
+
+
Geomagnetic
+
K: A: G Noise:
-
- , +
+ .
-
-
X-ray Flux
-
-
+
+
X-ray Flux
+
+
-
-
Proton Flux
-
+
+
Proton Flux
+
pfu S
-
+
-
-
Electron Flux
-
efu
-
+
+
Electron Flux
+
efu
+
+
Data from HamQSL.net.
- - + + {% end %} \ No newline at end of file diff --git a/templates/map.html b/templates/map.html index 35afad8..3f8ac25 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 df3bebe..afb806a 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -87,9 +87,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/status.html b/templates/status.html index c7e2bed..91b741a 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,8 +59,8 @@
- - + + diff --git a/webassets/js/conditions.js b/webassets/js/conditions.js index 12bfec0..8e03c7d 100644 --- a/webassets/js/conditions.js +++ b/webassets/js/conditions.js @@ -40,7 +40,7 @@ function loadSolarConditions() { const swFields = { 'sfi': 'sw-sfi', 'sunspots': 'sw-sunspots', - 'band_conditions_desc': 'sw-band-conditions-desc', + 'band_conditions_desc': 'sw-solar-flux-desc', 'k_index': 'sw-k-index', 'a_index': 'sw-a-index', 'geomag_field': 'sw-geomag-field', @@ -48,12 +48,12 @@ function loadSolarConditions() { 'geomag_storm_desc': 'sw-geomag-storm-desc', 'geomag_noise': 'sw-geomag-noise', 'x_ray': 'sw-x-ray', - 'blackout_desc': 'sw-blackout-desc', + 'blackout_desc': 'sw-xray-desc', 'proton_flux': 'sw-proton-flux', 'solar_storm_scale': 'sw-solar-storm-scale', - 'proton_flux_desc': 'sw-proton-flux-desc', + 'proton_flux_desc': 'sw-proton-desc', 'electron_flux': 'sw-electron-flux', - 'electron_flux_desc': 'sw-electron-flux-desc', + 'electron_flux_desc': 'sw-electron-desc', }; Object.entries(swFields).forEach(function([field, id]) { const val = jsonData[field]; @@ -61,6 +61,46 @@ function loadSolarConditions() { $('#' + id).text(val); } }); + + // Solar Weather - colouring + + function applySwClass(valsId, descId, cls) { + $('#' + valsId).addClass(cls); + $('#' + descId).addClass(cls); + } + + const sfi = jsonData.sfi; + if (sfi !== null && sfi !== undefined) { + applySwClass('sw-solar-flux-vals', 'sw-solar-flux-desc', + sfi > 150 ? 'bg-success-subtle' : sfi > 90 ? 'bg-warning-subtle' : 'bg-danger-subtle'); + } + + const kIndex = jsonData.k_index; + if (kIndex !== null && kIndex !== undefined) { + applySwClass('sw-geomag-vals', 'sw-geomag-desc', + kIndex < 5 ? 'bg-success-subtle' : kIndex < 7 ? 'bg-warning-subtle' : 'bg-danger-subtle'); + } + + const xRay = jsonData.x_ray; + if (xRay) { + const letter = xRay[0].toUpperCase(); + const xRayClass = (letter === 'X') ? 'bg-danger-subtle' + : (letter === 'M') ? 'bg-warning-subtle' + : 'bg-success-subtle'; + applySwClass('sw-xray-vals', 'sw-xray-desc', xRayClass); + } + + const protonFlux = jsonData.proton_flux; + if (protonFlux !== null && protonFlux !== undefined) { + applySwClass('sw-proton-vals', 'sw-proton-desc', + protonFlux <= 100 ? 'bg-success-subtle' : protonFlux <= 10000 ? 'bg-warning-subtle' : 'bg-danger-subtle'); + } + + const electronFlux = jsonData.electron_flux; + if (electronFlux !== null && electronFlux !== undefined) { + applySwClass('sw-electron-vals', 'sw-electron-desc', + electronFlux <= 100 ? 'bg-success-subtle' : electronFlux <= 1000 ? 'bg-warning-subtle' : 'bg-danger-subtle'); + } }); }