diff --git a/src/bggpipe/static/app.css b/src/bggpipe/static/app.css index 7ad6db1..62343d4 100644 --- a/src/bggpipe/static/app.css +++ b/src/bggpipe/static/app.css @@ -391,6 +391,11 @@ button.danger { color: var(--stop-ink); border-color: var(--stop); background: # .shot img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; } .shot .meta { padding: .4rem .6rem; font-size: .78rem; color: var(--ink-soft); } .shot .meta b { color: var(--ink); } +.fullshot { + width: 100%; max-height: 60vh; object-fit: contain; + background: var(--navy); border: var(--line); border-radius: var(--radius-lg); + display: block; margin-bottom: 1rem; +} /* -- queue + library --------------------------------------------------- */ .ledger { background: var(--board); border: var(--line); border-radius: var(--radius-lg); padding: .4rem 1rem; box-shadow: var(--shadow-card); } diff --git a/src/bggpipe/static/app.js b/src/bggpipe/static/app.js index 78e33b0..d8eae8f 100644 --- a/src/bggpipe/static/app.js +++ b/src/bggpipe/static/app.js @@ -80,3 +80,12 @@ async function refreshBadges() { } refreshBadges().catch(() => {}); setInterval(() => refreshBadges().catch(() => {}), 5000); + +/* Status chip for a catalog entry — shared by the catalog and photo pages. */ +function statusChip(c) { + if (c.status === "awaiting_resolve") return `awaiting BGG`; + if (c.status === "auto" || c.status === "approved") return `${esc(c.status)}`; + if (c.status === "rejected") return `rejected`; + if (c.status === "merged") return `merged → ${esc(c.merged_into)}`; + return `${esc(c.status)}`; +} diff --git a/src/bggpipe/templates/pages/catalog.html b/src/bggpipe/templates/pages/catalog.html index 686b945..7e1f1ca 100644 --- a/src/bggpipe/templates/pages/catalog.html +++ b/src/bggpipe/templates/pages/catalog.html @@ -8,14 +8,6 @@ "use strict"; let CATALOG = []; -function chip(c) { - if (c.status === "awaiting_resolve") return `awaiting BGG`; - if (c.status === "auto" || c.status === "approved") return `${esc(c.status)}`; - if (c.status === "rejected") return `rejected`; - if (c.status === "merged") return `merged → ${esc(c.merged_into)}`; - return `${esc(c.status)}`; -} - function render() { const q = document.getElementById("catsearch").value.trim().toLowerCase(); const rows = q @@ -27,11 +19,11 @@ function render() { ? `
| ${esc(c.title_raw)} | -${chip(c)} | +${statusChip(c)} | ${c.bgg_name ? esc(c.bgg_name) + (c.bgg_id ? " · " + esc(c.bgg_id) : "") : ""} ${c.version_name ? " · " + esc(c.version_name) : ""} | ${c.photos.map(p => - `${esc(p)}` + `${esc(p)}` ).join(", ")} |
${CATALOG.length diff --git a/src/bggpipe/templates/pages/photo.html b/src/bggpipe/templates/pages/photo.html new file mode 100644 index 0000000..31a6e00 --- /dev/null +++ b/src/bggpipe/templates/pages/photo.html @@ -0,0 +1,112 @@ +
Loading…