Split SIGs list into Worldwide, Regional and Other. Closes #133

This commit is contained in:
Ian Renton
2026-08-31 18:38:19 +01:00
parent f42fd237b1
commit e4738b2c7d
12 changed files with 66 additions and 39 deletions
+29 -18
View File
@@ -67,13 +67,6 @@ SIGS = [
ref_regex=r"(([A-Z]{2}\-\d{3})|([A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}))", ref_regex=r"(([A-Z]{2}\-\d{3})|([A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}))",
icon="fa-person-hiking" icon="fa-person-hiking"
), ),
SIG(
name="MOTA",
comment_names=["MOTA"],
description="Mills on the Air",
ref_regex=r"X\d{4,6}",
icon="fa-fan"
),
SIG( SIG(
name="ARLHS", name="ARLHS",
comment_names=["ARLHS"], comment_names=["ARLHS"],
@@ -88,6 +81,13 @@ SIGS = [
ref_regex=r"[A-Z]{2}\d{4}", ref_regex=r"[A-Z]{2}\d{4}",
icon="fa-house-flood-water" icon="fa-house-flood-water"
), ),
SIG(
name="MOTA",
comment_names=["MOTA"],
description="Mills on the Air",
ref_regex=r"X\d{4,6}",
icon="fa-fan"
),
SIG( SIG(
name="SIOTA", name="SIOTA",
comment_names=["SIOTA"], comment_names=["SIOTA"],
@@ -107,14 +107,16 @@ SIGS = [
comment_names=["ZLOTA"], comment_names=["ZLOTA"],
description="New Zealand on the Air", description="New Zealand on the Air",
ref_regex=r"ZL[A-Z]/[A-Z]{2}\-\d{3,4}", ref_regex=r"ZL[A-Z]/[A-Z]{2}\-\d{3,4}",
icon="fa-kiwi-bird" icon="fa-kiwi-bird",
region_flag="🇳🇿"
), ),
SIG( SIG(
name="WOTA", name="WOTA",
comment_names=["WOTA"], comment_names=["WOTA"],
description="Wainwrights on the Air", description="Wainwrights on the Air",
ref_regex=r"[A-Z]{3}-[0-9]{2}", ref_regex=r"[A-Z]{3}-[0-9]{2}",
icon="fa-w" icon="fa-w",
region_flag="🇬🇧"
), ),
SIG(name="BOTA", SIG(name="BOTA",
comment_names=[], comment_names=[],
@@ -126,14 +128,16 @@ SIGS = [
comment_names=["KRMNPA"], comment_names=["KRMNPA"],
description="Keith Roget Memorial National Parks Award", description="Keith Roget Memorial National Parks Award",
ref_regex=r"VKFF\-\d{4}", ref_regex=r"VKFF\-\d{4}",
icon="fa-earth-oceania" icon="fa-earth-oceania",
region_flag="🇦🇺"
), ),
SIG( SIG(
name="SANPCPA", name="SANPCPA",
comment_names=["SANPCPA"], comment_names=["SANPCPA"],
description="South Australian National Parks and Conservation Parks Award", description="South Australian National Parks and Conservation Parks Award",
ref_regex=r"VKFF\-\d{4}", ref_regex=r"VKFF\-\d{4}",
icon="fa-earth-oceania" icon="fa-earth-oceania",
region_flag="🇦🇺"
), ),
SIG( SIG(
name="LLOTA", name="LLOTA",
@@ -161,21 +165,24 @@ SIGS = [
comment_names=["WAB"], comment_names=["WAB"],
description="Worked All Britain", description="Worked All Britain",
ref_regex=r"[A-Z]{1,2}[0-9]{2}", ref_regex=r"[A-Z]{1,2}[0-9]{2}",
icon="fa-table-cells-large" icon="fa-table-cells-large",
region_flag="🇬🇧"
), ),
SIG( SIG(
name="WAI", name="WAI",
comment_names=["WAI"], comment_names=["WAI"],
description="Worked All Ireland", description="Worked All Ireland",
ref_regex=r"[A-Z][0-9]{2}", ref_regex=r"[A-Z][0-9]{2}",
icon="fa-table-cells-large" icon="fa-table-cells-large",
region_flag="🇮🇪"
), ),
SIG( SIG(
name="DME", name="DME",
comment_names=["DME"], comment_names=["DME"],
description="Diploma Municipios de España", description="Diploma Municipios de España",
ref_regex=r"\d{4,5}", ref_regex=r"\d{4,5}",
icon="fa-building" icon="fa-building",
region_flag="🇪🇸"
), ),
SIG( SIG(
name="FEA", name="FEA",
@@ -184,27 +191,31 @@ SIGS = [
# FEA references are technically [DE]\-\d{4}(\.\d)? but spotters always seem to miss out the D- or E- # FEA references are technically [DE]\-\d{4}(\.\d)? but spotters always seem to miss out the D- or E-
# prefix and just use FEA 1234, so we treat FEA reference IDs as if they were just the number. # prefix and just use FEA 1234, so we treat FEA reference IDs as if they were just the number.
ref_regex=r"\d{4}(\.\d)?", ref_regex=r"\d{4}(\.\d)?",
icon="fa-house-flood-water" icon="fa-house-flood-water",
region_flag="🇪🇸"
), ),
SIG( SIG(
name="DTMBA", name="DTMBA",
comment_names=["DTMBA"], comment_names=["DTMBA"],
description="Diploma Teatri Musei e Belle Arti", description="Diploma Teatri Musei e Belle Arti",
ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}", ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}",
icon="fa-masks-theater" icon="fa-masks-theater",
region_flag="🇮🇹"
), ),
SIG( SIG(
name="BIWOTA", name="BIWOTA",
comment_names=["BIWOTA"], comment_names=["BIWOTA"],
description="British Inland Waterways on the Air", description="British Inland Waterways on the Air",
icon="fa-ship" icon="fa-ship",
region_flag="🇬🇧"
), ),
SIG( SIG(
name="Toilets", name="Toilets",
comment_names=[], comment_names=[],
description="Toilets on the Air", description="Toilets on the Air",
ref_regex=r"T\-[0-9]{2}", ref_regex=r"T\-[0-9]{2}",
icon="fa-toilet" icon="fa-toilet",
region_flag="🏴‍☠️"
), ),
] ]
+3
View File
@@ -21,3 +21,6 @@ class SIG:
ref_regex: str | None = None ref_regex: str | None = None
# Icon to use in the UI when referencing this SIG. Chosen from the Font Awesome set. # Icon to use in the UI when referencing this SIG. Chosen from the Font Awesome set.
icon: str | None = None icon: str | None = None
# Emoji flag for the country or region where this SIG is relevant, if any. If None, this implies the SIG is in
# worldwide usage.
region_flag: str | None = None
+5 -1
View File
@@ -19,7 +19,7 @@ info:
* Added DTMBA, FEA and BIWOTA SIGs * Added DTMBA, FEA and BIWOTA SIGs
* Removed the distinction between LSB & USB (both will now show as SSB) and between the various digital voice modes, which will now show as DV. * Removed the distinction between LSB & USB (both will now show as SSB) and between the various digital voice modes, which will now show as DV.
* Added `icon` to SIG information * Added `icon` and `region_flag` to SIG information
### 2.0 ### 2.0
@@ -1509,6 +1509,10 @@ components:
type: string type: string
description: Icon from the Font Awesome set that represents this SIG, for use in the front end. description: Icon from the Font Awesome set that represents this SIG, for use in the front end.
example: "fa-tree" example: "fa-tree"
region_flag:
type: string
description: Flag emoji, if this SIG is specific to a country or region. If null, this SIG is treated as worldwide.
example: "🇺🇳"
SolarConditions: SolarConditions:
type: object type: object
+14 -5
View File
@@ -40,14 +40,23 @@ function setHamHFBandToggles() {
// Generate SIGs filter card. This one is also a special case. // Generate SIGs filter card. This one is also a special case.
function generateSIGsMultiToggleFilterCard(sig_options) { function generateSIGsMultiToggleFilterCard(sig_options) {
const $grid = $('<div class="row row-cols-2 g-1 mb-1">'); const $grid1 = $('<div class="row row-cols-2 g-1 mb-1">');
sig_options.forEach(o => { $("#sig-options").append('<strong>Worldwide</strong>');
sig_options.filter(o => o["region_flag"] == null).forEach(o => {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, ""); const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${sigToIcon(o['name'], options["sigs"], 'fa-tower-cell')}"></i> ${o['name']}</label></div></div>`); $grid1.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']}</label></div></div>`);
}); });
$("#sig-options").append($grid1);
const $grid2 = $('<div class="row row-cols-2 g-1 mb-1">');
$("#sig-options").append('<strong>Regional</strong>');
sig_options.filter(o => o["region_flag"] != null).forEach(o => {
const domSafeName = o["name"].replace(/^[^A-Za-z0-9]+|[^\w]+/gi, "");
$grid2.append(`<div class="col"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-${domSafeName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-${domSafeName}" for="filter-button-sig-${domSafeName}" title="${o['description']}"><i class="fa-solid ${o['icon']}"></i> ${o['name']} ${o['region_flag']}</label></div></div>`);
});
$("#sig-options").append($grid2);
$("#sig-options").append('<strong>Other</strong>');
// Bonus "NO_SIG" / "General DX" option // Bonus "NO_SIG" / "General DX" option
$grid.append(`<div class="w-100"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label></div></div>`); $("#sig-options").append(`<div class="w-100"><div class="form-check"><input type="checkbox" class="form-check-input filter-button-sig storeable-checkbox" id="filter-button-sig-NO_SIG" value="NO_SIG" autocomplete="off" onClick="filtersUpdated()" checked><label class="form-check-label" id="filter-button-label-sig-NO_SIG" for="filter-button-sig-NO_SIG"><i class="fa-solid fa-tower-cell"></i> General DX</label></div></div>`);
$("#sig-options").append($grid);
$("#sig-options").append(`<div class="mt-1"><a href="#" onclick="toggleFilterButtons('sig', true); return false;">All</a> &nbsp; <a href="#" onclick="toggleFilterButtons('sig', false); return false;">None</a></div>`); $("#sig-options").append(`<div class="mt-1"><a href="#" onclick="toggleFilterButtons('sig', true); return false;">All</a> &nbsp; <a href="#" onclick="toggleFilterButtons('sig', false); return false;">None</a></div>`);
} }
+1 -1
View File
@@ -76,7 +76,7 @@
</div> </div>
<script src="/static/js/add-spot.js?v=1788195425"></script> <script src="/static/js/add-spot.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-add-spot").addClass("active"); $("#nav-link-add-spot").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -84,7 +84,7 @@
</div> </div>
<script src="/static/js/alerts.js?v=1788195424"></script> <script src="/static/js/alerts.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-alerts").addClass("active"); $("#nav-link-alerts").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -76,8 +76,8 @@
</div> </div>
<script src="/static/js/spotsbandsandmap.js?v=1788195425"></script> <script src="/static/js/spotsbandsandmap.js?v=1788197899"></script>
<script src="/static/js/bands.js?v=1788195425"></script> <script src="/static/js/bands.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-bands").addClass("active"); $("#nav-link-bands").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+5 -5
View File
@@ -1,6 +1,6 @@
{% extends "skeleton.html" %} {% extends "skeleton.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/css/style.css?v=1788195424" type="text/css"> <link rel="stylesheet" href="/static/css/style.css?v=1788197899" type="text/css">
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet"> <link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet"> <link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet"> <link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
@@ -15,10 +15,10 @@
window.fetchEventSource = fetchEventSource; window.fetchEventSource = fetchEventSource;
</script> </script>
<script src="/static/js/utils.js?v=1788195424"></script> <script src="/static/js/utils.js?v=1788197899"></script>
<script src="/static/js/ui-ham.js?v=1788195424"></script> <script src="/static/js/ui-ham.js?v=1788197899"></script>
<script src="/static/js/geo.js?v=1788195424"></script> <script src="/static/js/geo.js?v=1788197899"></script>
<script src="/static/js/common.js?v=1788195424"></script> <script src="/static/js/common.js?v=1788197899"></script>
{% end %} {% end %}
{% block body %} {% block body %}
<div class="container"> <div class="container">
+1 -1
View File
@@ -284,7 +284,7 @@
</div> </div>
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script> <script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
<script src="/static/js/conditions.js?v=1788195424"></script> <script src="/static/js/conditions.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-conditions").addClass("active"); $("#nav-link-conditions").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
</script> </script>
<script src="/static/js/spotsbandsandmap.js?v=1788195424"></script> <script src="/static/js/spotsbandsandmap.js?v=1788197899"></script>
<script src="/static/js/map.js?v=1788195424"></script> <script src="/static/js/map.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-map").addClass("active"); $("#nav-link-map").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
</div> </div>
<script src="/static/js/spotsbandsandmap.js?v=1788195424"></script> <script src="/static/js/spotsbandsandmap.js?v=1788197899"></script>
<script src="/static/js/spots.js?v=1788195424"></script> <script src="/static/js/spots.js?v=1788197899"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-spots").addClass("active"); $("#nav-link-spots").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -86,7 +86,7 @@
</div> </div>
</div> </div>
<script src="/static/js/status.js?v=1788195425"></script> <script src="/static/js/status.js?v=1788197899"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$("#nav-link-status").addClass("active"); $("#nav-link-status").addClass("active");