diff --git a/core/constants.py b/core/constants.py index 640ed8d..063361b 100644 --- a/core/constants.py +++ b/core/constants.py @@ -67,13 +67,6 @@ SIGS = [ ref_regex=r"(([A-Z]{2}\-\d{3})|([A-Z0-9]{1,3}\/[A-Z]{2}\-\d{3}))", 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( name="ARLHS", comment_names=["ARLHS"], @@ -88,6 +81,13 @@ SIGS = [ ref_regex=r"[A-Z]{2}\d{4}", 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( name="SIOTA", comment_names=["SIOTA"], @@ -107,14 +107,16 @@ SIGS = [ comment_names=["ZLOTA"], description="New Zealand on the Air", ref_regex=r"ZL[A-Z]/[A-Z]{2}\-\d{3,4}", - icon="fa-kiwi-bird" + icon="fa-kiwi-bird", + region_flag="🇳🇿" ), SIG( name="WOTA", comment_names=["WOTA"], description="Wainwrights on the Air", ref_regex=r"[A-Z]{3}-[0-9]{2}", - icon="fa-w" + icon="fa-w", + region_flag="🇬🇧" ), SIG(name="BOTA", comment_names=[], @@ -126,14 +128,16 @@ SIGS = [ comment_names=["KRMNPA"], description="Keith Roget Memorial National Parks Award", ref_regex=r"VKFF\-\d{4}", - icon="fa-earth-oceania" + icon="fa-earth-oceania", + region_flag="🇦🇺" ), SIG( name="SANPCPA", comment_names=["SANPCPA"], description="South Australian National Parks and Conservation Parks Award", ref_regex=r"VKFF\-\d{4}", - icon="fa-earth-oceania" + icon="fa-earth-oceania", + region_flag="🇦🇺" ), SIG( name="LLOTA", @@ -161,21 +165,24 @@ SIGS = [ comment_names=["WAB"], description="Worked All Britain", ref_regex=r"[A-Z]{1,2}[0-9]{2}", - icon="fa-table-cells-large" + icon="fa-table-cells-large", + region_flag="🇬🇧" ), SIG( name="WAI", comment_names=["WAI"], description="Worked All Ireland", ref_regex=r"[A-Z][0-9]{2}", - icon="fa-table-cells-large" + icon="fa-table-cells-large", + region_flag="🇮🇪" ), SIG( name="DME", comment_names=["DME"], description="Diploma Municipios de España", ref_regex=r"\d{4,5}", - icon="fa-building" + icon="fa-building", + region_flag="🇪🇸" ), SIG( 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- # 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)?", - icon="fa-house-flood-water" + icon="fa-house-flood-water", + region_flag="🇪🇸" ), SIG( name="DTMBA", comment_names=["DTMBA"], description="Diploma Teatri Musei e Belle Arti", ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}", - icon="fa-masks-theater" + icon="fa-masks-theater", + region_flag="🇮🇹" ), SIG( name="BIWOTA", comment_names=["BIWOTA"], description="British Inland Waterways on the Air", - icon="fa-ship" + icon="fa-ship", + region_flag="🇬🇧" ), SIG( name="Toilets", comment_names=[], description="Toilets on the Air", ref_regex=r"T\-[0-9]{2}", - icon="fa-toilet" + icon="fa-toilet", + region_flag="🏴☠️" ), ] diff --git a/data/sig.py b/data/sig.py index aa27b3b..9ab71f1 100644 --- a/data/sig.py +++ b/data/sig.py @@ -21,3 +21,6 @@ class SIG: ref_regex: str | None = None # Icon to use in the UI when referencing this SIG. Chosen from the Font Awesome set. 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 diff --git a/static/apidocs/openapi.yml b/static/apidocs/openapi.yml index 039ce9e..3571f1d 100644 --- a/static/apidocs/openapi.yml +++ b/static/apidocs/openapi.yml @@ -19,7 +19,7 @@ info: * 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. - * Added `icon` to SIG information + * Added `icon` and `region_flag` to SIG information ### 2.0 @@ -1509,6 +1509,10 @@ components: type: string description: Icon from the Font Awesome set that represents this SIG, for use in the front end. 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: type: object diff --git a/static/js/spotsbandsandmap.js b/static/js/spotsbandsandmap.js index 62ca35d..e761ab7 100644 --- a/static/js/spotsbandsandmap.js +++ b/static/js/spotsbandsandmap.js @@ -40,14 +40,23 @@ function setHamHFBandToggles() { // Generate SIGs filter card. This one is also a special case. function generateSIGsMultiToggleFilterCard(sig_options) { - const $grid = $('