dsh-sansheng-liubu/preview/dsh-go.html

18 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>三省六部 · dsh-go 第一版样式</title><style>
:root{color-scheme:light;--page:#edf1f7;--surface:#fff;--bg:#f8faff;--ink:#172235;--muted:#69788f;--faint:#9aa6b8;--line:#e2e8f1;--blue:#367df5;--wash:#edf4ff;--wire:#cbd9ee;--shadow:0 18px 48px #27395816;font-family:"Segoe UI","Microsoft YaHei",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--ink)}button,input{font:inherit;color:inherit}button{cursor:pointer;background:none;border:0}button:focus-visible,input:focus-visible{outline:2px solid var(--blue);outline-offset:2px}button:hover{filter:brightness(.97)}svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;width:21px;height:21px;flex:none}.presentation{max-width:1200px;margin:auto;padding:30px 25px 23px}.intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}.kicker{font-size:11px;letter-spacing:2px;color:var(--muted);margin-bottom:8px}.intro h1{font-size:25px;font-weight:600;letter-spacing:.3px;margin:0 0 8px}.intro p{font-size:12px;color:var(--muted);margin:0}.theme{border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:10px 13px;font-size:12px;display:flex;align-items:center;gap:7px;white-space:nowrap}.theme svg{width:16px;height:16px}.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px}.stage{min-width:0}.stage-label{display:flex;align-items:center;gap:9px;padding:0 4px;margin-bottom:13px;font-size:12px;color:var(--muted)}.num{font-size:10px;color:var(--blue);background:#367df514;border-radius:5px;padding:4px 6px;font-weight:700}.phone{height:790px;border:1px solid #d3dce9;border-radius:27px;overflow:hidden;box-shadow:var(--shadow);background:var(--surface);position:relative;display:flex;flex-direction:column}.statusbar{height:30px;display:flex;align-items:center;justify-content:space-between;padding:7px 22px 0;font-size:10px;font-weight:600;flex:none}.status-icons{display:flex;gap:4px;align-items:center}.status-icons svg{width:13px;height:13px}.native-head{height:67px;display:flex;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--line);flex:none}.icon-btn{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;flex:none}.header-title{font-size:16px;font-weight:600;letter-spacing:.6px}.header-sub{font-size:10px;color:var(--muted);margin-top:4px;letter-spacing:.2px}.header-tail{margin-left:auto;display:flex;align-items:center;gap:4px}.workbench-btn{background:var(--wash);color:var(--blue);font-size:11px;border-radius:10px;padding:8px 9px;display:flex;align-items:center;gap:5px;min-height:38px}.workbench-btn svg{width:15px;height:15px}.content{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}.chat{padding:22px 17px;height:100%;display:flex;flex-direction:column;gap:22px}.date{text-align:center;color:var(--faint);font-size:10px}.bubble{background:var(--wash);border:1px solid #dce8fc;border-radius:16px 16px 4px 16px;padding:13px 15px;font-size:12px;line-height:1.9;margin-left:27px;align-self:flex-end;max-width:92%}.answer{display:flex;gap:10px;align-items:flex-start}.avatar{width:29px;height:29px;display:grid;place-items:center;border-radius:9px;border:1px solid #dce8fc;background:var(--wash);color:var(--blue);font-size:13px;flex:none}.answer-body{font-size:12px;line-height:1.95;padding-top:2px}.answer-name{font-weight:600;font-size:11px;margin-bottom:6px}.answer-body p{margin:0 0 11px}.answer-foot{display:flex;gap:12px;color:var(--faint);margin-top:12px}.answer-foot svg{width:14px;height:14px}.chat-filler{flex:1}.inline-hint{font-size:10px;line-height:1.7;color:var(--faint);text-align:center;padding:0 14px}.composer{padding:12px 13px 8px;background:var(--surface);flex:none}.composer-box{border:1px solid var(--line);border-radius:17px;padding:13px 12px 9px;background:var(--bg)}.composer-box input{border:0;background:none;width:100%;font-size:12px;outline:none;padding:0 0 18px;color:var(--ink)}.composer-box input::placeholder{color:var(--faint)}.composer-tools{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:9px}.composer-tools svg{width:16px;height:16px}.send{margin-left:auto;width:28px;height:28px;background:var(--blue);color:#fff;border-radius:9px;display:grid;place-items:center}.bottom-note{text-align:center;font-size:9px;color:var(--faint);padding-top:8px}.homebar{flex:none;height:21px;display:flex;justify-content:center;align-items:center;background:var(--surface)}.homebar:before{content:"";width:95px;height:4px;border-radius:3px;background:var(--ink);opacity:.72}.work-area{padding:17px 15px;background:var(--bg);min-height:100%}.project{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--muted);margin-bottom:18px}.project strong{font-size:12px;color:var(--ink);font-weight:500}.project span{font-size:9px;color:var(--faint)}.tree-lead{width:138px;margin:auto;position:relative}.tree-lead:after{content:"";position:absolute;left:50%;top:100%;height:20px;border-left:1px solid var(--wire)}.role{width:100%;min-height:75px;padding:11px 9px;text-align:left;position:relative;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 1px 2px #27395804}.role.selected{border-color:var(--blue);background:var(--wash);box-shadow:0 0 0 2px #367df50b}.role-name{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:600;letter-spacing:2px}.role-dot{width:5px;height:5px;border:1px solid #bac8da;border-radius:50%}.selected .role-dot{background:var(--blue);border-color:var(--blue)}.role small{display:block;font-size:9px;line-height:1.5;color:var(--muted);margin-top:7px;white-space:nowrap;letter-spacing:-.2px}.trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:35px;position:relative}.trio:before{content:"";position:absolute;left:16.67%;right:16.67%;top:-16px;border-top:1px solid var(--wire)}.trio .role:before{content:"";position:absolute;left:50%;bottom:100%;height:16px;border-left:1px solid var(--wire)}.group{border:1px dashed var(--wire);border-radius:14px;padding:13px 7px 8px;margin-top:26px;position:relative}.group:before{content:"";position:absolute;left:50%;bottom:100%;height:26px;border-left:1px solid var(--wire)}.group-label{position:absolute;left:10px;top:-7px;padding:0 5px;font-size:9px;color:var(--faint);background:var(--bg)}.six{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.six .role{padding:11px 7px;min-height:73px}.selection-card{border:1px solid var(--line);border-radius:13px;background:var(--surface);margin-top:19px;padding:13px}.selection-heading{font-size:12px;display:flex;justify-content:space-between;align-items:center;font-weight:600}.selection-heading span{font-size:9px;font-weight:400;color:var(--faint)}.selection-card p{font-size:11px;line-height:1.9;color:var(--muted);margin:10px 0 12px}.row-button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;text-align:left;font-size:12px;gap:8px}.row-button svg{width:16px;height:16px;color:var(--faint)}.row-button .row-left{display:flex;align-items:center;gap:7px}.rule{border-top:1px solid var(--line)}.panel-footer{padding:11px 15px 8px;border-top:1px solid var(--line);background:var(--surface);flex:none}.primary{border-radius:12px;background:var(--blue);color:white;min-height:44px;width:100%;font-size:12px;font-weight:500}.config-area{padding:20px 16px;background:var(--bg);min-height:100%}.identity{display:flex;align-items:center;gap:12px;margin-bottom:22px}.identity .avatar{width:44px;height:44px;border-radius:14px;font-size:20px}.identity-title{font-size:18px;font-weight:600;letter-spacing:2px}.identity-sub{font-size:10px;color:var(--muted);margin-top:4px}.section-label{font-size:10px;color:var(--muted);margin:20px 2px 9px}.native-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:3px 13px}.field-meta{font-size:10px;color:var(--muted);margin-top:5px}.model-row{min-height:66px}.model-value{font-size:11px;color:var(--blue)}.note{font-size:10px;line-height:1.8;color:var(--muted);margin:11px 2px}.details{font-size:11px;line-height:1.9;color:var(--muted);padding:2px 1px 12px}.details p{margin:8px 0}.tag{font-size:9px;color:var(--blue);background:var(--wash);border-radius:5px;padding:4px 6px;display:inline-block}.scope-card{border:1px dashed var(--wire);border-radius:12px;padding:12px;margin-top:25px;display:flex;gap:9px;align-items:flex-start;color:var(--muted);font-size:10px;line-height:1.8}.scope-card svg{width:17px;height:17px;color:var(--blue);margin-top:2px}.toast{position:absolute;left:16px;right:16px;bottom:92px;border:1px solid var(--line);background:var(--surface);box-shadow:0 6px 24px #0002;border-radius:12px;padding:12px;font-size:11px;line-height:1.7;z-index:7;text-align:center}.sheet-bg{position:absolute;inset:30px 0 21px;background:#07172745;z-index:5;display:flex;align-items:flex-end}.sheet{background:var(--surface);border-radius:23px 23px 0 0;width:100%;padding:10px 18px 22px}.handle{width:30px;height:4px;border-radius:4px;background:var(--line);margin:0 auto 18px}.sheet h2{font-size:16px;margin:0 0 6px}.sheet-desc{font-size:10px;color:var(--muted);margin-bottom:17px}.option{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:57px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}.radio{width:16px;height:16px;border-radius:50%;border:1.5px solid #a2aec1}.option.selected .radio{border:5px solid var(--blue)}.sheet .primary{margin-top:19px}.reset{font-size:10px;color:var(--muted);text-decoration:underline;padding:8px 0}.caption{font-size:11px;line-height:1.9;color:var(--muted);margin:13px 4px 0}.page-foot{font-size:10px;color:var(--faint);margin-top:23px;display:flex;justify-content:space-between;gap:12px}.page-foot a{color:var(--muted);text-decoration:none}:root[data-theme=dark]{color-scheme:dark;--page:#10151e;--surface:#1d2531;--bg:#17202c;--ink:#e9eff9;--muted:#a5b3c9;--faint:#71829a;--line:#303e51;--blue:#79aaff;--wash:#223a58;--wire:#3b5270;--shadow:0 18px 48px #0004}:root[data-theme=dark] .phone{border-color:#344256}:root[data-theme=dark] .bubble,:root[data-theme=dark] .avatar{border-color:#375474}:root[data-theme=dark] .primary,:root[data-theme=dark] .send{color:#101c31}@media(max-width:1000px){.gallery{grid-template-columns:repeat(3,330px);overflow-x:auto;scroll-snap-type:x proximity;padding:0 2px 18px}.stage{scroll-snap-align:center}.presentation{padding:22px 18px}.intro h1{font-size:21px}.intro{align-items:flex-start}.intro p{max-width:240px;line-height:1.8}.phone{box-shadow:none}.page-foot{display:block;line-height:1.8}}.tree-lead:after,.trio:before,.trio .role:before,.group:before{display:none}.trio{margin-top:16px}.group{margin-top:22px}[hidden]{display:none!important}
</style></head><body><svg style="display:none" aria-hidden="true"><defs><symbol id="menu" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h11"/></symbol><symbol id="back" viewBox="0 0 24 24"><path d="m14 5-7 7 7 7"/></symbol><symbol id="next" viewBox="0 0 24 24"><path d="m9 5 7 7-7 7"/></symbol><symbol id="close" viewBox="0 0 24 24"><path d="m6 6 12 12M6 18 18 6"/></symbol><symbol id="tree" viewBox="0 0 24 24"><rect x="9" y="2" width="6" height="5" rx="1"/><path d="M12 7v5M5 16v-4h14v4"/><rect x="2" y="16" width="6" height="5" rx="1"/><rect x="16" y="16" width="6" height="5" rx="1"/></symbol><symbol id="gear" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"/><circle cx="9" cy="6" r="2" fill="var(--surface)"/><circle cx="16" cy="12" r="2" fill="var(--surface)"/><circle cx="8" cy="18" r="2" fill="var(--surface)"/></symbol><symbol id="moon" viewBox="0 0 24 24"><path d="M20 15A9 9 0 0 1 9 4a9 9 0 1 0 11 11Z"/></symbol><symbol id="plus" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M7 12h10M12 7v10"/></symbol><symbol id="arrow" viewBox="0 0 24 24"><path d="M12 19V5m-6 6 6-6 6 6"/></symbol><symbol id="copy" viewBox="0 0 24 24"><rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V4H4v12h4"/></symbol><symbol id="shield" viewBox="0 0 24 24"><path d="m12 3 8 3v6c0 5-8 9-8 9s-8-4-8-9V6Z"/><path d="m8 12 3 3 5-6"/></symbol><symbol id="signal" viewBox="0 0 24 24"><path d="M3 18v3M8 14v7M13 9v12M18 4v17"/></symbol><symbol id="battery" viewBox="0 0 24 24"><rect x="2" y="6" width="17" height="12" rx="2"/><path d="M22 10v4M5 9v6m3-6v6m3-6v6m3-6v6"/></symbol></defs></svg><div class="presentation"><header class="intro"><div><div class="kicker">三省六部 / DSH-GO</div><h1>会话在前,工作台按需展开</h1><p>第一版样式提案 · 保留原生会话,十席工作台分屏呈现</p></div><button class="theme" id="theme"><svg><use href="#moon"/></svg>切换深浅色</button></header><div class="gallery" id="gallery"></div><footer class="page-foot"><span>原生风格概念稿,非 App 实机截图。按钮可演示;对话、模型为示例,不连接后端。</span><a href="index.html">查看 Web 三栏方案 ↗</a></footer></div>
<script>
const roles=[['lead','丞相','接需求 · 协调汇报','承接需求,判断分流方向,协调各部门,并向用户汇总交付。'],['zhongshu','中书','调查 · 澄清规划','调查材料、澄清问题,形成方案和验收标准草案。'],['shangshu','尚书','分工 · 组织交付','拆解方案、安排分工,组织六部交付。'],['menxia','门下','审议 · 整体审核','独立审议方案与成果,指出风险和不达标处。'],['libu','吏部','角色 · 技能配置','提出角色和技能配置建议,不改变固定十席编制。'],['hubu','户部','数据 · 表格计算','处理数据、表格与计算,结论应可复算。'],['lipu','礼部','文档 · 内容呈现','负责文档、内容与呈现形式,产出可编辑源文件。'],['bingbu','兵部','环境 · 调试部署','负责环境、调试与部署,外部操作遵守宿主审批。'],['xingbu','刑部','测试 · 风险检查','执行测试和风险检查,给出可追溯的检查结果。'],['gongbu','工部','代码 · 工程产出','负责代码实现与工程产出,交付可编辑源文件与真实检查结果。']];
const screens=[{mode:'chat',role:'lead',label:'原生会话',caption:'默认留在会话里。需要换角色时,打开工作台。'},{mode:'workbench',role:'lead',label:'十席工作台',caption:'同一项目的十个角色。选好角色,再进入它的会话。'},{mode:'config',role:'gongbu',label:'角色配置',caption:'原生列表选择模型。补充说明先只读,不塞入大表单。'}];const models=['模型 A(示例)','模型 B(示例)'];let saved={};try{saved=JSON.parse(localStorage.getItem('sansheng-go-design:v1')||'{}')||{}}catch{};const $=id=>document.getElementById(id);const icon=name=>'<svg aria-hidden="true"><use href="#'+name+'"/></svg>';const escape=s=>String(s).replaceAll('&','&amp;').replaceAll('<','&lt;').replaceAll('>','&gt;').replaceAll('"','&quot;');const data=id=>roles.find(r=>r[0]===id);function model(id){return models.includes(saved[id])?saved[id]:''}
function roleButton(r,active){return '<button class="role '+(r[0]===active?'selected':'')+'" data-role="'+r[0]+'" aria-pressed="'+(r[0]===active)+'"><div class="role-name">'+r[1]+'<i class="role-dot"></i></div><small>'+r[2]+'</small></button>'}
function render(i){const s=screens[i],r=data(s.role),p=$('phone-'+i);const head=s.mode==='chat'?'<button class="icon-btn" data-action="host" aria-label="原有工作区入口">'+icon('menu')+'</button><div><div class="header-title">'+r[1]+'</div><div class="header-sub">三省六部 · 当前项目</div></div><div class="header-tail"><button class="workbench-btn" data-action="workbench">'+icon('tree')+'工作台</button></div>':'<button class="icon-btn" data-action="'+(s.mode==='config'?'workbench':'chat')+'" aria-label="返回">'+icon('back')+'</button><div><div class="header-title">'+(s.mode==='config'?'角色配置':'工作台')+'</div><div class="header-sub">三省六部 · '+(s.mode==='config'?r[1]:'十席独立会话')+'</div></div><div class="header-tail"><button class="icon-btn" data-action="chat" aria-label="收起工作台">'+icon('close')+'</button></div>';
let body='',footer='';
if(s.mode==='chat'){body='<div class="chat"><div class="date">演示对话</div><div class="bubble">先帮我梳理项目的第一版范围。</div><div class="answer"><div class="avatar">'+r[1][0]+'</div><div class="answer-body"><div class="answer-name">'+r[1]+'</div><p>先围绕一个项目,把角色、会话和配置连起来。</p><p>每个角色保留自己的会话。需要谁参与,就从工作台切过去,原有聊天方式不变。</p><div class="answer-foot">'+icon('copy')+'</div></div></div><div class="chat-filler"></div><div class="inline-hint">这里复用 dsh-go 原生会话<br>历史、附件、运行与停止仍由宿主管理</div></div>';footer='<form class="composer"><div class="composer-box"><input aria-label="演示消息" placeholder="给'+r[1]+'发消息…"><div class="composer-tools">'+icon('plus')+'<span>'+escape(model(s.role)||"请选择模型")+'</span><button type="submit" class="send" aria-label="发送演示消息">'+icon('arrow')+'</button></div></div><div class="bottom-note">只演示交互,不调用模型</div></form>'}
if(s.mode==='workbench'){body='<div class="work-area"><div class="project"><strong>三省六部</strong><span>10 个角色 · 10 个会话</span></div><div class="tree-lead">'+roleButton(roles[0],s.role)+'</div><div class="trio">'+roles.slice(1,4).map(x=>roleButton(x,s.role)).join('')+'</div><div class="group"><span class="group-label">六部 · 尚书统筹</span><div class="six">'+roles.slice(4).map(x=>roleButton(x,s.role)).join('')+'</div></div><div class="selection-card"><div class="selection-heading">'+r[1]+'<span>已选角色</span></div><p>'+r[3]+'</p><div class="rule"></div><button class="row-button" data-action="config"><span class="row-left">'+icon('gear')+'配置'+r[1]+'</span>'+icon('next')+'</button></div></div>';footer='<div class="panel-footer"><button class="primary" data-action="chat">进入'+r[1]+'会话</button></div>'}
if(s.mode==='config'){body='<div class="config-area"><div class="identity"><div class="avatar">'+r[1][0]+'</div><div><div class="identity-title">'+r[1]+'</div><div class="identity-sub">三省六部 / 独立角色会话</div></div></div><div class="section-label">模型设置</div><div class="native-card"><button class="row-button model-row" data-action="models"><div><div>会话模型</div><div class="field-meta model-value">'+escape(s.draft||model(s.role)||"请选择模型")+'</div></div>'+icon('next')+'</button></div><p class="note">每个角色会话单独选择模型。更改只对当前项目的'+r[1]+'生效。</p><div class="section-label">角色说明</div><div class="native-card"><button class="row-button" data-action="details" aria-expanded="'+Boolean(s.details)+'"><span>职责与补充说明</span>'+icon('next')+'</button>'+(s.details?'<div class="details"><p>'+r[3]+'</p><p>角色补充说明:尚未设置。</p><span class="tag">请在 Web 端编辑补充说明</span></div>':'')+'</div><div class="scope-card">'+icon('shield')+'<div>保留宿主的权限与审批规则。<br>配置角色不会自动运行任务。</div></div></div>';footer='<div class="panel-footer"><button class="primary" data-action="save">保存配置</button><div class="bottom-note">仅保存到本地样式预览</div></div>'}
p.innerHTML='<div class="statusbar"><span>9:41</span><span class="status-icons">'+icon('signal')+icon('battery')+'</span></div><header class="native-head">'+head+'</header><div class="content">'+body+'</div>'+footer+'<div class="homebar"></div>';p.querySelectorAll('[data-role]').forEach(b=>b.onclick=()=>{s.role=b.dataset.role;s.draft=undefined;render(i)});p.querySelectorAll('[data-action]').forEach(b=>b.onclick=()=>action(i,b.dataset.action));const form=p.querySelector('form');if(form)form.onsubmit=e=>{e.preventDefault();toast(i,'这是样式演示,没有向真实会话发送消息。')};}
function action(i,a){const s=screens[i];if(['chat','workbench','config'].includes(a)){s.mode=a;render(i);return}if(a==='details'){s.details=!s.details;render(i)}if(a==='host')toast(i,'这里保留 dsh-go 原有工作区入口,不新增项目树。');if(a==='models')openModels(i);if(a==='save'){const selected=s.draft||model(s.role);if(!models.includes(selected)){toast(i,'请选择此角色会话的模型。');return}saved[s.role]=selected;try{localStorage.setItem('sansheng-go-design:v1',JSON.stringify(saved));screens.forEach((_,k)=>render(k));toast(i,'已保存演示配置,未修改真实会话。')}catch{toast(i,'浏览器禁止保存,配置仅保留到页面关闭。')}}}
function toast(i,text){const p=$('phone-'+i);p.querySelector('.toast')?.remove();const t=document.createElement('div');t.className='toast';t.setAttribute('role','status');t.textContent=text;p.append(t);setTimeout(()=>t.remove(),2800)}
function openModels(i){const s=screens[i],p=$('phone-'+i);let chosen=s.draft||model(s.role);const bg=document.createElement('div');bg.className='sheet-bg';bg.setAttribute('role','dialog');bg.setAttribute('aria-modal','true');bg.setAttribute('aria-label','选择模型');function paint(){bg.innerHTML='<div class="sheet"><div class="handle"></div><h2>选择会话模型</h2><div class="sheet-desc">预览中的模型名称仅为示例</div>'+models.map((m,k)=>'<button class="option '+(m===chosen?'selected':'')+'" data-model="'+k+'" aria-pressed="'+(m===chosen)+'"><span>'+m+'</span><span class="radio"></span></button>').join('')+'<button class="primary" data-confirm '+(models.includes(chosen)?'':'disabled')+'>确定</button></div>';bg.querySelectorAll('[data-model]').forEach(b=>b.onclick=()=>{chosen=models[Number(b.dataset.model)];paint()});bg.querySelector('[data-confirm]').onclick=()=>{s.draft=chosen;render(i)}}paint();bg.onclick=e=>{if(e.target===bg)bg.remove()};bg.onkeydown=e=>{if(e.key==='Escape'){bg.remove();p.querySelector('[data-action=models]')?.focus()}if(e.key==='Tab'){const buttons=[...bg.querySelectorAll('button')],first=buttons[0],last=buttons.at(-1);if(e.shiftKey&&document.activeElement===first){e.preventDefault();last.focus()}else if(!e.shiftKey&&document.activeElement===last){e.preventDefault();first.focus()}}};p.append(bg);bg.querySelector('button').focus()}
$('gallery').innerHTML=screens.map((s,i)=>'<section class="stage"><div class="stage-label"><span class="num">0'+(i+1)+'</span>'+s.label+'</div><div class="phone" id="phone-'+i+'"></div><p class="caption">'+s.caption+'</p></section>').join('');screens.forEach((_,i)=>render(i));$('theme').onclick=()=>{document.documentElement.dataset.theme=document.documentElement.dataset.theme==='dark'?'light':'dark'};
</script></body></html>