mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-04-29 18:25:58 +00:00
Conditions display should be a separate page #92
This commit is contained in:
@@ -79,6 +79,8 @@ class WebServer:
|
||||
{"template_name": "alerts", "web_server_metrics": self.web_server_metrics}),
|
||||
(r"/add-spot", PageTemplateHandler,
|
||||
{"template_name": "add_spot", "web_server_metrics": self.web_server_metrics}),
|
||||
(r"/conditions", PageTemplateHandler,
|
||||
{"template_name": "conditions", "web_server_metrics": self.web_server_metrics}),
|
||||
(r"/status", PageTemplateHandler,
|
||||
{"template_name": "status", "web_server_metrics": self.web_server_metrics}),
|
||||
(r"/about", PageTemplateHandler, {"template_name": "about", "web_server_metrics": self.web_server_metrics}),
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<p>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.</p>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-about").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -69,8 +69,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/add-spot.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/add-spot.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-add-spot").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -50,18 +50,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="conditions-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/conditions-area-header.html", web_ui_options=web_ui_options) %}
|
||||
</div>
|
||||
|
||||
<div id="table-container">
|
||||
<table id="table" class="table"><thead><tr class="table-primary"></tr></thead><tbody></tbody></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/alerts.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/alerts.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-alerts").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -55,10 +55,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="conditions-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/conditions-area-header.html", web_ui_options=web_ui_options) %}
|
||||
</div>
|
||||
|
||||
<div id="bands-container"></div>
|
||||
|
||||
</div>
|
||||
@@ -66,9 +62,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774695038"></script>
|
||||
<script src="/js/bands.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774697797"></script>
|
||||
<script src="/js/bands.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -46,10 +46,10 @@
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/tinycolor2@1.6.0/cjs/tinycolor.min.js"></script>
|
||||
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1774695038"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/storage.js?v=1774695038"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1774695038"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1774695038"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1774697797"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/storage.js?v=1774697797"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1774697797"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1774697797"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -71,6 +71,7 @@
|
||||
{% if allow_spotting %}
|
||||
<li class="nav-item ms-4"><a href="/add-spot" class="nav-link" id="nav-link-add-spot"><i class="fa-solid fa-comment"></i> Add Spot</a></li>
|
||||
{% end %}
|
||||
<li class="nav-item ms-4"><a href="/conditions" class="nav-link" id="nav-link-conditions"><i class="fa-solid fa-sun"></i> Conditions</a></li>
|
||||
<li class="nav-item ms-4"><a href="/status" class="nav-link" id="nav-link-status"><i class="fa-solid fa-chart-simple"></i> Status</a></li>
|
||||
<li class="nav-item ms-4"><a href="/about" class="nav-link" id="nav-link-about"><i class="fa-solid fa-circle-info"></i> About</a></li>
|
||||
<li class="nav-item ms-4"><a href="/apidocs" class="nav-link" id="nav-link-api"><i class="fa-solid fa-gear"></i> API</a></li>
|
||||
|
||||
9
templates/conditions.html
Normal file
9
templates/conditions.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
Coming soon!
|
||||
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-conditions").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -56,10 +56,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="conditions-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/conditions-area-header.html", web_ui_options=web_ui_options) %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,9 +70,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774695038"></script>
|
||||
<script src="/js/map.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774697797"></script>
|
||||
<script src="/js/map.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -78,10 +78,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="conditions-area" class="appearing-panel card mb-3">
|
||||
{% module Template("widgets/conditions-area-header.html", web_ui_options=web_ui_options) %}
|
||||
</div>
|
||||
|
||||
<div id="table-container">
|
||||
<table id="table" class="table"><thead><tr class="table-primary"></tr></thead><tbody></tbody></table>
|
||||
</div>
|
||||
@@ -91,9 +87,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774695038"></script>
|
||||
<script src="/js/spots.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774697797"></script>
|
||||
<script src="/js/spots.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
<div id="status-container" class="row row-cols-1 row-cols-md-4 g-4 mt-4"></div>
|
||||
|
||||
<script src="/js/common.js?v=1774695038"></script>
|
||||
<script src="/js/status.js?v=1774695038"></script>
|
||||
<script src="/js/common.js?v=1774697797"></script>
|
||||
<script src="/js/status.js?v=1774697797"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-status").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -1,5 +1,4 @@
|
||||
<div class="d-inline-flex gap-1">
|
||||
<button id="conditions-button" type="button" class="btn btn-outline-secondary" data-bs-toggle="button" onclick="toggleConditionsPanel();"><i class="fa-solid fa-sun"></i><span class="hideonmobile"> Conditions</span></button>
|
||||
<button id="filters-button" type="button" class="btn btn-outline-secondary" data-bs-toggle="button" onclick="toggleFiltersPanel();"><i class="fa-solid fa-filter"></i><span class="hideonmobile"> Filters</span></button>
|
||||
<button id="display-button" type="button" class="btn btn-outline-secondary" data-bs-toggle="button" onclick="toggleDisplayPanel();"><i class="fa-solid fa-desktop"></i><span class="hideonmobile"> Display</span></button>
|
||||
<button id="filters-button" type="button" class="btn btn-outline-secondary" data-bs-toggle="button" onclick="toggleFiltersPanel();"><i class="fa-solid fa-filter"></i> Filters</button>
|
||||
<button id="display-button" type="button" class="btn btn-outline-secondary" data-bs-toggle="button" onclick="toggleDisplayPanel();"><i class="fa-solid fa-desktop"></i> Display</button>
|
||||
</div>
|
||||
@@ -183,13 +183,10 @@ function listenForOSThemeChange() {
|
||||
});
|
||||
}
|
||||
|
||||
// Panel toggle functions.
|
||||
// PANELS is the single registry of all collapsible panels. To add a new panel, add an entry here
|
||||
// and provide named wrappers below. The toggle logic will automatically handle hiding other panels.
|
||||
// Panel toggle functions
|
||||
const PANELS = [
|
||||
{ area: "#filters-area", button: "#filters-button" },
|
||||
{ area: "#display-area", button: "#display-button" },
|
||||
{ area: "#conditions-area", button: "#conditions-button" },
|
||||
{ area: "#filters-area",button: "#filters-button" },
|
||||
{ area: "#display-area", button: "#display-button" },
|
||||
];
|
||||
|
||||
// Toggle a panel open or closed. If opening, all other visible panels are closed first.
|
||||
@@ -217,8 +214,6 @@ function toggleFiltersPanel() { togglePanel("#filters-area"); }
|
||||
function closeFiltersPanel() { closePanel("#filters-area"); }
|
||||
function toggleDisplayPanel() { togglePanel("#display-area"); }
|
||||
function closeDisplayPanel() { closePanel("#display-area"); }
|
||||
function toggleConditionsPanel() { togglePanel("#conditions-area"); }
|
||||
function closeConditionsPanel() { closePanel("#conditions-area"); }
|
||||
|
||||
|
||||
// Startup
|
||||
|
||||
Reference in New Issue
Block a user