Remove the Susquehanna @ Sunbury header strip
The sunbury-flood pipeline is retired and api.c0smere.net/sunbury/forecast is gone. The strip was fail-closed, so it was already hidden; this removes the dead markup and fetch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b6c62337ac
commit
5dcd875a25
1 file changed
-50
@@ -108,10 +108,6 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site);
|
||||
<span class="live-dot" aria-hidden="true" />
|
||||
<span id="live-spotify" />
|
||||
</div>
|
||||
<div id="sby-stats" class="live-stats" hidden>
|
||||
<span class="live-dot" id="sby-dot" aria-hidden="true" />
|
||||
<span id="live-sby" />
|
||||
</div>
|
||||
<div id="knb-stats" class="live-stats" hidden>
|
||||
<span class="live-dot" id="knb-dot" aria-hidden="true" />
|
||||
<span id="live-knb" />
|
||||
@@ -354,52 +350,6 @@ const pageUrl = new URL(Astro.url.pathname, Astro.site);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Homepage Susquehanna strip: live stage + the 48h quantile stage
|
||||
// forecast from the sunbury-flood pipeline. Fail-closed.
|
||||
const sbyRow = document.getElementById('sby-stats');
|
||||
if (sbyRow) {
|
||||
try {
|
||||
const res = await fetch('https://api.c0smere.net/sunbury/forecast');
|
||||
if (!res.ok) throw new Error(String(res.status));
|
||||
const f = await res.json();
|
||||
const h48 =
|
||||
f.horizons.find((h: any) => h.horizon_h === 48) ??
|
||||
f.horizons[f.horizons.length - 1];
|
||||
const maxProb = Math.max(
|
||||
...f.horizons.map((h: any) => h.prob_above_flood),
|
||||
);
|
||||
document
|
||||
.getElementById('sby-dot')!
|
||||
.classList.add(
|
||||
maxProb >= 0.3
|
||||
? 'knb-dot-packed'
|
||||
: maxProb >= 0.05
|
||||
? 'knb-dot-typical'
|
||||
: 'knb-dot-quiet',
|
||||
);
|
||||
const slot = document.getElementById('live-sby')!;
|
||||
const put = (text: string, strong = false) => {
|
||||
const el = document.createElement('span');
|
||||
if (strong) el.className = 'v';
|
||||
el.textContent = text;
|
||||
slot.append(el);
|
||||
};
|
||||
put('susquehanna @ sunbury: ');
|
||||
put(`${f.current_stage_ft} ft`, true);
|
||||
put(' · 48h forecast: ');
|
||||
put(`${h48.p50} ft`, true);
|
||||
put(` (${h48.p10}–${h48.p90})`);
|
||||
put(' · flood odds ');
|
||||
put(maxProb < 0.005 ? '<1%' : `${Math.round(maxProb * 100)}%`, true);
|
||||
sbyRow.hidden = false;
|
||||
document.getElementById('live-strips')!.hidden = false;
|
||||
} catch {
|
||||
/* API down: row stays hidden */
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Odometer: fetch totals once, then animate forward at the lifetime
|
||||
// average rate. Looks live, but deliberately never exposes current
|
||||
|
||||
Reference in new issue
Block a user