b84eed3be5
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>
49 lines
5.9 KiB
HTML
49 lines
5.9 KiB
HTML
<!doctype html>
|
|
<html lang="en" data-theme-base="light">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>Zones · LinkSpin</title>
|
|
<!--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@400;500;700&family=JetBrains+Mono:wght@500;700&display=swap">
|
|
<link rel="stylesheet" href="/assets/cr.css?v=20261101t">
|
|
<style>
|
|
.body{padding:16px 24px;display:grid;gap:16px}
|
|
.two{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px}
|
|
.zl .hd,.zl .rw{grid-template-columns:minmax(220px,2fr) 72px 64px 76px 72px minmax(150px,1fr) 124px}
|
|
@media (max-width:1400px){.two{grid-template-columns:1fr}}
|
|
.zl .rw>*{min-width:0}.zl .rw .pill,.zl .rw .tag{white-space:normal;line-height:1.3}.zl .rw .acts{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
|
|
.q{display:inline-flex;gap:2px;vertical-align:middle;margin-right:6px} .q i{display:block;width:4px;height:10px;background:var(--line)} .q i.on{background:currentColor}
|
|
@media (max-width:900px){.two{grid-template-columns:1fr}.zl .hd{display:none}.zl .rw{grid-template-columns:1fr 1fr}.body{padding:12px 16px}}
|
|
.fr{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2fr);gap:18px;align-items:start}
|
|
.fr-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
|
|
.fr-steps li{border:1px solid var(--line);border-radius:8px;padding:12px;display:grid;gap:4px;font-size:13px}
|
|
.fr-steps li b{display:flex;align-items:center;gap:8px}
|
|
.fr-steps li b i{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--line-strong);font:700 11px var(--mono);font-style:normal;flex:none}
|
|
.fr-steps li.now{border-color:var(--sig);background:var(--sig-soft)} .fr-steps li.now b i{background:var(--sig);border-color:var(--sig);color:var(--sig-ink)}
|
|
.fr-steps li.done{opacity:.75} .fr-steps li.done b i{background:var(--ok);border-color:var(--ok);color:var(--ok-ink)}
|
|
@media (max-width:1100px){.fr{grid-template-columns:1fr}.fr-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
|
|
@media (max-width:640px){.fr-steps{grid-template-columns:1fr}}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="page">
|
|
<div class="body">
|
|
<div class="panel" id="firstRun" hidden><div class="fr"><div><h2 id="frTitle">Add your site</h2><div class="ink2" id="frIntro">Four steps and your site is carrying the network. Paid ads serve only on the site you name, and every viewable impression pays you ad credits.</div><div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:12px"><button class="btn pri sm" type="button" id="frGo">Add your site</button><button class="btn sm ghost" type="button" id="frHide">Hide this</button><a class="btn sm ghost" href="/publishers" target="_blank" rel="noopener">How the program works</a></div></div><ol class="fr-steps" id="frSteps"></ol></div></div>
|
|
<div class="tiles" id="tiles"></div>
|
|
<div class="two">
|
|
<div class="tbl zl"><div class="hd"><span>Zone</span><span>Size</span><span class="r">Views</span><span class="r">Viewable</span><span class="r">Credits</span><span>Quality</span><span></span></div><div id="rows"></div><div class="ft" id="foot"></div></div>
|
|
<div style="display:grid;gap:16px;align-content:start">
|
|
<div class="panel" id="tagPanel" hidden><h2 id="tagTitle">Embed tag</h2><div class="code" id="tagCode" style="display:block;font-size:11px;line-height:1.6;word-break:break-all"></div><div style="display:flex;gap:8px;flex-wrap:wrap"><button class="btn sm" type="button" id="tagCopy">Copy tag</button><button class="btn sm" type="button" id="tagCheck">Check it is live</button></div><div class="muted" id="tagNote">Paste it where the banner should appear. It sizes itself.</div></div>
|
|
<div class="panel" id="audPanel"><h2>Audiences</h2><div class="ink2">Your own retargeting. Every visitor to your LinkSpin pages and your zones lands in <b>My visitors</b> for 30 days, no setup. For any other site you control, paste an audience pixel. Then, on any banner or text campaign, choose "show only to" or "never show to" an audience.</div><div id="audList" class="ink2">loading</div><div style="display:flex;gap:8px;flex-wrap:wrap"><button class="btn sm" type="button" id="audNew">+ New audience</button></div><div class="muted" style="font-size:11.5px">Counts are visitors seen in the last 30 days. The match uses a LinkSpin cookie, with a 24-hour fallback where a browser blocks cross-site cookies, so Safari and Firefox visitors on other sites match less often. Nothing personal is stored.</div></div>
|
|
<div class="panel"><h2>What runs here</h2><div class="ink2">Three tiers, in order: a LinkSpin member campaign (the same pool the ad viewer serves), then a Network Ad Space ad for 728x90 and 468x60 zones, then a LinkSpin house banner. Your site carries the whole network, not just LinkSpin.</div><div class="muted" id="rateNote"></div></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="/assets/cr-shell.js?v=20261101t"></script>
|
|
<script src="/assets/zones-screen.js?v=20261010a"></script>
|
|
</body>
|
|
</html>
|