mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Provide links for SIG refs
This commit is contained in:
@@ -680,6 +680,12 @@ components:
|
||||
type: string
|
||||
description: SIG reference names
|
||||
example: Null Country Park
|
||||
sig_refs_urls:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: SIG reference URLs, which the user can look up for more information
|
||||
example: "https://pota.app/#/park/GB-0001"
|
||||
activation_score:
|
||||
type: integer
|
||||
description: Activation score. SOTA only
|
||||
|
||||
@@ -92,10 +92,13 @@ span.icon-wrapper {
|
||||
}
|
||||
|
||||
span.freq-mhz {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.freq-mhz-pad {
|
||||
display: inline-block;
|
||||
min-width: 1.7em;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.freq-khz {
|
||||
@@ -117,6 +120,10 @@ a.dx-link {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a.sig-ref-link {
|
||||
color: var(--bs-emphasis-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* QRT/faded styles */
|
||||
tr.table-faded td {
|
||||
@@ -142,12 +149,6 @@ div#map {
|
||||
font-family: var(--bs-body-font-family) !important;
|
||||
}
|
||||
|
||||
a.leaflet-popup-callsign-link {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
/* GENERAL MOBILE SUPPORT */
|
||||
|
||||
|
||||
@@ -100,7 +100,13 @@ function getTooltipText(s) {
|
||||
|
||||
// Format sig_refs
|
||||
var sig_refs = "";
|
||||
if (s["sig_refs"]) {
|
||||
if (s["sig_refs"] && s["sig_refs_urls"] && s["sig_refs"].length == s["sig_refs_urls"].length) {
|
||||
items = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`)
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i] = `<a href='${s["sig_refs_urls"][i]}' target='_new' class='sig-ref-link'>${items[i]}</a>`
|
||||
}
|
||||
sig_refs = items.join(", ");
|
||||
} else if (s["sig_refs"]) {
|
||||
sig_refs = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`).join(", ");
|
||||
}
|
||||
|
||||
@@ -108,10 +114,13 @@ function getTooltipText(s) {
|
||||
const shortCall = s["dx_call"].split("/").sort(function (a, b) {
|
||||
return b.length - a.length;
|
||||
})[0];
|
||||
ttt = `<span class='nowrap'>${dx_flag} <a href='https://www.qrz.com/db/${shortCall}' target='_blank' class="leaflet-popup-callsign-link">${s["dx_call"]}</a></span><br/>`;
|
||||
ttt = `<span class='nowrap'><span class='icon-wrapper'>${dx_flag}</span> <a href='https://www.qrz.com/db/${shortCall}' target='_blank' class="dx-link">${s["dx_call"]}</a></span><br/>`;
|
||||
|
||||
// Frequency & band
|
||||
ttt += `<i class='fa-solid fa-walkie-talkie markerPopupIcon'></i> ${freq_string} (${s["band"]})`;
|
||||
ttt += `<span class='icon-wrapper'><i class='fa-solid fa-radio markerPopupIcon'></i></span> ${freq_string}`;
|
||||
if (s["band"] != null) {
|
||||
ttt += ` (${s["band"]})`;
|
||||
}
|
||||
// Mode
|
||||
if (s["mode"] != null) {
|
||||
ttt += ` <i class='fa-solid fa-wave-square markerPopupIcon'></i> ${s["mode"]}`;
|
||||
@@ -119,14 +128,14 @@ function getTooltipText(s) {
|
||||
ttt += "<br/>";
|
||||
|
||||
// Source / SIG / Ref
|
||||
ttt += `<span class='nowrap'><span class='icon-wrapper'><i class='fa-solid fa-${s["icon"]}'></i> ${sigSourceText} ${sig_refs}</span><br/>`;
|
||||
ttt += `<span class='nowrap'><span class='icon-wrapper'><i class='fa-solid fa-${s["icon"]}'></i></span> ${sigSourceText} ${sig_refs}</span><br/>`;
|
||||
|
||||
// Time
|
||||
ttt += `<i class='fa-solid fa-clock markerPopupIcon'></i> ${moment.unix(s["time"]).fromNow()}`;
|
||||
ttt += `<span class='icon-wrapper'><i class='fa-solid fa-clock markerPopupIcon'></i></span> ${moment.unix(s["time"]).fromNow()}`;
|
||||
|
||||
// Comment
|
||||
if (commentText.length > 0) {
|
||||
ttt += `<br/><i class='fa-solid fa-comment markerPopupIcon'></i> ${commentText}`;
|
||||
ttt += `<br/><span class='icon-wrapper'><i class='fa-solid fa-comment markerPopupIcon'></i></span> ${commentText}`;
|
||||
}
|
||||
|
||||
return ttt;
|
||||
|
||||
@@ -109,7 +109,7 @@ function updateTable() {
|
||||
var khz = Math.floor((s["freq"] - (mhz * 1000000.0)) / 1000.0);
|
||||
var hz = Math.floor(s["freq"] - (mhz * 1000000.0) - (khz * 1000.0));
|
||||
var hz_string = (hz > 0) ? hz.toFixed(0)[0] : "";
|
||||
var freq_string = `<span class='freq-mhz'>${mhz.toFixed(0)}</span><span class='freq-khz'>${khz.toFixed(0).padStart(3, '0')}</span><span class='freq-hz hideonmobile'>${hz_string}</span>`
|
||||
var freq_string = `<span class='freq-mhz freq-mhz-pad'>${mhz.toFixed(0)}</span><span class='freq-khz'>${khz.toFixed(0).padStart(3, '0')}</span><span class='freq-hz hideonmobile'>${hz_string}</span>`
|
||||
|
||||
// Format the mode
|
||||
mode_string = s["mode"];
|
||||
@@ -148,7 +148,13 @@ function updateTable() {
|
||||
|
||||
// Format sig_refs
|
||||
var sig_refs = "";
|
||||
if (s["sig_refs"]) {
|
||||
if (s["sig_refs"] && s["sig_refs_urls"] && s["sig_refs"].length == s["sig_refs_urls"].length) {
|
||||
items = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`)
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
items[i] = `<a href='${s["sig_refs_urls"][i]}' target='_new' class='sig-ref-link'>${items[i]}</a>`
|
||||
}
|
||||
sig_refs = items.join(", ");
|
||||
} else if (s["sig_refs"]) {
|
||||
sig_refs = s["sig_refs"].map(s => `<span class='nowrap'>${s}</span>`).join(", ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user