Greenhouse Diary Sticky Sidebar Layout
Complete a sticky sidebar layout for the greenhouse diary scenario: includes real content, actionable controls, clear state feedback, and responsive layouts across sizes.
With JavaScript enabled, you can edit, run, and save this example. The fixed source is as follows:
<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Greenhouse Diary Sticky Sidebar Layout</title>
<style>
:root { --ink:#30231f; --paper:#f9efe5; --accent:#8b6fb0; --secondary:#d7a971; --line:color-mix(in srgb, var(--ink) 18%, transparent); --shadow:0 24px 60px color-mix(in srgb, var(--ink) 16%, transparent); color-scheme:light; }
* { box-sizing:border-box; }
html { min-width:320px; background:var(--paper); }
body { min-height:100vh; margin:0; overflow-x:hidden; color:var(--ink); font-family:"Songti SC","Noto Serif SC",Georgia,serif; background:linear-gradient(90deg,transparent 49.7%,color-mix(in srgb,var(--ink) 7%,transparent) 50%,transparent 50.3%),var(--paper); }
button,input,select,textarea { color:inherit; font:inherit; }
button,[role="button"],input,select,textarea { accent-color:var(--accent); }
button { cursor:pointer; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
[hidden] { display:none !important; }
@media (max-width:700px) { .mast h1 { line-height:1.08 !important; letter-spacing:-.035em !important; overflow-wrap:anywhere; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
.page{width:min(1180px,calc(100% - 40px));margin:auto;padding:7vw 0}.mast{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(180px,.4fr);gap:5vw;align-items:end;margin-bottom:38px}.mast h1{font-family:"Songti SC",Georgia,serif;font-weight:800;font-size:clamp(42px,9vw,92px);max-width:920px;margin:0;line-height:.94}.eyebrow{display:block;margin-bottom:14px;color:var(--accent);font:800 11px/1 ui-monospace,monospace;letter-spacing:.24em}.intro{max-width:58ch;line-height:1.9}.scenario{align-self:start;padding-top:10px;border-top:1px solid var(--ink);font-style:italic}.demo{border-radius:0;border-width:2px;box-shadow:14px 14px 0 color-mix(in srgb,var(--ink) 18%,transparent);position:relative;overflow:hidden;min-height:420px;padding:clamp(22px,4vw,48px);background:var(--paper)}@media(max-width:700px){.page{width:calc(100% - 22px);padding:26px 0}.mast{grid-template-columns:1fr}.demo{min-height:340px;padding:18px}}
.panel{padding:16px;border:3px double var(--accent);background:var(--paper)}.stack{display:grid;gap:14px}.row{display:grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:10px;overflow:auto}.action{padding:10px 15px;border:1px solid var(--accent);background:transparent;font-family:Didot,serif;letter-spacing:.06em}.action.primary,.action.is-active{color:var(--paper);background:var(--ink)}.metric{font-family:Didot,serif;font-size:clamp(36px,8vw,74px);letter-spacing:.04em}.status{min-height:24px;padding:9px;border-inline:1px solid var(--accent);text-align:center}.muted{line-height:1.8}.chip{padding:5px 14px;border-inline:1px solid var(--accent);letter-spacing:.1em}.meter{height:5px;background:var(--line)}.meter>i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--secondary))}
.composition-gallery{margin:0;padding:clamp(8px,2vw,18px);border:1px solid var(--ink);background:color-mix(in srgb,var(--paper) 78%,transparent)}.gallery-caption{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:15px 4px 2px;font-size:12px}.gallery-caption::before,.gallery-caption::after{content:"";height:1px;background:var(--line)}.gallery-caption strong{font:800 11px/1.2 ui-monospace,monospace;letter-spacing:.16em;text-transform:uppercase}.composition-gallery .demo{box-shadow:none}.composition-gallery .demo::before{content:"";position:absolute;inset:10px;border:1px dashed color-mix(in srgb,var(--accent) 36%,transparent);pointer-events:none}
.sticky-aside-demo{display:grid;grid-template-columns:220px 1fr;gap:20px;height:430px;overflow:auto;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.sticky-aside-demo>aside{position:sticky;top:0;align-self:start;padding:22px;background:var(--ink);color:var(--paper)}.sticky-aside-demo>aside h2{margin:.4em 0}.sticky-aside-demo nav{display:grid;gap:8px}.sticky-aside-demo nav a{color:inherit}.sticky-aside-demo>article{padding:12px 28px}.sticky-aside-demo section{min-height:300px;padding:30px 0;border-bottom:1px solid var(--line);line-height:1.8}@media(max-width:620px){.sticky-aside-demo{grid-template-columns:1fr}.sticky-aside-demo>aside{z-index:2}.sticky-aside-demo nav{grid-auto-flow:column;overflow:auto}}.workflow-compare{display:grid;grid-template-columns:minmax(230px,.55fr) minmax(0,1.45fr);gap:18px}.compare-stage{display:grid;gap:12px;min-width:0}.compare-stage>header{display:flex;justify-content:space-between;gap:16px;align-items:end}.compare-stage h2{margin:.2em 0}.compare-core{--compare-split:50%;min-width:0;padding:14px;clip-path:inset(0 calc(100% - var(--compare-split)) 0 0);outline:1px dashed var(--accent);outline-offset:-8px;transition:clip-path .25s,filter .25s}.compare-core[data-compare-channel="B"]{filter:hue-rotate(32deg) saturate(1.15)}.compare-controls{display:grid;align-content:start;gap:16px;padding:20px;border:1px solid var(--line);border-radius:24px 4px 24px 4px;background:var(--paper)}.compare-controls fieldset,.compare-controls>label{display:grid;gap:8px}.compare-controls input[type="range"]{width:100%}#workflowCompareShelf{display:grid;gap:6px;padding:0;margin:0;list-style:none}#workflowCompareShelf li{display:grid;grid-template-columns:auto 1fr auto;gap:8px;padding:9px;border-top:1px solid var(--line);font-size:12px}@media(max-width:900px){.workflow-compare{grid-template-columns:1fr}.compare-stage{order:-1}.compare-core{clip-path:none;border-left:8px solid var(--accent)}}.atlas-shell{--atlas-zoom:100;display:grid;gap:18px;padding:clamp(18px,4vw,30px);border:1px solid var(--line);border-radius:34px;background:linear-gradient(165deg,color-mix(in srgb,var(--secondary) 10%,transparent),color-mix(in srgb,var(--paper) 96%,transparent));box-shadow:var(--shadow)}.atlas-head{display:flex;justify-content:space-between;gap:20px;align-items:end}.atlas-head h2{margin:.18em 0}.atlas-controls{display:grid;gap:10px;justify-items:end}.atlas-modes{display:flex;flex-wrap:wrap;gap:8px;justify-content:end}.atlas-controls output{padding:10px 14px;border:1px solid var(--line);border-radius:999px;background:var(--paper);font-weight:900}.atlas-body{display:grid;grid-template-columns:minmax(240px,.56fr) minmax(0,1.44fr);gap:16px}.atlas-index{display:grid;align-content:start;gap:14px;padding:18px;border-radius:26px;color:var(--paper);background:linear-gradient(180deg,color-mix(in srgb,var(--ink) 88%,#071310),color-mix(in srgb,var(--ink) 72%,#21110f))}.atlas-index label{display:grid;gap:8px}.atlas-index input,.atlas-index select{width:100%;padding:10px;border:1px solid #ffffff2e;border-radius:10px;color:inherit;background:#ffffff12}.atlas-chapters{display:grid;gap:10px;margin:0;padding:0;list-style:none}.atlas-chapters button{display:grid;gap:6px;width:100%;padding:14px;border:1px solid #ffffff24;border-radius:18px;color:inherit;background:#ffffff0e;text-align:left}.atlas-chapters button[aria-pressed="true"]{border-color:var(--secondary);background:#ffffff18;box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--secondary) 28%,transparent)}.atlas-chapters span{font:800 11px/1 ui-monospace,monospace;letter-spacing:.16em}.atlas-chapters small{line-height:1.5;opacity:.76}.atlas-meta{display:grid;gap:10px;margin:0}.atlas-meta div{display:grid;gap:4px;padding:12px;border:1px solid #ffffff1f;border-radius:14px;background:#ffffff10}.atlas-meta dt{font:700 11px/1 ui-monospace,monospace;letter-spacing:.14em;text-transform:uppercase;opacity:.72}.atlas-meta dd{margin:0;font-weight:900}.atlas-stage{display:grid;gap:14px;min-width:0}.atlas-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.atlas-summary article{display:grid;gap:6px;padding:14px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.atlas-summary article[data-active="true"]{background:color-mix(in srgb,var(--secondary) 14%,var(--paper));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 18%,transparent)}.atlas-summary span{font:800 11px/1 ui-monospace,monospace;letter-spacing:.16em}.atlas-core-shell{min-width:0;padding:clamp(14px,3vw,22px);overflow:auto;border:1px solid var(--line);border-radius:26px;background:radial-gradient(circle at top right,color-mix(in srgb,var(--accent) 8%,transparent),transparent 35%),color-mix(in srgb,var(--paper) 94%,transparent)}.atlas-core-shell>*{display:block;width:calc(10000%/var(--atlas-zoom));max-width:none;transform:scale(calc(var(--atlas-zoom)/100));transform-origin:top left}.atlas-log{display:grid;gap:8px;margin:0;padding-left:18px}.atlas-log li{line-height:1.55}.atlas-shell[data-atlas-mode="trace"] .atlas-core-shell{outline:4px solid color-mix(in srgb,var(--accent) 24%,transparent);outline-offset:3px}.atlas-shell[data-atlas-mode="handoff"] .atlas-index{background:linear-gradient(180deg,color-mix(in srgb,var(--ink) 82%,#28120f),color-mix(in srgb,var(--ink) 68%,#11201d))}@media(max-width:960px){.atlas-body{grid-template-columns:1fr}.atlas-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.atlas-head{align-items:stretch;flex-direction:column}.atlas-controls{justify-items:start}.atlas-modes{justify-content:start}.atlas-summary{grid-template-columns:1fr}.atlas-core-shell>*{width:100%;transform:none}}
</style>
</head>
<body data-aesthetic="editorial" data-composition="gallery-frame">
<main class="page">
<header class="mast"><div><span class="eyebrow">editorial / sticky sidebar layout / INTERMEDIATE</span><h1>Greenhouse Diary Sticky Sidebar Layout</h1><p class="intro">Complete a sticky sidebar layout for the greenhouse diary scenario: includes real content, actionable controls, clear state feedback, and responsive layouts across sizes.</p></div><span class="scenario">Greenhouse Diary</span></header>
<figure class="composition-gallery"><section class="demo" aria-label="Greenhouse Diary Sticky Sidebar Layout Interactive Area"><section id="atlasShell" class="atlas-shell" data-atlas-mode="brief"><header class="atlas-head"><div><span class="eyebrow">Greenhouse Diary / ATLAS DOSSIER</span><h2>Sticky Sidebar Layout Sample Atlas</h2><p>Rewrap the main case with a graph-style sample page, separating sample index, tracking view, handoff notes, and field records.</p></div><div class="atlas-controls"><div class="atlas-modes"><button class="action primary" type="button" data-atlas-mode="brief">Briefing</button><button class="action" type="button" data-atlas-mode="trace">Track</button><button class="action" type="button" data-atlas-mode="handoff">Handoff</button></div><output id="atlasState">Waiting to create sample</output></div></header><div class="atlas-body"><aside class="atlas-index"><ol class="atlas-chapters"><li><button type="button" data-atlas-card="0" aria-pressed="true"><span>01</span><strong>Greenhouse Diary Reminder</strong><small>Check whether the status change is visible</small></button></li><li><button type="button" data-atlas-card="1" aria-pressed="false"><span>02</span><strong>Greenhouse Diary Collection</strong><small>Confirm keyboard and click entry points are consistent</small></button></li><li><button type="button" data-atlas-card="2" aria-pressed="false"><span>03</span><strong>Greenhouse Diary Overview</strong><small>Check whether the layout falls back on narrow screens</small></button></li><li><button type="button" data-atlas-card="3" aria-pressed="false"><span>04</span><strong>Greenhouse Diary Plan</strong><small>Record current review conclusion</small></button></li></ol><label>Layout scale<input id="atlasZoom" type="range" min="82" max="132" value="100"><output id="atlasZoomValue">100%</output></label><label>Sampling focus<select id="atlasFocus"><option value="0">Greenhouse Diary Reminder</option><option value="1">Greenhouse Diary Collection</option><option value="2">Greenhouse Diary Overview</option><option value="3">Greenhouse Diary Plan</option></select></label><button id="atlasCapture" class="action primary" type="button">Featured sample</button><dl class="atlas-meta"><div><dt>Number of Entries</dt><dd id="atlasCount">0</dd></div><div><dt>Current focus</dt><dd id="atlasCurrent">Greenhouse Diary Reminder</dd></div><div><dt>Review Mode</dt><dd id="atlasModeLabel">Briefing</dd></div></dl></aside><section class="atlas-stage"><div class="atlas-summary"><article data-active="true"><span>Sample</span><strong>Greenhouse Diary Reminder</strong><p>Check whether the status change is visible</p></article><article><span>Trace</span><strong>Greenhouse Diary Collection</strong><p>Confirm keyboard and click entry points are consistent</p></article><article><span>Signal</span><strong>Greenhouse Diary Overview</strong><p>Check whether the layout falls back on narrow screens</p></article><article><span>Handoff</span><strong>Greenhouse Diary Plan</strong><p>Record current review conclusion</p></article></div><div id="atlasCoreShell" class="atlas-core-shell"><div class="workflow-compare"><form id="workflowCompareControls" class="compare-controls"><fieldset><legend>Reference Channel</legend><label><input type="radio" name="workflowChannel" value="A" checked>A · Compact greenhouse diary layout</label><label><input type="radio" name="workflowChannel" value="B">B · Greenhouse Journal Balanced Layout</label></fieldset><label>Canvas Width Weight<input id="workflowCompareWeight" type="range" min="10" max="90" value="50"><output id="workflowCompareWeightValue">50 px</output></label><label><input id="workflowCompareFreeze" type="checkbox">Freeze current version</label><button id="workflowCompareCapture" class="action primary" type="button">Sample and apply the layout</button><ol id="workflowCompareShelf" aria-label="Version Sampling Record"></ol></form><section class="compare-stage"><header><span class="eyebrow">Greenhouse Diary COMPARE</span><h2>Greenhouse Diary Dual-Version Comparison</h2><output id="workflowCompareLive">Version A waiting for sampling</output></header><section id="workflowCore" class="workflow-core compare-core" data-compare-channel="A" style="--compare-split:50%"><!-- 11DZ_CORE_START:layouts-responsive-sticky-aside --><div class="sticky-aside-demo" data-core-bridge="layouts-responsive-sticky-aside" tabindex="0"><aside><span class="eyebrow">STICKY ASIDE</span><h2>Greenhouse Diary Contents</h2><nav><a href="#stickySection0">Greenhouse Diary Reminder</a><a href="#stickySection1">Greenhouse Diary Collection</a><a href="#stickySection2">Greenhouse Diary Overview</a><a href="#stickySection3">Greenhouse Diary Plan</a></nav></aside><article id="stickyScroller" tabindex="0"><section id="stickySection0"><h3>Greenhouse Diary Reminder</h3><p>Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container.</p></section><section id="stickySection1"><h3>Greenhouse Diary Collection</h3><p>Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container.</p></section><section id="stickySection2"><h3>Greenhouse Diary Overview</h3><p>Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container.</p></section><section id="stickySection3"><h3>Greenhouse Diary Plan</h3><p>Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container. Scroll content is used to observe the sidebar staying visible within the container.</p></section></article></div><!-- 11DZ_CORE_END --></section></section></div></div><ol id="atlasLog" class="atlas-log"><li>Waiting for the first graph sample</li></ol></section></div></section><p id="status" class="status" role="status" aria-live="polite"></p></section><figcaption class="gallery-caption"><strong>Greenhouse Diary / GALLERY 03</strong></figcaption></figure>
</main>
<script>
'use strict';
const statusOutput = document.querySelector('#status');
const announce = message => { statusOutput.textContent = message; };
/* 11DZ_CORE_SCRIPT_START:layouts-responsive-sticky-aside */
document.querySelectorAll('.sticky-aside-demo a').forEach(link=>link.addEventListener('click',event=>{event.preventDefault();document.querySelector(link.getAttribute('href')).scrollIntoView({behavior:matchMedia('(prefers-reduced-motion:reduce)').matches?'auto':'smooth'});announce('Positioned '+link.textContent);}));
/* 11DZ_CORE_SCRIPT_END */
const workflowBridgeSpec={"name":"layouts-responsive-sticky-aside","selector":"[data-core-bridge=\"layouts-responsive-sticky-aside\"]","mode":"scroll","key":"ArrowDown"};const workflowBridgeCore=document.querySelector('#workflowCore');const workflowBridgeControl=workflowBridgeCore.querySelector(workflowBridgeSpec.selector);if(!workflowBridgeControl)throw new Error('Missing core bridge: '+workflowBridgeSpec.name);const workflowBridgeControlledId=workflowBridgeControl.getAttribute('aria-controls');const workflowBridgeControlled=workflowBridgeControlledId?document.getElementById(workflowBridgeControlledId):null;workflowBridgeCore.dataset.workflowBridge=workflowBridgeSpec.name;workflowBridgeCore.dataset.workflowVersion='0';function workflowBridgeSerialize(){const visualNode=workflowBridgeCore.firstElementChild||workflowBridgeCore;const visual=getComputedStyle(visualNode);const outputs=[...workflowBridgeCore.querySelectorAll('output,[role="status"],[aria-live],meter,progress')].map(node=>node.textContent.trim()+'|'+node.getAttribute('aria-valuenow')+'|'+node.getAttribute('value'));const canvas=[...workflowBridgeCore.querySelectorAll('canvas')].map(node=>{try{return node.toDataURL().slice(-160);}catch{return 'canvas-unavailable';}});return JSON.stringify({html:workflowBridgeCore.innerHTML,status:statusOutput.textContent,outputs,canvas,visual:[visual.display,visual.visibility,visual.opacity,visual.transform,visual.filter,visual.backgroundColor,visual.width,visual.height],scroll:workflowBridgeSpec.mode==='scroll'?workflowBridgeControl.scrollTop:null});}let workflowBridgeLastEffect=workflowBridgeSerialize();function workflowBridgeSummary(){const label=(workflowBridgeControl.getAttribute('aria-label')||workflowBridgeControl.textContent||workflowBridgeControl.value||workflowBridgeSpec.name).trim().replace(/\s+/g,' ').slice(0,72);return label+' · Core Version '+workflowBridgeCore.dataset.workflowVersion;}function workflowBridgeCommit(){const effect=workflowBridgeSerialize();if(effect===workflowBridgeLastEffect)return {changed:false,summary:workflowBridgeSummary()};workflowBridgeLastEffect=effect;workflowBridgeCore.dataset.workflowVersion=String(Number(workflowBridgeCore.dataset.workflowVersion||0)+1);return {changed:true,summary:workflowBridgeSummary()};}function workflowBridgeScheduleCommit(){queueMicrotask(workflowBridgeCommit);setTimeout(workflowBridgeCommit,0);}workflowBridgeControl.addEventListener("scroll",workflowBridgeScheduleCommit);const workflowBridgeStateTargets=new Set(workflowBridgeCore.querySelectorAll('dialog'));if(workflowBridgeControlled&&workflowBridgeCore.contains(workflowBridgeControlled))workflowBridgeStateTargets.add(workflowBridgeControlled);workflowBridgeStateTargets.forEach(target=>['close','cancel','toggle'].forEach(eventName=>target.addEventListener(eventName,workflowBridgeScheduleCommit)));function workflowBridgeActivate(){workflowBridgeControl.focus();const limit=Math.max(1,workflowBridgeControl.scrollHeight-workflowBridgeControl.clientHeight);workflowBridgeControl.scrollTop=workflowBridgeControl.scrollTop>0?0:Math.min(limit,72);workflowBridgeControl.dispatchEvent(new Event('scroll',{bubbles:true}));const result=workflowBridgeCommit();setTimeout(workflowBridgeCommit,0);return result;}function workflowBridgeReset(){workflowBridgeCore.dataset.workflowVersion='0';workflowBridgeLastEffect=workflowBridgeSerialize();}
const workflowCompareCore=document.querySelector('#workflowCore');const workflowCompareWeight=document.querySelector('#workflowCompareWeight');const workflowCompareState={channel:'A',weight:50,frozen:false,snapshots:[]};function workflowCompareFingerprint(){const controls=[...workflowCompareCore.querySelectorAll('input,select,textarea')];const outputs=[...workflowCompareCore.querySelectorAll('output,[role="status"],strong')].map(node=>node.textContent.trim()).filter(Boolean);return {controlValues:controls.map(control=>control.type==='checkbox'||control.type==='radio'?control.checked:control.value),summary:outputs.slice(0,4).join(' / '),nodes:workflowCompareCore.querySelectorAll('*').length};}function workflowCompareDrive(){workflowCompareCore.dataset.compareChannel=workflowCompareState.channel;workflowCompareCore.style.setProperty('--compare-split',workflowCompareState.weight+'%');document.querySelector('#workflowCompareWeightValue').textContent=workflowCompareState.weight+' px';document.querySelector('#workflowCompareLive').textContent=workflowCompareState.channel+' Version · '+workflowCompareState.weight+' px'+(workflowCompareState.frozen?' · Frozen':'');announce('Greenhouse Diary Being Viewed '+workflowCompareState.channel+' Version');}function workflowCompareCapture(source){const bridge=workflowBridgeActivate();const snapshot={...workflowCompareFingerprint(),channel:workflowCompareState.channel,weight:workflowCompareState.weight,source,bridge:bridge.summary};workflowCompareState.snapshots.push(snapshot);const item=document.createElement('li');item.innerHTML='<b>'+snapshot.channel+'</b><span>'+(snapshot.summary||snapshot.bridge)+'</span><small>'+snapshot.weight+' px · '+snapshot.bridge+'</small>';document.querySelector('#workflowCompareShelf').prepend(item);announce('sampled '+snapshot.channel+' Version and apply layout · '+bridge.summary);}document.querySelectorAll('[name="workflowChannel"]').forEach(input=>input.addEventListener('change',()=>{workflowCompareState.channel=input.value;workflowCompareDrive();}));workflowCompareWeight.addEventListener('input',()=>{workflowCompareState.weight=Number(workflowCompareWeight.value);workflowCompareDrive();});document.querySelector('#workflowCompareFreeze').addEventListener('change',event=>{workflowCompareState.frozen=event.currentTarget.checked;workflowCompareDrive();});document.querySelector('#workflowCompareCapture').addEventListener('click',()=>workflowCompareCapture('Button Sampling'));workflowCompareCore.addEventListener('dblclick',()=>workflowCompareCapture('Main view double-click'));workflowCompareDrive();
workflowBridgeReset();
const atlasShell=document.querySelector('#atlasShell');const atlasState=document.querySelector('#atlasState');const atlasZoom=document.querySelector('#atlasZoom');const atlasZoomValue=document.querySelector('#atlasZoomValue');const atlasFocus=document.querySelector('#atlasFocus');const atlasCurrent=document.querySelector('#atlasCurrent');const atlasCount=document.querySelector('#atlasCount');const atlasModeLabel=document.querySelector('#atlasModeLabel');const atlasCards=[...document.querySelectorAll('[data-atlas-card]')];const atlasSummary=[...document.querySelectorAll('.atlas-summary article')];const atlasLog=document.querySelector('#atlasLog');const atlasModeButtons=[...atlasShell.querySelectorAll('[data-atlas-mode]')];const atlasNotes=["Greenhouse Diary Reminder","Greenhouse Diary Collection","Greenhouse Diary Overview","Greenhouse Diary Plan"];const atlasCore=document.querySelector('#workflowCore');let atlasCaptures=0;function atlasSetActive(index){atlasCards.forEach((button,buttonIndex)=>button.setAttribute('aria-pressed',String(buttonIndex===index)));atlasSummary.forEach((card,cardIndex)=>{if(cardIndex===index)card.setAttribute('data-active','true');else card.removeAttribute('data-active');});atlasCurrent.textContent=atlasNotes[index]||atlasNotes[0]||'Unnamed Focus';}function atlasRender(reason){const version=atlasCore?.dataset.workflowVersion||'0';const zoom=Number(atlasZoom.value);const active=Math.min(atlasNotes.length-1,Number(atlasFocus.value)||0);atlasShell.style.setProperty('--atlas-zoom',String(zoom));atlasZoomValue.textContent=zoom+'%';atlasCount.textContent=String(atlasCaptures);atlasSetActive(active);atlasModeLabel.textContent={brief:'Briefing',trace:'Track',handoff:'Handoff'}[atlasShell.dataset.atlasMode]||'Briefing';atlasState.textContent=reason+' · Core Version '+version;}atlasModeButtons.forEach(button=>button.addEventListener('click',()=>{atlasModeButtons.forEach(item=>item.classList.toggle('primary',item===button));atlasShell.dataset.atlasMode=button.dataset.atlasMode;atlasRender('Switched to'+button.textContent);announce('Chart Mode:'+button.textContent);}));atlasCards.forEach((button,index)=>button.addEventListener('click',()=>{atlasFocus.value=String(index);atlasRender('Sample focus switched');announce('Chart focus:'+atlasNotes[index]);}));atlasZoom.addEventListener('input',()=>{atlasRender('Layout scale updated');announce('Graph Magnification '+atlasZoom.value+'%');});atlasFocus.addEventListener('change',()=>{atlasRender('Sampling Focus Switched');announce('Sampling Focus:'+atlasNotes[Number(atlasFocus.value)||0]);});document.querySelector('#atlasCapture').addEventListener('click',()=>{const index=Math.min(atlasNotes.length-1,Number(atlasFocus.value)||0);const note=atlasNotes[index]||atlasNotes[0]||'Unnamed Focus';const version=atlasCore?.dataset.workflowVersion||'0';atlasCaptures+=1;const item=document.createElement('li');item.textContent='Sample '+atlasCaptures+' · '+note+' · Core Version '+version;const empty=atlasLog.querySelector('li')?.textContent==='Waiting for the first graph sample';if(empty)atlasLog.replaceChildren(item);else atlasLog.prepend(item);while(atlasLog.children.length>6)atlasLog.lastElementChild.remove();atlasRender('Included in sample '+atlasCaptures);announce('Included in sample '+atlasCaptures+' · '+note);});atlasCore?.addEventListener('focusin',()=>atlasRender('Main Case Gets Focus'));atlasCore?.addEventListener('click',()=>atlasRender('Primary example interaction'));atlasRender('Waiting to create sample');
</script>
</body>
</html>