Tonne of udpatess

This commit is contained in:
2026-02-18 10:01:54 -07:00
parent 99a6abab06
commit 56e262ad8b
197 changed files with 42200 additions and 968 deletions

View File

@@ -0,0 +1,74 @@
{
"enabled": true,
"items": [
{
"id": "campaigns",
"label": "Campaigns",
"path": "/campaigns",
"icon": "campaign",
"enabled": true,
"order": 0,
"type": "builtin"
},
{
"id": "map",
"label": "Map",
"path": "/map",
"icon": "map",
"enabled": true,
"order": 1,
"type": "builtin"
},
{
"id": "shifts",
"label": "Volunteer",
"path": "/shifts",
"icon": "groups",
"enabled": true,
"order": 2,
"type": "builtin"
},
{
"id": "gallery",
"label": "Gallery",
"path": "/gallery",
"icon": "play_circle",
"enabled": true,
"order": 3,
"type": "builtin"
},
{
"id": "responses",
"label": "Responses",
"path": "/responses",
"icon": "forum",
"enabled": true,
"order": 4,
"type": "builtin"
},
{
"id": "donate",
"label": "Donate",
"path": "/donate",
"icon": "favorite",
"enabled": true,
"order": 5,
"type": "builtin"
},
{
"id": "login",
"label": "Sign In",
"path": "/login",
"icon": "login",
"enabled": true,
"order": 6,
"type": "builtin"
}
],
"style": {
"backgroundColor": "#6f42c1",
"textColor": "#ffffff",
"hoverColor": "rgba(255,255,255,0.15)",
"height": "40px"
}
}

View File

@@ -0,0 +1,125 @@
{# Auto-generated by Changemaker Lite Header Builder — do not edit manually #}
{% extends "base.html" %}
{% block announce %}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<nav class="cm-header-nav" role="navigation" aria-label="Application">
<div class="cm-header-nav__inner">
<a href="#" data-path="/campaigns" class="cm-header-nav__link">
<span class="material-icons">campaign</span>
<span class="cm-header-nav__label">Campaigns</span>
</a>
<a href="#" data-path="/map" class="cm-header-nav__link">
<span class="material-icons">map</span>
<span class="cm-header-nav__label">Map</span>
</a>
<a href="#" data-path="/shifts" class="cm-header-nav__link">
<span class="material-icons">groups</span>
<span class="cm-header-nav__label">Volunteer</span>
</a>
<a href="#" data-path="/gallery" class="cm-header-nav__link">
<span class="material-icons">play_circle</span>
<span class="cm-header-nav__label">Gallery</span>
</a>
<a href="#" data-path="/responses" class="cm-header-nav__link">
<span class="material-icons">forum</span>
<span class="cm-header-nav__label">Responses</span>
</a>
<a href="#" data-path="/donate" class="cm-header-nav__link">
<span class="material-icons">favorite</span>
<span class="cm-header-nav__label">Donate</span>
</a>
<a href="#" data-path="/login" class="cm-header-nav__link">
<span class="material-icons">login</span>
<span class="cm-header-nav__label">Sign In</span>
</a>
</div>
</nav>
<script>
// Resolve nav link hrefs based on the current browser hostname.
// localhost → http://localhost:{ADMIN_PORT}
// subdomain.example.org → {proto}://app.example.org
(function() {
var h = location.hostname;
var base;
if (h === 'localhost' || h === '127.0.0.1') {
base = location.protocol + '//localhost:' + ({{ config.extra.admin_port }} || 3000);
} else {
var parts = h.split('.');
if (parts.length >= 3) { parts[0] = 'app'; }
else { parts.unshift('app'); }
base = location.protocol + '//' + parts.join('.');
}
var links = document.querySelectorAll('.cm-header-nav__link[data-path]');
for (var i = 0; i < links.length; i++) {
links[i].setAttribute('href', base + links[i].getAttribute('data-path'));
}
})();
</script>
<style>
/* Override MkDocs Material announce bar container */
.md-banner {
background: #6f42c1 !important;
color: #ffffff !important;
}
/* Hide the dismiss (X) button that Material adds for announce.dismiss */
.md-banner__button {
display: none !important;
}
.cm-header-nav {
background: #6f42c1;
min-height: 40px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 24px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
z-index: 10;
}
.cm-header-nav__inner {
display: flex;
align-items: center;
gap: 6px;
max-width: 1400px;
width: 100%;
justify-content: center;
flex-wrap: nowrap;
overflow-x: auto;
}
.cm-header-nav__link {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 16px;
color: #ffffff;
text-decoration: none;
font-size: 0.8rem;
font-weight: 600;
letter-spacing: 0.02em;
border-radius: 6px;
background: rgba(255, 255, 255, 0.12);
transition: background 0.15s, transform 0.1s;
white-space: nowrap;
line-height: 1;
}
.cm-header-nav__link:hover {
background: rgba(255,255,255,0.15);
color: #ffffff;
text-decoration: none;
transform: translateY(-1px);
}
.cm-header-nav__link:active {
transform: translateY(0);
}
.cm-header-nav__link .material-icons {
font-size: 16px;
opacity: 0.9;
}
@media (max-width: 768px) {
.cm-header-nav { padding: 0 8px; }
.cm-header-nav__label { display: none; }
.cm-header-nav__link { padding: 8px 10px; }
.cm-header-nav__inner { gap: 4px; }
}
</style>
{% endblock %}

View File

@@ -0,0 +1,55 @@
<script>
(function () {
// API URL injected from MkDocs config.extra (set by env_config_hook.py)
var apiUrl = "{{ config.extra.api_url }}";
if (!apiUrl) return;
var trackUrl = apiUrl + "/api/docs-analytics/track";
// Anonymous session UUID (sessionStorage — dies with tab close, no cookies)
function getSessionHash() {
var key = "__docs_sh";
var hash = sessionStorage.getItem(key);
if (!hash) {
hash = crypto.randomUUID
? crypto.randomUUID()
: "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
var r = (Math.random() * 16) | 0;
return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
});
sessionStorage.setItem(key, hash);
}
return hash;
}
function trackPageView(path) {
var payload = JSON.stringify({
path: path,
referrer: document.referrer || undefined,
sessionHash: getSessionHash(),
});
// Prefer sendBeacon for reliability (works during tab close)
if (navigator.sendBeacon) {
navigator.sendBeacon(trackUrl, new Blob([payload], { type: "application/json" }));
} else {
fetch(trackUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: payload,
keepalive: true,
}).catch(function () {});
}
}
// Track initial page load
trackPageView(location.pathname);
// Subscribe to Material's SPA navigation observable (instant loading)
if (typeof document$ !== "undefined") {
document$.subscribe(function () {
trackPageView(location.pathname);
});
}
})();
</script>