Theme switch: auto | light | dark, stored in localStorage ls.theme and on the account, applied before first paint on every page
themehead.js is the one source of the tiny inline head script (and of AUTO_DEFAULT, the one constant Marty decides later: 0 = nothing stored keeps the page's current look, light for Control Room and public pages, dark for the sapphire pages; 1 = follow the device). The script sets data-theme on <html> from ls.theme (auto follows prefers-color-scheme and tracks changes live) and exposes window.LSTheme. tools/stamp-theme-head.cjs writes it into every static page before the first stylesheet with data-theme-base on <html>; blog, leaderboard, what's-new, the badge page, the unsubscribe page and the wall 404 read the module directly. The site CSP allows inline scripts by hash only, so themehead.CSP_HASH joins script-src (the script was silently blocked until then).
Account side: accounts.theme (JSON store and MySQL, alterSafe column), in the public account JSON and /api/me; POST /api/my/profile {theme} rides the existing profile save path and never touches the username. cr-shell.js renders a Light / Dark / Auto segmented control in the topbar of every Control Room screen and paints every .theme-seg on the page (the Profile pane gains an Appearance card with the same control); a click applies at once, saves locally and to the account when signed in; at sign-in the account value wins over the local one, and a local choice is pushed up when the account has none yet. view.html stops reading an undefined --bg so its light variant has a light stage. ?v= tags bumped on every changed stylesheet and script (20261101t / ls20261101t).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+9
-8
@@ -1,16 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="en" data-theme-base="dark">
|
||||
<head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Team-building plays | LinkSpin</title>
|
||||
<meta name="description" content="Three ways to build your LinkSpin line, plus the Qualified Start opening move. Member training.">
|
||||
<meta name="robots" content="noindex">
|
||||
<meta name="theme-color" content="#043b2f">
|
||||
<!--theme-head--><script>(function(){var A=0,h=document.documentElement,b=h.getAttribute("data-theme-base")||"light",m=window.matchMedia?matchMedia("(prefers-color-scheme: dark)"):{matches:false},v;function g(){try{v=localStorage.getItem("ls.theme")}catch(e){v=null}return v==="light"||v==="dark"||v==="auto"?v:(A?"auto":b)}function ap(){var c=g();h.setAttribute("data-theme",c==="auto"?(m.matches?"dark":"light"):c);h.setAttribute("data-theme-choice",c)}ap();if(m.addEventListener)m.addEventListener("change",ap);else if(m.addListener)m.addListener(ap);window.LSTheme={base:b,get:g,apply:ap,set:function(c,quiet){try{if(c==="light"||c==="dark"||c==="auto")localStorage.setItem("ls.theme",c);else localStorage.removeItem("ls.theme")}catch(e){}ap();if(!quiet)try{dispatchEvent(new CustomEvent("ls-theme",{detail:g()}))}catch(e){}}}})()</script><!--/theme-head-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=Manrope:wght@500;700;800&display=swap">
|
||||
<link rel="icon" type="image/png" href="/logo-icon.png">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=ls20260916a">
|
||||
<link rel="stylesheet" href="/assets/site.css?v=ls20261101t">
|
||||
<style>
|
||||
.pl-rule{border-left:4px solid #f2c94c;background:rgba(242,201,76,.08);padding:16px 20px;border-radius:0 12px 12px 0;margin:0 0 28px}
|
||||
.pl-rule{border-left:4px solid var(--gold-2);background:var(--gold-soft);padding:16px 20px;border-radius:0 12px 12px 0;margin:0 0 28px}
|
||||
.pl-rule b{font-family:var(--disp);font-size:17px;display:block;margin-bottom:6px}
|
||||
.pl-split{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 10px}
|
||||
.pl-split>div{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 10px;text-align:center}
|
||||
@@ -24,17 +25,17 @@
|
||||
.pl-ladder .b{color:var(--mint);font-size:12.5px}
|
||||
.play header{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:6px}
|
||||
.play h2{font-size:24px;margin:0}
|
||||
.play .tag{font-family:var(--mono);font-size:11.5px;color:var(--mint);border:1px solid rgba(59,157,255,.4);border-radius:999px;padding:3px 10px}
|
||||
.play .tag{font-family:var(--mono);font-size:11.5px;color:var(--mint);border:1px solid var(--mint-line);border-radius:999px;padding:3px 10px}
|
||||
.play ol{margin:0 0 14px 20px;padding:0;line-height:1.6}
|
||||
.play ol li{margin:0 0 8px}
|
||||
.meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
|
||||
.meta>div{background:rgba(4,8,7,.45);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px}
|
||||
.meta>div{background:var(--ground-soft);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px}
|
||||
.meta .k{font-family:var(--mono);font-size:11px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}
|
||||
.rec{border-color:var(--mint)}
|
||||
.cal{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
|
||||
.cal>div{background:rgba(4,8,7,.45);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px}
|
||||
.cal>div{background:var(--ground-soft);border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px}
|
||||
.cal .k{font-family:var(--disp);font-weight:800;color:var(--mint);margin-bottom:6px}
|
||||
blockquote{margin:0 0 10px;background:rgba(4,8,7,.45);border:1px solid var(--line);border-radius:10px;padding:12px 16px;color:var(--muted);font-style:italic}
|
||||
blockquote{margin:0 0 10px;background:var(--ground-soft);border:1px solid var(--line);border-radius:10px;padding:12px 16px;color:var(--muted);font-style:italic}
|
||||
blockquote span{display:block;font-style:normal;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--mint);margin-bottom:4px}
|
||||
.fit-table th{text-align:left;color:var(--muted);font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:500}
|
||||
.fit-table td,.fit-table th{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:top}
|
||||
@@ -192,7 +193,7 @@
|
||||
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/common.js?v=20261023ov"></script>
|
||||
<script src="/assets/common.js?v=20261101t"></script>
|
||||
<script src="/assets/plays.js?v=20260910b"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user