Status pill + git-SHA asset versioning

- _origin_probe(): 3-min check of anidb.app pages/API; OK/DOWN + reason
  in GET /api/cdn and server.log ([probe] ORIGIN ...)
- header pill: upstream-site dot (red = down) + CDN dot + label;
  per-dot hover tooltips, tap -> toast legend (mobile has no hover)
- ?v={{VERSION}} injected from 'git describe --always --dirty' at
  startup; JSV reads it from its own script URL - replaces hand-bumped
  numbers (JSV/?v drift) and gives play-probes the running commit
This commit is contained in:
jozamudi committed 2026-09-03 16:33:51 +00:00
1 parent 3f715434f0
commit ff8311c1a8
4 files changed
+178 -59

No files matched your search

+14 -6
View File
@@ -36,6 +36,10 @@ h2 { margin: 0.4rem 0; }
display: flex; flex-direction: column; }
.card:hover { border-color: var(--acc); }
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #000; display: block; }
/* broken-poster fallback: a dead upstream URL must not leave a broken-image
icon in an otherwise fine card */
.ph-img { aspect-ratio: 2/3; background: var(--bd); }
.stat-anime .ph-img { width: 44px; border-radius: 6px; grid-row: span 2; }
.card-name { padding: 0.5rem; font-size: 0.85rem; color: var(--muted); }
/* home: continue-watching hero + mini history cards */
@@ -107,6 +111,7 @@ h2 { margin: 0.4rem 0; }
.hero-body h2 { white-space: normal; font-size: 1.05rem; }
.card.hist img { max-height: 150px; }
header #me { display: none; }
header .pill span { display: none; }
}
.detail-head { margin-bottom: 1rem; }
@@ -158,13 +163,16 @@ button.tiny.on { border-color: var(--acc); color: var(--acc); }
background: rgba(255, 255, 255, .1); }
.pl-buffer i { display: block; height: 100%; width: 0;
background: linear-gradient(90deg, var(--acc), #fbbf24); transition: width .25s ease; }
.pl-cdn { position: absolute; top: 10px; right: 10px; z-index: 2;
display: flex; align-items: center; gap: .4rem;
/* header status pill: upstream site dot + CDN dot + short label */
header .pill { display: flex; align-items: center; gap: .4rem; flex: none;
font: 600 .72rem/1 system-ui, sans-serif; padding: .3rem .55rem; border-radius: 999px;
background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; }
.pl-cdn i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #6b7280; }
.pl-cdn.ok i { background: #22c55e; }
.pl-cdn.degraded i { background: #f59e0b; }
border: 1px solid var(--bd); background: var(--card); color: var(--fg);
cursor: help; }
header .pill i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #6b7280; }
header .pill .o.ok, header .pill .c.ok { background: #22c55e; }
header .pill .c.degraded { background: #f59e0b; }
header .pill .o.down { background: #ef4444; }
header .pill.odown { border-color: #7f1d1d; }
#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
display: flex; flex-direction: column; gap: .4rem; z-index: 9; }
@keyframes toast-in { from { opacity: 0; transform: translateY(.4rem); } }