Board: line the mission buttons up, and give the referral card its own row
Every mission brief is a different length, so the Start mission buttons sat at a different height in each card. The action now sits at the foot of the card, so a row of them lines up whatever the brief above it says. The referral card was in the same grid and is taller than any mission, so it stretched the two cards beside it and left them with a hole under the button. It moves above the grid into its own slot, where it splits into two columns on a wide screen so the text does not run the full width. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Your board · PolHunter</title>
|
||||
<meta name="robots" content="noindex">
|
||||
<link rel="stylesheet" href="/style.css?v=13">
|
||||
<link rel="stylesheet" href="/style.css?v=14">
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
@@ -18,6 +18,7 @@
|
||||
<section class="section" style="padding-top:10px">
|
||||
<h2>Your missions</h2>
|
||||
<div class="sub" id="rangeLine">Each find pays a random drip. Your codes are yours alone.</div>
|
||||
<div id="refSlot"></div>
|
||||
<div class="grid" id="missions"><div class="card"><p>Loading your board…</p></div></div>
|
||||
</section>
|
||||
|
||||
@@ -46,6 +47,6 @@
|
||||
<footer class="foot">Rewards are for completed missions, not income. The daily pool is limited; when it is spent, claims close until midnight Central. Cryptocurrency involves risk of loss.</footer>
|
||||
</div>
|
||||
<div class="modal" id="shareModal" hidden><div class="modal-card"><button class="modal-x" id="shareClose" type="button" aria-label="Close">×</button><div id="shareBody"></div></div></div>
|
||||
<script src="/app.js?v=13"></script>
|
||||
<script src="/app.js?v=14"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+3
-3
@@ -38,12 +38,12 @@
|
||||
+ '<span class="tag' + (m.done ? ' done' : '') + '">' + (m.done ? 'Done today' : esc(m.site)) + '</span>'
|
||||
+ '<h3>' + esc(m.name) + '</h3><p>' + esc(m.brief) + '</p>'
|
||||
+ '<p style="margin-top:10px"><span class="range">' + r.minPol + ' to ' + r.maxPol + ' POL</span> <span style="color:var(--dim);font-size:12px">· ' + m.dwell + 's on the site</span></p>'
|
||||
+ (m.done ? '' : (board.pool && board.pool.spent && !isOpen) ? '<div style="margin-top:14px"><span class="tag gold">Closed until midnight Central</span></div>' : (board.daily && !board.daily.left && !isOpen) ? '<div style="margin-top:14px"><span class="tag">Back tomorrow</span></div>' : isOpen
|
||||
+ (m.done ? '' : (board.pool && board.pool.spent && !isOpen) ? '<div class="cardact"><span class="tag gold">Closed until midnight Central</span></div>' : (board.daily && !board.daily.left && !isOpen) ? '<div class="cardact"><span class="tag">Back tomorrow</span></div>' : isOpen
|
||||
? '<div class="timer" id="timer">Your code appears on the site after <b>' + m.dwell + 's</b>. Keep that tab open.</div>'
|
||||
+ '<div class="codebox"><input id="code" maxlength="6" placeholder="6 CHARACTERS" autocomplete="off" spellcheck="false" inputmode="text" autocapitalize="characters"><button class="btn pol" id="submit">Claim</button></div><div class="site" style="font-size:12px;margin-top:6px">Six characters. On the site, tap the code to copy it, then paste it here.</div>'
|
||||
+ '<div class="msg" id="msg"></div>'
|
||||
+ '<p style="margin-top:8px"><a href="' + esc(open.url) + '" target="_blank" rel="noopener">Open the site again ↗</a></p>'
|
||||
: '<div style="margin-top:14px"><button class="btn" data-start="' + esc(m.id) + '">Start mission</button></div>')
|
||||
: '<div class="cardact"><button class="btn" data-start="' + esc(m.id) + '">Start mission</button></div>')
|
||||
+ '</div>';
|
||||
}
|
||||
// The best-paid thing on the board, and the reason it sits first: sharing used to live on a page
|
||||
@@ -103,8 +103,8 @@
|
||||
const pool = board.pool || {};
|
||||
if (!board.me.wallet) $('missions').innerHTML = onboarding();
|
||||
else $('missions').innerHTML = (pool.spent ? '<div class="notice" style="grid-column:1/-1"><b>Today\u2019s POL pool is spent.</b> No more claims today. Claims reopen at midnight Central' + (pool.resetsAt ? ', in ' + until(pool.resetsAt) : '') + '.</div>' : '')
|
||||
+ referralCard()
|
||||
+ (board.missions.length ? board.missions.map(card).join('') : '<div class="card"><p>No missions are open right now. Check back soon.</p></div>');
|
||||
if ($('refSlot')) $('refSlot').innerHTML = board.me.wallet ? referralCard() : '';
|
||||
const rc = $('refCopy');
|
||||
if (rc) rc.addEventListener('click', async () => {
|
||||
const v = $('refLink').value;
|
||||
|
||||
@@ -118,3 +118,19 @@ textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--
|
||||
.ref-list{margin-top:12px;border-top:1px solid var(--edge);padding-top:8px}
|
||||
.ref-row{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:4px 0}
|
||||
.ref-row .ref-state{color:var(--dim);font-size:12px;text-align:right}
|
||||
|
||||
/* mission cards: the action sits at the foot of every card, so a row of them lines up whatever
|
||||
the brief is long or short (Marty, 2026-09-23) */
|
||||
#missions .card{display:flex;flex-direction:column}
|
||||
#missions .cardact{margin-top:auto;padding-top:14px}
|
||||
#missions .card .timer{margin-top:auto}
|
||||
/* the referral card is taller than any mission, so it sits above the grid rather than stretching
|
||||
a whole row of them; on a wide screen it splits so the text does not run the full width */
|
||||
#refSlot{margin-bottom:16px}
|
||||
#refSlot .ref-card{margin:0}
|
||||
@media (min-width:900px){
|
||||
#refSlot .ref-card{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);column-gap:30px;align-items:start}
|
||||
#refSlot .ref-card .tag,#refSlot .ref-card h3{grid-column:1}
|
||||
#refSlot .ref-card p,#refSlot .ref-card .codebox{grid-column:1}
|
||||
#refSlot .ref-card .ref-list,#refSlot .ref-card>p:last-child{grid-column:2;grid-row:2/span 5;align-self:stretch;margin-top:0;border-top:0;border-left:1px solid var(--edge);padding-left:22px}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user