Games tab: SpellWheel coming-soon card (date, no Play until Oct 10); ClutterHunt card now says it pays POL

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-04 08:27:11 -05:00
parent a453366964
commit 5a4b27f50e
4 changed files with 3215 additions and 3208 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

+1 -1
View File
@@ -1682,7 +1682,7 @@
const list = (g && g.games) || []; const list = (g && g.games) || [];
if (!list.length) { el.innerHTML = '<p class="muted small">No games are open yet. Check back soon.</p>'; return; } if (!list.length) { el.innerHTML = '<p class="muted small">No games are open yet. Check back soon.</p>'; return; }
// a seasonal card (x.season, 2026-10-02) wears the pink limited-time ribbon from the Spooky Doors UI kit // a seasonal card (x.season, 2026-10-02) wears the pink limited-time ribbon from the Spooky Doors UI kit
el.innerHTML = list.map(x => '<div class="game-card"><img src="' + esc(x.art) + '" alt="" loading="lazy"' + (x.artPos ? ' style="object-position:' + esc(x.artPos) + ' center"' : '') + '>' + (x.season && x.season.ends ? '<span class="gc-ribbon"><i></i>Limited time \u00b7 ends ' + esc(x.season.ends) + '</span>' : '') + '<div class="gc-body"><span class="gc-tag">' + esc(x.tag || '') + '</span><h4>' + esc(x.name) + (x.preview ? '<span class="gc-pre">' + esc(x.previewNote || 'preview, not live') + '</span>' : '') + '</h4><p class="muted small" style="margin:0">' + esc(x.blurb) + '</p>' + (x.progress && x.progress.line ? '<div class="gc-prog">' + esc(x.progress.line) + '</div>' : '') + '<p class="muted small" style="margin:0">Pays: ' + esc(x.pays || 'POL') + '</p><a class="btn" href="' + esc(x.play) + '">' + esc(x.cta || 'Play') + '</a></div></div>').join(''); el.innerHTML = list.map(x => '<div class="game-card"><img src="' + esc(x.art) + '" alt="" loading="lazy"' + (x.artPos ? ' style="object-position:' + esc(x.artPos) + ' center"' : '') + '>' + (x.soon ? '<span class="gc-ribbon gc-soon"><i></i>Coming soon</span>' : x.season && x.season.ends ? '<span class="gc-ribbon"><i></i>Limited time \u00b7 ends ' + esc(x.season.ends) + '</span>' : '') + '<div class="gc-body"><span class="gc-tag">' + esc(x.tag || '') + '</span><h4>' + esc(x.name) + (x.preview ? '<span class="gc-pre">' + esc(x.previewNote || 'preview, not live') + '</span>' : '') + '</h4><p class="muted small" style="margin:0">' + esc(x.blurb) + '</p>' + (x.progress && x.progress.line ? '<div class="gc-prog">' + esc(x.progress.line) + '</div>' : '') + '<p class="muted small" style="margin:0">Pays: ' + esc(x.pays || 'POL') + '</p>' + (x.soon ? '<span class="btn gc-soonbtn" aria-disabled="true">' + esc(x.soon) + '</span>' : '<a class="btn" href="' + esc(x.play) + '">' + esc(x.cta || 'Play') + '</a>') + '</div></div>').join('');
} }
async function loadReturnCard() { async function loadReturnCard() {
const card = $('phReturn'); if (!card) return; const card = $('phReturn'); if (!card) return;
+4 -2
View File
@@ -1051,7 +1051,9 @@
.game-card .gc-ribbon{position:absolute;top:10px;right:10px;display:inline-flex;align-items:center;gap:6px;background:#FF5FA2;color:#2b0418;font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;padding:5px 10px;border-radius:6px;box-shadow:0 3px 0 #9c2a5d} .game-card .gc-ribbon{position:absolute;top:10px;right:10px;display:inline-flex;align-items:center;gap:6px;background:#FF5FA2;color:#2b0418;font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;padding:5px 10px;border-radius:6px;box-shadow:0 3px 0 #9c2a5d}
.game-card .gc-ribbon i{width:7px;height:7px;border-radius:50%;background:#2b0418;display:inline-block;animation:gcPulse 1.4s ease-in-out infinite} .game-card .gc-ribbon i{width:7px;height:7px;border-radius:50%;background:#2b0418;display:inline-block;animation:gcPulse 1.4s ease-in-out infinite}
@keyframes gcPulse{50%{opacity:.25}} @keyframes gcPulse{50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.game-card .gc-ribbon i{animation:none}}</style> @media (prefers-reduced-motion:reduce){.game-card .gc-ribbon i{animation:none}}
.game-card .gc-ribbon.gc-soon{background:#e2b04a;color:#2a1a0f}.game-card .gc-ribbon.gc-soon i{background:#2a1a0f}
.game-card .gc-soonbtn{background:transparent;border:1px dashed var(--line-strong);color:var(--ink);cursor:default;opacity:.9}</style>
</div> </div>
<div class="pane" id="pane-wallet" hidden> <div class="pane" id="pane-wallet" hidden>
<div class="card" id="faucetCard" hidden> <div class="card" id="faucetCard" hidden>
@@ -1129,7 +1131,7 @@
<script src="/assets/common.js?v=20261003fr2"></script><script src="/assets/welcome.js?v=20260923b"></script> <script src="/assets/common.js?v=20261003fr2"></script><script src="/assets/welcome.js?v=20260923b"></script>
<script src="/assets/wallet.js?v=20260911a"></script> <script src="/assets/wallet.js?v=20260911a"></script>
<script src="/assets/promo.js?v=20261002ref"></script> <script src="/assets/promo.js?v=20261002ref"></script>
<script src="/assets/my.js?v=20261003rlc"></script> <script src="/assets/my.js?v=20261004soon"></script>
<script src="/assets/chat.js?v=20260907l"></script> <script src="/assets/chat.js?v=20260907l"></script>
</body> </body>
</html> </html>
+6 -1
View File
@@ -1403,7 +1403,11 @@ function GAMES() {
{ slug: 'polhunter', name: 'PolHunter', tag: 'Scavenger hunt', blurb: 'Hunt hidden codes on sites across the network. Every find drips POL straight to your wallet.', { slug: 'polhunter', name: 'PolHunter', tag: 'Scavenger hunt', blurb: 'Hunt hidden codes on sites across the network. Every find drips POL straight to your wallet.',
art: 'https://polhunter.com/img/hero-800.webp', play: '/api/my/polhunter', pays: 'POL per find' }, art: 'https://polhunter.com/img/hero-800.webp', play: '/api/my/polhunter', pays: 'POL per find' },
{ slug: 'clutterhunt', name: 'ClutterHunt', tag: 'Hidden objects', blurb: 'Search cozy, cluttered rooms for hidden objects. New rooms every season, starting with the Haunted Manor.', { slug: 'clutterhunt', name: 'ClutterHunt', tag: 'Hidden objects', blurb: 'Search cozy, cluttered rooms for hidden objects. New rooms every season, starting with the Haunted Manor.',
art: SEEK_URL() + '/og-clutterhunt.jpg', play: '/api/my/clutterhunt', pays: 'Stars now, rewards coming' }, art: SEEK_URL() + '/og-clutterhunt.jpg?v=c2', play: '/api/my/clutterhunt', pays: 'POL for first clears and 3-star clears' },
// coming soon (2026-10-04, Marty: "build some anticipation... show that it's coming soon and put the date"): every member sees
// the card with its date and no Play button until `soon.opens` (Central); from then it is an ordinary card, live via gamesLive
{ slug: 'spellwheel', name: 'SpellWheel', tag: 'Word game', blurb: 'Swipe the letter wheel to fill the crossword, travel through six cozy places, and solve a new daily puzzle with everyone. Clear levels and chapters to earn POL.',
art: '/assets/games/spellwheel-soon.jpg?v=1', play: '/api/my/spellwheel', pays: 'POL for levels, chapters and daily puzzles', soon: { opens: '2026-10-10', label: 'Opens Saturday, Oct 10' } },
]; ];
} }
// -- cross-promo strip (2026-10-03): one short line per game and where a signed-out player lands (the game's own page) // -- cross-promo strip (2026-10-03): one short line per game and where a signed-out player lands (the game's own page)
@@ -3144,6 +3148,7 @@ const server = http.createServer(async (req, res) => {
const dayLabel = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); }; const dayLabel = (d, back) => { const t = new Date(d + 'T12:00:00Z'); if (back) t.setUTCDate(t.getUTCDate() - 1); return t.toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' }); };
for (const g of GAMES()) { for (const g of GAMES()) {
// a seasonal game (2026-10-02) shows only while today (Central) is in [start, end); before start the admin sees a preview, after end nobody // a seasonal game (2026-10-02) shows only while today (Central) is in [start, end); before start the admin sees a preview, after end nobody
if (g.soon && day < g.soon.opens) { out.push(Object.assign({}, g, { live: false, preview: false, soon: g.soon.label, play: null })); continue; } // coming soon: shown to all, not playable
const ss = seasonState(g.season, day, admin); if (ss === 'hidden') continue; const ss = seasonState(g.season, day, admin); if (ss === 'hidden') continue;
const seasonPreview = ss === 'preview'; const seasonPreview = ss === 'preview';
const isLive = live.has(g.slug); if (!isLive && !admin) continue; const isLive = live.has(g.slug); if (!isLive && !admin) continue;