← back to Ventura Corridor
iter 153: today.html ticker rail — '/api/magazine/activity' last-12 with icons + relative-time
b1955e0ce06fb24df1f657ec88851ff13757c971 · 2026-05-06 19:21:30 -0700 · SteveStudio2
Files touched
Diff
commit b1955e0ce06fb24df1f657ec88851ff13757c971
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 6 19:21:30 2026 -0700
iter 153: today.html ticker rail — '/api/magazine/activity' last-12 with icons + relative-time
---
public/today.html | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/public/today.html b/public/today.html
index 6a97b0f..2e38758 100644
--- a/public/today.html
+++ b/public/today.html
@@ -130,6 +130,11 @@
</nav>
</header>
+<section style="padding:14px 32px;border-bottom:1px solid var(--rule);background:rgba(184,153,104,0.03);overflow-x:auto;white-space:nowrap" id="mag-activity-rail">
+ <span style="font-family:var(--serif);font-style:italic;color:var(--metal);font-size:14px;margin-right:14px">The Corridor · just now:</span>
+ <span id="mag-activity-strip" style="font-family:var(--mono);font-size:11px;color:var(--ink-mute)">…</span>
+</section>
+
<section class="day-hero">
<div class="date" id="today-date">—</div>
<h2>Three things, <em>in order</em>.</h2>
@@ -699,6 +704,35 @@ async function patchInq(id, status) {
loadInquiries();
setInterval(loadInquiries, 60_000);
+async function loadMagActivity() {
+ try {
+ const d = await fetch('/api/magazine/activity?limit=12').then(r => r.json());
+ const ICONS = {
+ 'feature.generated': '✨', 'feature.published': '★', 'feature.reviewed': '✓',
+ 'cover.set': '⛧', 'inquiry.received': '$',
+ 'feedback.typo': '✎', 'feedback.correction': '✎', 'feedback.tip': '※',
+ 'feedback.complaint': '!', 'feedback.praise': '♥', 'feedback.note': '·'
+ };
+ const items = (d.events || []).map(e => {
+ const ic = ICONS[e.kind] || '·';
+ const ago = (() => {
+ const ms = Date.now() - new Date(e.at).getTime();
+ const m = Math.floor(ms / 60000);
+ if (m < 60) return m + 'm ago';
+ const h = Math.floor(m / 60);
+ if (h < 24) return h + 'h ago';
+ return Math.floor(h / 24) + 'd ago';
+ })();
+ const label = (e.label || '').toString().replace(/[<>]/g, '').slice(0, 50);
+ return `<span style="margin-right:24px;color:var(--ink-mute)"><span style="color:var(--metal-glow);margin-right:4px">${ic}</span>${label}<span style="color:var(--metal);margin-left:6px;font-size:9px">${ago}</span></span>`;
+ });
+ const pill = document.getElementById('mag-activity-strip');
+ if (pill) pill.innerHTML = items.join('') || '<i style="font-style:italic;font-family:var(--serif)">no recent activity</i>';
+ } catch {}
+}
+loadMagActivity();
+setInterval(loadMagActivity, 90_000);
+
async function updateFeedbackPill() {
try {
const d = await fetch('/api/feedback').then(r => r.json());
← fa49655 iter 152: /api/magazine/activity unified event feed across g
·
back to Ventura Corridor
·
iter 154: /magazine/:id/ad-pack.html — short/medium/long cop a80fd42 →