Стартовый контент kb-seed и макеты new_design

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
deonisii
2026-10-04 12:09:44 +03:00
co-authored by Claude Opus 5.5
commit 9ed4d4ce43
100 changed files with 4694 additions and 0 deletions
+170
View File
@@ -0,0 +1,170 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./support.js"></script>
</head>
<body>
<x-dc>
<div style="display:flex;flex-direction:column;gap:20px;font-family:'Onest',system-ui,sans-serif;color:var(--ink);font-size:18px;line-height:1.6;font-weight:var(--wb);text-wrap:pretty">
<sc-for list="{{ blocks }}" as="b" hint-placeholder-count="0">
<sc-if value="{{ b.isH2 }}"><h2 data-h="{{ b.hid }}" style="margin:14px 0 -4px;padding-top:22px;border-top:2px solid var(--ln);font-size:22px;line-height:1.25;font-weight:700">{{ b.t }}</h2></sc-if>
<sc-if value="{{ b.isH3 }}"><h3 style="margin:4px 0 -8px;font-size:19px;line-height:1.3;font-weight:700;color:var(--acc)">{{ b.t }}</h3></sc-if>
<sc-if value="{{ b.isP }}"><p style="margin:0"><sc-for list="{{ b.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><a href="#" onClick="{{ s.go }}" style="display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:2px 12px;margin:3px 0;border:var(--bw) solid var(--ink);border-radius:999px;background:var(--sf);color:var(--ink);font-size:15px;font-weight:600;text-decoration:none;vertical-align:middle;line-height:1.2"><span style="font-family:'Onest',system-ui,sans-serif">→</span><span>{{ s.t }}</span></a></sc-if></sc-for></p></sc-if>
<sc-if value="{{ b.isKey }}">
<section style="border:2px solid var(--ink);border-radius:16px;overflow:hidden;background:var(--sf)">
<div style="height:10px;background:repeating-linear-gradient(-45deg,#F5C400 0 10px,#141414 10px 20px)"></div>
<div style="display:flex;align-items:baseline;justify-content:space-between;padding:12px 16px 2px"><div style="font-size:15px;font-weight:700;letter-spacing:0.1em;text-transform:uppercase">Главное</div><div style="font-family:'Onest',system-ui,sans-serif;font-size:13px;color:var(--ink2)">{{ b.count }}</div></div>
<div style="display:grid;grid-template-columns:1fr 1fr;grid-auto-flow:dense;gap:8px;padding:10px 10px 10px">
<sc-for list="{{ b.items }}" as="k">
<sc-if value="{{ k.wide }}"><div style="grid-column:1 / -1;display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:10px;background:var(--sf2);border:var(--bw) solid var(--ln)"><div style="font-size:15px;font-weight:600;color:var(--ink2);line-height:1.3">{{ k.label }}</div><div style="font-size:17px;line-height:1.45"><sc-for list="{{ k.segs }}" as="s"><sc-if value="{{ s.bold }}"><span style="font-size:19px;font-weight:700;color:var(--acc)">{{ s.t }}</span></sc-if><sc-if value="{{ s.notBold }}"><span style="color:var(--ink)">{{ s.t }}</span></sc-if></sc-for></div></div></sc-if>
<sc-if value="{{ k.narrow }}"><div style="display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:10px;background:var(--sf2);border:var(--bw) solid var(--ln)"><div style="font-size:15px;font-weight:600;color:var(--ink2);line-height:1.3">{{ k.label }}</div><div style="line-height:1.35"><sc-for list="{{ k.segs }}" as="s"><sc-if value="{{ s.bold }}"><span style="font-size:21px;font-weight:700;color:var(--acc);line-height:1.25">{{ s.t }}</span></sc-if><sc-if value="{{ s.notBold }}"><span style="font-size:16px;color:var(--ink)">{{ s.t }}</span></sc-if></sc-for></div></div></sc-if>
</sc-for>
</div>
</section>
</sc-if>
<sc-if value="{{ b.isDanger }}">
<section role="alert" style="border:2px solid var(--redS);border-radius:14px;overflow:hidden;background:var(--redbg)">
<div style="display:flex;align-items:center;gap:10px;min-height:48px;padding:0 16px;background:var(--redS);color:#FFFFFF;font-size:15px;font-weight:700;letter-spacing:0.1em"><span style="flex:none;width:24px;height:24px;border-radius:50%;background:#FFFFFF;display:flex;align-items:center;justify-content:center"><span style="width:13px;height:4px;border-radius:1px;background:var(--redS)"></span></span>ЗАПРЕЩЕНО</div>
<div style="display:flex;flex-direction:column;gap:8px;padding:12px 16px 14px;color:var(--ink)"><sc-for list="{{ b.paras }}" as="p"><p style="margin:0"><sc-for list="{{ p.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--red)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></p></sc-for></div>
</section>
</sc-if>
<sc-if value="{{ b.isWarning }}">
<section style="border:2px solid var(--ambln);border-radius:14px;overflow:hidden;background:var(--ambbg)">
<div style="display:flex;align-items:center;gap:10px;min-height:48px;padding:0 16px;background:#F5C400;color:#141414;font-size:15px;font-weight:700;letter-spacing:0.1em"><span style="flex:none;position:relative;width:0;height:0;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:20px solid #141414"><span style="position:absolute;left:-2px;top:6px;width:4px;height:8px;background:#F5C400;border-radius:1px"></span></span>ВНИМАНИЕ</div>
<div style="display:flex;flex-direction:column;gap:8px;padding:12px 16px 14px;color:var(--ink)"><sc-for list="{{ b.paras }}" as="p"><p style="margin:0"><sc-for list="{{ p.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></p></sc-for></div>
</section>
</sc-if>
<sc-if value="{{ b.isTip }}">
<section style="border:2px solid var(--grnS);border-radius:14px;background:var(--grnbg);padding:12px 16px 14px;display:flex;flex-direction:column;gap:6px">
<div style="display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;letter-spacing:0.1em;color:var(--grn)"><span style="flex:none;width:22px;height:22px;border-radius:6px;background:var(--grnS);display:flex;align-items:center;justify-content:center"><span style="width:6px;height:11px;border:solid #FFFFFF;border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translate(-1px,-1px)"></span></span>СОВЕТ</div>
<sc-for list="{{ b.paras }}" as="p"><p style="margin:0"><sc-for list="{{ p.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></p></sc-for>
</section>
</sc-if>
<sc-if value="{{ b.isInfo }}">
<section style="border:2px solid var(--blu);border-radius:14px;background:var(--blubg);padding:12px 16px 14px;display:flex;flex-direction:column;gap:6px">
<div style="display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;letter-spacing:0.1em;color:var(--blu)"><span style="flex:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--blu);display:flex;align-items:center;justify-content:center;font-family:'Onest',system-ui,sans-serif;font-size:13px;font-weight:700;letter-spacing:0">i</span>СПРАВКА</div>
<sc-for list="{{ b.paras }}" as="p"><p style="margin:0"><sc-for list="{{ p.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></p></sc-for>
</section>
</sc-if>
<sc-if value="{{ b.isUl }}">
<ul style="margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px"><sc-for list="{{ b.items }}" as="it"><li style="display:flex;gap:12px"><span style="flex:none;width:8px;height:8px;margin-top:10px;background:var(--ink)"></span><span><sc-for list="{{ it.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><a href="#" onClick="{{ s.go }}" style="display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:2px 12px;margin:3px 0;border:var(--bw) solid var(--ink);border-radius:999px;background:var(--sf);color:var(--ink);font-size:15px;font-weight:600;text-decoration:none;vertical-align:middle;line-height:1.2"><span style="font-family:'Onest',system-ui,sans-serif">→</span><span>{{ s.t }}</span></a></sc-if></sc-for></span></li></sc-for></ul>
</sc-if>
<sc-if value="{{ b.isCheck }}">
<section style="border:var(--bw) solid var(--ln);border-radius:14px;background:var(--sf);overflow:hidden;box-shadow:var(--sh)">
<div style="display:flex;align-items:center;gap:10px;padding:6px 6px 6px 16px">
<div style="flex:1;font-size:14px;font-weight:700;letter-spacing:0.1em;text-transform:uppercase">Чек-лист</div>
<div style="font-family:'Onest',system-ui,sans-serif;font-size:18px;font-weight:600">{{ b.doneN }} из {{ b.total }}</div>
<button onClick="{{ b.reset }}" style="min-height:48px;padding:0 12px;border:0;background:transparent;color:var(--ink2);font-size:15px;font-weight:600;text-decoration:underline;cursor:pointer">Сбросить</button>
</div>
<div style="height:4px;background:var(--sf2)"><div style="{{ b.barStyle }}"></div></div>
<sc-for list="{{ b.items }}" as="it">
<button onClick="{{ it.toggle }}" style="display:flex;align-items:flex-start;gap:14px;width:100%;min-height:60px;padding:15px 16px;border:0;border-top:var(--bw) solid var(--ln);background:transparent;text-align:left;cursor:pointer;font-size:18px;line-height:1.5;color:var(--ink)">
<sc-if value="{{ it.off }}"><span style="flex:none;width:30px;height:30px;border:2px solid var(--ink);border-radius:8px;background:var(--sf)"></span></sc-if>
<sc-if value="{{ it.on }}"><span style="flex:none;width:30px;height:30px;border-radius:8px;background:var(--grnS);display:flex;align-items:center;justify-content:center"><span style="width:8px;height:15px;border:solid #FFFFFF;border-width:0 3px 3px 0;transform:rotate(45deg) translate(-1px,-2px)"></span></span></sc-if>
<span style="{{ it.rowStyle }}"><sc-for list="{{ it.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></span>
</button>
</sc-for>
</section>
</sc-if>
<sc-if value="{{ b.isOl }}">
<ol style="margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px"><sc-for list="{{ b.items }}" as="it"><li style="display:flex;gap:14px;padding:16px 16px 16px 14px;background:var(--sf);border:var(--bw) solid var(--ln);border-radius:14px;box-shadow:var(--sh)"><span style="flex:none;width:44px;height:44px;border-radius:4px;background:var(--hl);color:#141414;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700">{{ it.n }}</span><div style="display:flex;flex-direction:column;gap:4px;min-width:0"><div style="font-size:18px;font-weight:700;line-height:1.3">{{ it.title }}</div><div><sc-for list="{{ it.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-weight:var(--ws);color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></div></div></li></sc-for></ol>
</sc-if>
<sc-if value="{{ b.isKv }}">
<div style="border:var(--bw) solid var(--ln);border-radius:14px;background:var(--sf);overflow:hidden">
<div style="display:flex;justify-content:space-between;padding:10px 16px;background:var(--sf2);font-size:14px;font-weight:700;color:var(--ink2)"><span>{{ b.h0 }}</span><span>{{ b.h1 }}</span></div>
<sc-for list="{{ b.rows }}" as="r"><div style="display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:10px 16px;border-top:var(--bw) solid var(--ln)"><span style="flex:1;min-width:0;line-height:1.35"><sc-for list="{{ r.k }}" as="s"><span>{{ s.t }}</span></sc-for></span><span style="font-size:19px;font-weight:700;white-space:nowrap;color:var(--acc)"><sc-for list="{{ r.v }}" as="s"><span>{{ s.t }}</span></sc-for></span></div></sc-for>
</div>
</sc-if>
<sc-if value="{{ b.isCards }}">
<div style="display:flex;flex-direction:column;gap:8px"><sc-for list="{{ b.rows }}" as="r"><div style="padding:14px 16px;border:var(--bw) solid var(--ln);border-radius:14px;background:var(--sf);display:flex;flex-direction:column;gap:8px"><div style="font-weight:700;line-height:1.3">{{ r.title }}</div><sc-for list="{{ r.cells }}" as="c"><div style="display:flex;gap:12px;align-items:baseline"><span style="flex:none;width:84px;font-size:14px;color:var(--ink2)">{{ c.label }}</span><span><sc-for list="{{ c.segs }}" as="s"><sc-if value="{{ s.plain }}"><span>{{ s.t }}</span></sc-if><sc-if value="{{ s.bold }}"><strong style="font-size:18px;font-weight:700;color:var(--acc)">{{ s.t }}</strong></sc-if><sc-if value="{{ s.link }}"><span style="font-weight:600;text-decoration:underline">{{ s.t }}</span></sc-if></sc-for></span></div></sc-for></div></sc-for></div>
</sc-if>
<sc-if value="{{ b.isFigs }}">
<div style="display:flex;flex-direction:column;gap:14px">
<sc-for list="{{ b.first }}" as="f">
<figure style="margin:0;display:flex;flex-direction:column;gap:8px">
<button onClick="{{ f.open }}" style="position:relative;display:block;width:100%;padding:0;border:var(--bw) solid var(--ln);border-radius:12px;overflow:hidden;background:var(--sf2);cursor:zoom-in">
<sc-if value="{{ f.has }}"><img src="{{ f.src }}" alt="{{ f.cap }}" style="display:block;width:100%;height:auto"></sc-if>
<sc-if value="{{ f.miss }}"><div style="aspect-ratio:4 / 3;display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(135deg,var(--sf2) 0 12px,var(--sf) 12px 24px);font-family:'Onest',system-ui,sans-serif;font-size:13px;color:var(--ink2)">фото · {{ f.file }}</div></sc-if>
<span style="position:absolute;right:10px;bottom:10px;min-height:36px;padding:0 14px;display:flex;align-items:center;border-radius:999px;background:rgba(0,0,0,0.75);color:#FFFFFF;font-size:14px;font-weight:600">Увеличить</span>
</button>
<figcaption style="font-size:15px;line-height:1.4;color:var(--ink2)">{{ f.cap }}</figcaption>
</figure>
</sc-for>
<div style="display:grid;grid-template-columns:1fr 1fr;gap:12px">
<sc-for list="{{ b.rest }}" as="f">
<figure style="margin:0;display:flex;flex-direction:column;gap:6px">
<button onClick="{{ f.open }}" style="display:block;width:100%;padding:0;border:var(--bw) solid var(--ln);border-radius:10px;overflow:hidden;background:var(--sf2);cursor:zoom-in">
<sc-if value="{{ f.has }}"><img src="{{ f.src }}" alt="{{ f.cap }}" style="display:block;width:100%;aspect-ratio:1 / 1;object-fit:cover"></sc-if>
<sc-if value="{{ f.miss }}"><div style="aspect-ratio:1 / 1;display:flex;align-items:center;justify-content:center;background:repeating-linear-gradient(135deg,var(--sf2) 0 10px,var(--sf) 10px 20px);font-family:'Onest',system-ui,sans-serif;font-size:12px;color:var(--ink2)">{{ f.file }}</div></sc-if>
</button>
<figcaption style="font-size:14px;line-height:1.35;color:var(--ink2)">{{ f.cap }}</figcaption>
</figure>
</sc-for>
</div>
</div>
</sc-if>
</sc-for>
</div>
</x-dc>
<script type="text/x-dc" data-dc-script data-props="{&quot;$preview&quot;:{&quot;width&quot;:390,&quot;height&quot;:900},&quot;md&quot;:{&quot;editor&quot;:&quot;text&quot;,&quot;default&quot;:&quot;&quot;,&quot;tsType&quot;:&quot;string&quot;},&quot;onImage&quot;:{&quot;editor&quot;:null,&quot;tsType&quot;:&quot;(i:number, figs:any[])=&gt;void&quot;},&quot;keyLayout&quot;:{&quot;editor&quot;:&quot;enum&quot;,&quot;options&quot;:[&quot;grid&quot;,&quot;list&quot;],&quot;default&quot;:&quot;grid&quot;,&quot;tsType&quot;:&quot;'grid'|'list'&quot;}}">
const TITLES={'stoyka-vezda-slabotochka':'Слаботочка, MOXA, SIP, камеры','stoyka-vezda-silovoe':'Силовое расключение и УЗИП','stoyka-vezda-razmeshenie':'Где что стоит','shkon':'ШКОН — монтаж и сварка','shkos':'ШКОС 1U — монтаж и сварка','uzly-krepleniya-vok':'Узлы крепления ВОК','uzel-fotoelementa':'Узел фотоэлемента','kreplenie-tablo':'Крепление табло','fundament-ostrova':'Фундамент острова','navesy-terminala':'Навесы терминала'};
const IMG={'assets/rack-lowcurrent/fig-4.jpg':'assets/rack-fig-4.jpg','assets/shkon/fig-2.jpg':'assets/shkon-fig-2.jpg'};
const stop=e=>e.preventDefault();
function inl(s){const out=[];const re=/\*\*(.+?)\*\*|\[\[([a-z0-9-]+)\]\]/g;let m,last=0;
while((m=re.exec(s))){if(m.index>last)out.push({t:s.slice(last,m.index),plain:true,notBold:true});
if(m[1])out.push({t:m[1],bold:true});else out.push({t:TITLES[m[2]]||m[2],link:true,notBold:true,go:stop});last=re.lastIndex}
if(last<s.length)out.push({t:s.slice(last),plain:true,notBold:true});return out}
const txt=segs=>segs.map(x=>x.t).join('');
function parse(md,open){
md=md.replace(/^---[\s\S]*?\n---\n/,'');const L=md.split('\n');const B=[];const figs=[];let i=0,g=0,h=0;
while(i<L.length){const l=L[i];let m;
if(!l.trim()){i++;continue}
if((m=l.match(/^:::(\w+)/))){const kind=m[1];const body=[];i++;while(i<L.length&&!L[i].startsWith(':::')){if(L[i].trim())body.push(L[i]);i++}i++;
if(kind==='keyfacts'){const items=body.map(x=>x.replace(/^- /,'')).map(x=>{const c=x.indexOf(':');const has=c>-1&&c<44;const segs=inl(has?x.slice(c+1).trim():x);const w=txt(segs).length>24;return{label:has?x.slice(0,c):'',segs,wide:w,narrow:!w}});
B.push({isKey:true,items,count:items.length+(items.length<5?' пункта':' пунктов')})}
else B.push({['is'+kind[0].toUpperCase()+kind.slice(1)]:true,paras:body.map(x=>({segs:inl(x.replace(/^- /,''))}))});continue}
if(l.startsWith('### ')){B.push({isH3:true,t:l.slice(4)});i++;continue}
if(l.startsWith('## ')){B.push({isH2:true,t:l.slice(3),hid:String(h++)});i++;continue}
if(/^- \[[ x]\] /.test(l)){const items=[];while(i<L.length&&/^- \[[ x]\] /.test(L[i])){items.push({segs:inl(L[i].slice(6))});i++}B.push({isCheck:true,gid:g++,items});continue}
if(l.startsWith('- ')){const items=[];while(i<L.length&&L[i].startsWith('- ')){items.push({segs:inl(L[i].slice(2))});i++}B.push({isUl:true,items});continue}
if(/^\d+\. /.test(l)){const items=[];while(i<L.length&&/^\d+\. /.test(L[i])){const n=L[i].match(/^(\d+)\. /)[1];let t=L[i].replace(/^\d+\. /,'');let title='';const mm=t.match(/^\*\*(.+?)\*\*\s*/);if(mm){title=mm[1];t=t.slice(mm[0].length)}items.push({n,title,segs:inl(t)});i++}B.push({isOl:true,items});continue}
if(l.startsWith('|')){const rows=[];while(i<L.length&&L[i].startsWith('|')){if(!/^\|[\s\-:|]+\|\s*$/.test(L[i]))rows.push(L[i].trim().slice(1,-1).split('|').map(c=>c.trim()));i++}
const head=rows[0]||[],body=rows.slice(1);
if(head.length===2)B.push({isKv:true,h0:head[0],h1:head[1],rows:body.map(r=>({k:inl(r[0]||''),v:inl(r[1]||'')}))});
else B.push({isCards:true,rows:body.map(r=>({title:r[0],cells:r.slice(1).map((c,j)=>({label:head[j+1],segs:inl(c)}))}))});continue}
if(l.startsWith('![')){const items=[];while(i<L.length&&L[i].startsWith('![')){const mm=L[i].match(/^!\[(.*?)\]\((.*?)\)/);if(mm){const raw=mm[2];const src=IMG[raw]||(/^(blob:|data:|assets\/(rack|shkon)-fig)/.test(raw)?raw:'');const f={cap:mm[1],src,has:!!src,miss:!src,file:raw.startsWith('blob:')?'загружено':raw.split('/').pop(),idx:figs.length};f.open=()=>open(f.idx,figs);figs.push(f);items.push(f)}i++}
B.push({isFigs:true,first:items.slice(0,1),rest:items.slice(1)});continue}
B.push({isP:true,segs:inl(l)});i++}
return B}
class Component extends DCLogic{
state={done:{}};
renderVals(){
const md=this.props.md||'';
if(md!==this._md){this._md=md;this._b=parse(md,(i,f)=>this.props.onImage&&this.props.onImage(i,f))}
const list=this.props.keyLayout==='list';const done=this.state.done;
const blocks=this._b.map(b=>{
if(b.isKey&&list)return{...b,items:b.items.map(k=>({...k,wide:true,narrow:false}))};
if(!b.isCheck)return b;
const items=b.items.map((it,j)=>{const k=b.gid+'-'+j;const on=!!done[k];return{...it,on,off:!on,toggle:()=>this.setState(s=>({done:{...s.done,[k]:!s.done[k]}})),rowStyle:{opacity:on?0.5:1,textDecoration:on?'line-through':'none',paddingTop:'2px'}}});
const n=items.filter(x=>x.on).length;
return{...b,items,doneN:n,total:items.length,barStyle:{width:(n/items.length*100)+'%',height:'100%',background:'var(--grnS)',transition:'width .2s'},
reset:()=>this.setState(s=>{const d={...s.done};items.forEach((_,j)=>delete d[b.gid+'-'+j]);return{done:d}})}});
return{blocks};
}
}
</script>
</body>
</html>
+63
View File
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./support.js"></script>
</head>
<body>
<x-dc>
<div style="position:absolute;inset:0;z-index:50;background:#000000;color:#FFFFFF;display:flex;flex-direction:column;font-family:'Golos Text',system-ui,sans-serif">
<div style="flex:none;display:flex;align-items:center;gap:10px;padding:8px 8px 8px 16px;min-height:68px">
<div style="flex:1;min-width:0;display:flex;flex-direction:column;gap:2px"><div style="font-family:'JetBrains Mono',monospace;font-size:13px;color:#BDBDBD">{{ counter }}</div><div style="font-size:16px;font-weight:600;line-height:1.3">{{ cap }}</div></div>
<button onClick="{{ close }}" aria-label="Закрыть" style="flex:none;width:52px;height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-size:22px;cursor:pointer">✕</button>
</div>
<div onPointerDown="{{ down }}" onPointerMove="{{ move }}" onPointerUp="{{ up }}" onPointerCancel="{{ up }}" onWheel="{{ wheel }}" onDoubleClick="{{ dbl }}" style="flex:1;min-height:0;position:relative;overflow:hidden;touch-action:none;display:flex;align-items:center;justify-content:center;cursor:grab;user-select:none">
<sc-if value="{{ has }}"><img src="{{ src }}" draggable="false" alt="{{ cap }}" style="{{ imgStyle }}"></sc-if>
<sc-if value="{{ miss }}"><div style="{{ phStyle }}">фото · {{ file }}</div></sc-if>
</div>
<div style="flex:none;display:flex;flex-direction:column;gap:8px;padding:10px 12px 22px">
<div style="display:grid;grid-template-columns:56px 1fr 56px 72px 56px 1fr 56px;gap:6px;align-items:center">
<button onClick="{{ prev }}" aria-label="Предыдущее" style="height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-size:22px;cursor:pointer">‹</button>
<span></span>
<button onClick="{{ zoomOut }}" aria-label="Уменьшить" style="height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-size:24px;cursor:pointer">−</button>
<button onClick="{{ reset }}" style="height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-family:'JetBrains Mono',monospace;font-size:15px;font-weight:700;cursor:pointer">{{ zoomLabel }}</button>
<button onClick="{{ zoomIn }}" aria-label="Увеличить" style="height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-size:24px;cursor:pointer">+</button>
<span></span>
<button onClick="{{ next }}" aria-label="Следующее" style="height:52px;border-radius:12px;border:1px solid #444;background:#1A1A1A;color:#FFFFFF;font-size:22px;cursor:pointer">›</button>
</div>
<div style="text-align:center;font-size:13px;color:#A8A8A8">Щипок или двойной тап: зум · свайп: листать</div>
</div>
</div>
</x-dc>
<script type="text/x-dc" data-dc-script data-props="{&quot;$preview&quot;:{&quot;width&quot;:390,&quot;height&quot;:800},&quot;figs&quot;:{&quot;editor&quot;:null,&quot;tsType&quot;:&quot;{src:string,cap:string,has:boolean,file:string}[]&quot;},&quot;start&quot;:{&quot;editor&quot;:&quot;int&quot;,&quot;default&quot;:0,&quot;tsType&quot;:&quot;number&quot;},&quot;onClose&quot;:{&quot;editor&quot;:null,&quot;tsType&quot;:&quot;()=&gt;void&quot;}}">
class Component extends DCLogic{
state={i:null,z:1,x:0,y:0,drag:false};
P=new Map();
cur(){const f=this.props.figs||[];const i=this.state.i??this.props.start??0;return{f,i:Math.min(i,Math.max(0,f.length-1))}}
go(d){const{f,i}=this.cur();if(!f.length)return;this.setState({i:(i+d+f.length)%f.length,z:1,x:0,y:0})}
zoom(z){z=Math.max(1,Math.min(5,z));this.setState(z===1?{z,x:0,y:0}:{z})}
down=e=>{try{e.currentTarget.setPointerCapture(e.pointerId)}catch(_){}this.P.set(e.pointerId,{x:e.clientX,y:e.clientY});
if(this.P.size===1){this.sx=e.clientX;this.swipe=this.state.z===1}else this.swipe=false;this.setState({drag:true})};
move=e=>{if(!this.P.has(e.pointerId))return;const ids=[...this.P.keys()];const prev=ids.map(k=>this.P.get(k));
this.P.set(e.pointerId,{x:e.clientX,y:e.clientY});const cur=ids.map(k=>this.P.get(k));
if(cur.length===1){if(this.state.z>1){const dx=cur[0].x-prev[0].x,dy=cur[0].y-prev[0].y;this.setState(s=>({x:s.x+dx,y:s.y+dy}))}}
else{const d=(a,b)=>Math.hypot(a.x-b.x,a.y-b.y);const r=d(cur[0],cur[1])/(d(prev[0],prev[1])||1);
const mx=(cur[0].x+cur[1].x-prev[0].x-prev[1].x)/2,my=(cur[0].y+cur[1].y-prev[0].y-prev[1].y)/2;
this.setState(s=>{const z=Math.max(1,Math.min(5,s.z*r));return z===1?{z,x:0,y:0}:{z,x:s.x+mx,y:s.y+my}})}};
up=e=>{this.P.delete(e.pointerId);if(this.P.size===0){if(this.swipe){const dx=e.clientX-this.sx;if(Math.abs(dx)>60)this.go(dx<0?1:-1)}this.setState({drag:false})}};
wheel=e=>this.zoom(this.state.z*(e.deltaY<0?1.15:1/1.15));
dbl=()=>this.state.z>1?this.zoom(1):this.zoom(2.5);
renderVals(){
const{f,i}=this.cur();const it=f[i]||{};const{z,x,y,drag}=this.state;
return{counter:f.length?`${i+1} / ${f.length}`:'',cap:it.cap||'',src:it.src,has:!!it.has,miss:!it.has,file:it.file||'',
imgStyle:{maxWidth:'100%',maxHeight:'100%',transform:`translate(${x}px,${y}px) scale(${z})`,transition:drag?'none':'transform .15s ease-out',pointerEvents:'none'},
phStyle:{width:'86%',aspectRatio:'4 / 3',display:'flex',alignItems:'center',justifyContent:'center',background:'repeating-linear-gradient(135deg,#1A1A1A 0 14px,#262626 14px 28px)',fontFamily:"'JetBrains Mono',monospace",fontSize:'14px',color:'#BDBDBD',transform:`translate(${x}px,${y}px) scale(${z})`,transition:drag?'none':'transform .15s'},
zoomLabel:Math.round(z*100)+'%',close:()=>this.props.onClose&&this.props.onClose(),
prev:()=>this.go(-1),next:()=>this.go(1),zoomIn:()=>this.zoom(z*1.5),zoomOut:()=>this.zoom(z/1.5),reset:()=>this.zoom(1),
down:this.down,move:this.move,up:this.up,wheel:this.wheel,dbl:this.dbl};
}
}
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff
+176
View File
@@ -0,0 +1,176 @@
# Handoff: Памятки монтажника (wiki.suchtech.ru)
## Overview
A mobile-first wiki of installation instructions for field technicians (parking systems / АСУПП). The technician holds a phone in one hand at an open rack, often underground with poor signal. Core needs: open an instruction and read it **whole, by scrolling**; find a number or part code fast (search, cheat sheet); see bans/warnings unmistakably; tick checklists; zoom photos; work offline. A desktop version covers reading, an article editor (Markdown with custom blocks) and an admin panel (spaces, sections, users, roles, invite links).
## About the Design Files
The files in this bundle are **design references created in HTML**: prototypes that show the intended look and behavior. They are not production code to copy. The task is to **recreate these designs in the target codebase's environment** (React/Next, Vue, etc.) using its established patterns. If there is no codebase yet, choose a suitable stack. A PWA with a service worker for offline use fits the brief well.
Open `Pamyatki-v3.dc.html` in a browser to see the designs. It loads `support.js` and the sibling components `ArticleBodyXL.dc.html` and `Lightbox.dc.html`. The page is a pan/zoom canvas with every screen laid out on it.
## Fidelity
**High-fidelity.** Final colors, typography, spacing and interactions. Recreate the designs pixel-accurately. Copy text is final Russian UI copy. The article content comes from `content-samples/*.md`.
## Content model (Markdown)
Articles are Markdown files with YAML front matter (`title, slug, section, order, tags, equipment, doc_code, source_file …`). See `content-samples/`. Custom syntax the renderer must support:
- `:::keyfacts` … `:::`: the «Главное» block. Each line is `- Label: value with **bold**`.
- `:::danger` («ЗАПРЕЩЕНО»), `:::warning` («ВНИМАНИЕ»), `:::tip` («СОВЕТ»), `:::info` («СПРАВКА»).
- `- [ ]` / `- [x]`: interactive checklist with progress («N из M», «Сбросить»).
- `1. **Title.** text`: numbered step cards (title extracted from the leading bold).
- Tables: a 2-column table renders as key → value rows. A table with 3 or more columns renders as stacked cards on mobile.
- `![caption](path)`: photo group. The first photo is full width; the rest go in a 2-column grid of square thumbnails. Tapping opens the lightbox.
- `[[slug]]`: internal link chip with the target article's title.
- `## H2` builds the table of contents (bottom sheet on mobile, sticky right column on desktop).
The reference parser is `parse()` in `ArticleBodyXL.dc.html`.
## Screens / Views
All mobile screens are 390×844. Base text is 18px Onest. Every screen has a theme toggle (cycles dark → light → sun).
### 01 Главная (mobile)
- Header: «Памятки монтажника» 23/700, sub «wiki.suchtech.ru · АСУПП» 13px mono-ish. Theme button 48px high on the right.
- Search field: 60px high, 2px ink border, radius 14, placeholder «Цифра, артикул или слово». Quick chips below (40px, pill): MG-12, 2273-245, RAL 7024, порт PoE.
- Pinned «Шпаргалка» card: background #F5C400, text #141414, 2px #141414 border, radius 16. Title 30/700, chips with dark background and yellow text.
- «Разделы»: 2-column grid of cards (min-height 118, radius 14). Each card has a colored section code plaque: ВВ #FFC400, ШЛ #FF8A00, ВОК #4C8DFF, ОБ #2DB45A (all with #111 text), НТ uses ink background with bg-colored text.
- «Избранное» and «Недавно открытые»: list rows, min-height 64.
- Bottom tab bar: 4 tabs (Главная, Поиск, Шпаргалка, Избранное). Each tab has a 24px line icon (stroke 2, currentColor) and a 13px label, min-height 64. The active tab has a 4px #F5C400 inset top bar, weight 700 and ink color; inactive tabs are ink2 / 500.
### 02 Поиск (mobile)
- Focused search field (yellow 4px focus ring), clear button 48×48, horizontal filter chips (Все / Шпаргалка / section), 44px high.
- Results are split into «Цифры · N» (fact cards: large value and description, with matches highlighted by a #F5C400 `<mark>`, plus link chips to articles) and «Статьи · N» (section, title, snippet).
- Empty state: a list of example queries. No-results state: dashed card with a hint.
- Search is case-insensitive over title, summary, tags, equipment and cheat-sheet facts.
### 03 Статья (mobile)
- Back link with the section name, an «Офлайн» status pill (green), and the title. The title is 30/700 with -0.01em letter-spacing; the summary is ink2.
- Meta grid (Шифр / Версия / Обновлено), equipment chips, then the article body, tags, and the «Исходник» download card (PDF icon, file name, size, «Скачать» button).
- A sticky compact header appears after 160px of scroll: section, title and a 3px yellow progress bar.
- Bottom bar: Избранное (star, filled #F5C400 when on), Оглавление, Тема, Наверх.
- Оглавление: bottom sheet (radius 22 top, max 72% height, scrim rgba(0,0,0,.5)). Rows are 56px; tapping smooth-scrolls to the H2 at −80px.
- Lightbox: full-screen black. Top: counter and caption with a 52px close button. Supports pinch and wheel zoom (1–5×), double-tap toggling 1× / 2.5×, pan when zoomed, swipe left/right when at 1× (threshold 60px), and buttons ‹ − 100% + ›.
### Article body blocks (ArticleBodyXL)
- Body: 18px / 1.6, gap 20px between blocks. **Bold text uses the accent color `--acc`** (weight 700).
- H2: 22/700. It has a 2px `--ln` top border, 22px padding-top and 14px margin-top. This divider separates the sections.
- H3: 19/700 in `--acc`.
- Главное: 2px ink border, radius 16, 10px yellow/black hazard stripe on top, header 15/700 caps with 0.1em spacing. Items are tiles (sf2 background, radius 10). The label is 15/600 ink2. Wide items (text longer than 24 chars) use 17px text with the bold value at 19/700 in `--acc`; narrow items show the value at 21/700 in `--acc`.
- ЗАПРЕЩЕНО: 2px `--redS` border, `--redbg` body, a 48px header bar in `--redS` with white 15/700 caps text, and a white circle with a minus. Bold text is in `--red`.
- ВНИМАНИЕ: 2px `--ambln` border, `--ambbg` body, a #F5C400 header with #141414 text and a triangle icon.
- СОВЕТ: green (`--grnS` border, `--grnbg` background, check icon). СПРАВКА: blue (`--blu`, `--blubg`, «i» icon).
- Checklist: card with a header «Чек-лист», «N из M» and «Сбросить», and a 4px green progress bar. Rows are at least 60px with a 30px checkbox; done rows show at 50% opacity with strike-through.
- Steps: cards with a 44px yellow (#F5C400) number tile (20/700, #141414), title 18/700 and body text.
- KV table: header row in sf2, rows at least 56px, value 19/700 in `--acc`, nowrap.
### 04 Шпаргалка (mobile)
- «ЗАПРЕЩЕНО · 8»: a red-bordered list with numbered items and link chips to source articles.
- «Цифры · 16»: rows with the description on the left and the value right-aligned, plus link chips.
- «Цвета»: RAL 5017 (#005387) and RAL 7024 (#45494E) swatches.
- «ВСЕГДА»: a green list with check icons.
### 05 Раздел (mobile)
Section header with a large code plaque, then an offline status row (green, «Сохранено для офлайна · 14 МБ», «Обновить») and article cards (number, title, summary, tags).
### 06 Редактор (mobile, simplified)
Text / Просмотр segmented toggle. Below it, a horizontally scrolling insert toolbar: Главное, Запрет, Внимание, Совет, Справка, Чек-лист, Таблица, Фото, Ссылка на статью. Each button inserts a snippet at the cursor. The editing area is a monospace textarea; pasting an image inserts `![…](blob:)`. Sticky footer: «Черновик» (outline) and «Опубликовать» (filled), 56px. A status line under the title reflects the save state.
### 07 Админка (mobile)
Space selector (АСУПП), a draggable list of sections (⋮⋮ handle, the dragged row highlighted #F5C400), «+ Раздел», a users list where tapping a role cycles Админ → Редактор → Читатель, and «Пригласить по ссылке» (shows «Ссылка скопирована» for 1.8s).
### 08 Вход
Yellow/black hazard stripe on top. Fields «Почта или телефон» and «Пароль» are 60px high with a 2px border. Also «Запомнить устройство» (90 days), «Войти», and «Есть ссылка-приглашение».
### 09 Офлайн
Top banner on #F5C400: «Нет сети: показана сохранённая версия» with a date. Then «Офлайн-разделы» cards in three states: saved (green), loading (progress bar with %), and not saved («Скачать раздел для офлайна» button).
### Desktop (1440×940)
- **D1 Главная:** 300px left sidebar (brand, space switcher, section tree, theme segmented control) and main content. The main area has a 68px search field with a «/» shortcut hint, the Шпаргалка card with 4 key numbers, «Недавно открытые», a 5-column section grid and «Избранное».
- **D3 Статья:** sidebar tree with the active article highlighted (4px yellow inset). Sticky top bar: breadcrumbs, «Доступно офлайн», «В избранное», «Редактировать». Content grid is a 720px article plus a 300px sticky aside (TOC, meta, source file). The article h1 is 40/700.
- **D6 Редактор:** top bar with History, Черновик and Опубликовать. Insert toolbar, then three columns: Markdown textarea | live preview at 390px | metadata panel (section, tags, equipment, doc code, source file, photo drop zone, version history v1–v4). Images can be dropped or pasted.
- **D7 Админка:** left nav, then two columns: «Пространства» and the draggable «Разделы АСУПП» list | «Пользователи» with segmented role pickers and the «Приглашение по ссылке» card.
### Печать / PDF (print & export)
Entry points:
- **Mobile article:** the 5th item in the bottom bar is «Печать» (printer icon). The bar now has 5 equal columns: Избранное · Оглавление · Печать · Тема · Наверх.
- **Desktop article (D3):** a «Печать / PDF» outline button in the sticky top bar, before «Редактировать».
- **Шпаргалка (mobile):** a full-width outline button «Распечатать на 1 лист / PDF» (56px) under the intro text.
Options UI (bottom sheet on mobile; a centered 520px dialog with radius 18 and scrim rgba(0,0,0,.55) on desktop):
- Title «Печать и PDF» and the article title.
- «Формат»: a segmented control with A4 (default) and A5.
- «Что включить»: toggle rows (64px, iOS-style switch 52×32, on = `--grnS`):
- «Фото» (with captions, 2 per row), on by default.
- «Чек-листы» (empty squares to tick with a pen), on by default.
- «Только памятка» («Главное» and bans on one sheet), off by default.
- An estimate line, e.g. «≈ 2 листа A4 · ч/б-совместимо». The page count is recalculated from the options.
- Buttons: «Печать» (outline) opens the native print dialog. «Скачать PDF» (filled #F5C400 with #141414 text) downloads the file.
Print layout (see P1–P3 on the canvas, 794×1123px = A4 at 96dpi):
- **Always light and black-and-white-safe, regardless of the UI theme.** Blocks are told apart by border style and a text label, not by color alone: Главное has a solid 2px border; ЗАПРЕЩЕНО a 3px #B3001B border with a red header bar; ВНИМАНИЕ a dashed 2px black border.
- Page margins are about 13–15mm (48–56px). Body is Onest 16px / 1.5; h1 32/700; h2 21/700 with a 1.5px top rule.
- Running header on every page: space · section on the left; doc code · version · date on the right, 13px, with a 1.5px bottom rule.
- Footer: print date, URL, «Стр. N из M». The last page adds a QR code (76px) linking to the online version, with the note «проверьте версию перед монтажом».
- Checklists and steps print an 18px empty square for each item.
- Photos print 2 per row, 220px high with object-fit cover, plus a 14px caption. Missing photos print as a placeholder with the file name.
- Internal `[[links]]` print as the target title in bold. Print the URL too if space allows.
- Avoid page breaks inside a block (`break-inside: avoid`) and keep each h2 with the block that follows it (`break-after: avoid`).
- Hidden in print: navigation, buttons, sticky header, theme toggle, lightbox, «Офлайн» pills.
- **Шпаргалка (P3)** fits on one A4 sheet. On the left, «ЦИФРЫ» rows (description and right-aligned bold value) and the RAL swatches. On the right, the ЗАПРЕЩЕНО list (numbered) and ВСЕГДА with checkboxes. The footer has a QR code and the note «ламинировать и держать в стойке».
Implementation notes:
- Build a dedicated print route (e.g. `/print/:slug?fmt=A4&photos=1&checks=1&keyOnly=0`) that renders the article in the print layout, plus an `@media print` stylesheet with `@page { size: A4; margin: 14mm }` (or A5).
- «Печать» loads the print route in a hidden iframe or a new tab and calls `window.print()`.
- «Скачать PDF»: browser «Save as PDF» is unreliable on mobile. Generate the PDF server-side with headless Chromium (Playwright/Puppeteer `page.pdf({format:'A4', printBackground:true, displayHeaderFooter:true})`) from the same print route.
- PDF file name: `{slug}_v{version}_{YYYY-MM-DD}.pdf`, e.g. `shkon_v2_2026-10-04.pdf`.
- Offline: if the section is cached, generate the PDF client-side from the cached print route via `window.print()`. Otherwise show «Нужна сеть для PDF».
## Interactions & Behavior
- **Theme:** a global toggle that cycles dark → light → sun. It is persistent; store it in localStorage. Default is dark.
- **Checklists:** state per article and per item, persisted locally, with a reset per list.
- **Favorites, Recent:** local, synced when online.
- **Offline:** cache sections on demand (show the size), show download progress and the last-saved date, and show the banner when offline.
- **Sticky header** after 160px of scroll. Scroll progress updates in 2% steps.
- **Transitions:** keep them short (0.15–0.28s ease). There are no decorative animations.
- **Touch targets:** at least 44px; primary actions are 56–64px.
## State Management
`theme`, `printOptions {fmt:'A4'|'A5', photos, checks, keyOnly}` (remember the last choice), `favorites[]`, `recent[]`, `checklist[articleSlug][itemIndex]`, `offline[sectionId] = idle|loading(pct)|done(date)`, search `query` and `filter`, editor `markdown`, `status`, `tab`, admin `sections order`, `user roles`.
Data: articles (Markdown and front matter), sections, cheat-sheet facts (value, description, source slugs), users and roles, invites.
## Design Tokens
CSS variables on the root. Only their values change per theme.
| token | dark (default) | light | sun |
|---|---|---|---|
| --bg | #0F1011 | #EEEDE8 | #FFFFFF |
| --sf | #1A1B1D | #FFFFFF | #FFFFFF |
| --sf2 | #242528 | #F5F4F0 | #FFFFFF |
| --ink | #F2F1EC | #141414 | #000000 |
| --ink2 | #C4C2BB | #45443F | #111111 |
| --ln | #393B3F | #D3D1C9 | #000000 |
| --acc (bold/accent text) | #FFCF4A | #8A4B00 | #6B3A00 |
| --red / --redS / --redbg | #FF8A8A / #C81E32 / #2E1215 | #A8001A / #B3001B / #FBEAEC | #8C0000 / #A00000 / #FFFFFF |
| --amb / --ambbg / --ambln | #FFD266 / #2B220C / #C99700 | #6B4500 / #FFF4D6 / #E0A800 | #3D2600 / #FFFFFF / #000000 |
| --grn / --grnS / --grnbg | #7ED89C / #24854A / #112A1A | #14602F / #1B7A3D / #E6F2E9 | #004D1E / #006B2A / #FFFFFF |
| --blu / --blubg | #9EC1F7 / #13203A | #174A8F / #E8EEF7 | #00337A / #FFFFFF |
| --hl (marker yellow) | #F5C400 | #F5C400 | #FFD000 |
| --wb / --ws (body / strong weight) | 400 / 700 | 400 / 700 | 500 / 800 |
| --bw (border width) | 1px | 1px | 2px |
| --sh (card shadow) | none | 0 1px 2px rgba(20,20,20,.06), 0 4px 12px -6px rgba(20,20,20,.12) | none |
Section plaque colors (fixed in every theme): ВВ #FFC400, ШЛ #FF8A00, ВОК #4C8DFF, ОБ #2DB45A, all with #111111 text. Hazard stripe: repeating-linear-gradient(-45deg, #F5C400 0 10px, #141414 10px 20px).
- **Typography:** Onest (Google Fonts), weights 400/500/600/700, for everything. Scale: 40 (desktop h1) · 30 (mobile h1, Шпаргалка) · 23 (home title) · 22 (H2) · 19–21 (key values) · 18 (body) · 15–17 (secondary) · 13–14 (labels and captions; caps labels use 0.08–0.1em spacing). Line-height is 1.6 for body and 1.1–1.25 for headings.
- **Spacing:** 4-pt scale: 4, 8, 12, 16 (screen padding), 20–22 (between blocks), 32, 48.
- **Radius:** 3–6 (plaques, tags), 10–12 (buttons, tiles), 14–16 (blocks, cards), 22 (bottom sheet), 999 (chips).
- **Icons:** 24×24 inline SVG, stroke 2, round caps and joins, currentColor (home, search, document list, star, list, half-filled circle for theme, arrow up).
## Assets
- `assets/rack-fig-4.jpg` (patch cords through the cable channel) and `assets/shkon-fig-2.jpg` (ШКОН cable entry and port numbering) are real photos supplied by the user.
- The other figures referenced in the Markdown (`assets/rack-lowcurrent/fig-1..5`, `assets/shkon/fig-1..8`) were not supplied. The design shows a striped placeholder with the file name in their place.
- Document codes, versions, dates, file sizes and user names in the mocks are **illustrative placeholders**. Replace them with real data.
## Files
- `Pamyatki-v3.dc.html`: all screens (mobile 01–09, desktop D1/D3/D6/D7, print previews P1–P3, components, tokens) and the app logic (themes, search, TOC, print options, offline, editor, admin).
- `ArticleBodyXL.dc.html`: Markdown → article renderer (parser and all block styles).
- `Lightbox.dc.html`: photo viewer (zoom, pan, swipe).
- `support.js`: runtime that lets the `.dc.html` prototypes open in a browser. It is not needed in production.
- `content-samples/`: source articles (`glavnoe.md`, `slabotochka.md`, `shkon.md`) and the original design brief (`PROMPT_CLAUDE_DESIGN.md`).
Binary file not shown.

After

Width:  |  Height:  |  Size: 435 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

@@ -0,0 +1,61 @@
# Промпт для Claude Design
> Как использовать: открой Claude Design, приложи файлы `content/00-shpargalka/glavnoe.md`, `content/01-stoyka-vezda/slabotochka.md`, `content/03-optika-vok/shkon.md` и 3–4 фото из `assets/` (например `rack-lowcurrent/fig-4.jpg`, `shkon/fig-2.jpg`). Затем вставь текст ниже.
---
Сделай дизайн веб-сервиса **«Памятки монтажника»** (домен wiki.suchtech.ru). Это база знаний с инструкциями, требованиями и техническими решениями для монтажников систем контроля доступа на парковках (АСУПП): стойки въезда/выезда, шлагбаумы, камеры распознавания номеров, оптика (ВОК, ШКОН, ШКОС), фундаменты, навесы. Позже туда же добавятся другие направления работ (например, гидроизоляция), поэтому структура должна быть универсальной: **Пространства → Разделы → Статьи**.
## Кто пользуется и в каких условиях
- Главный сценарий: **телефон в одной руке, монтажник стоит у открытой стойки** и сверяется с инструкцией во время расключения.
- Улица, яркое солнце, вечером полумрак, иногда перчатки, руки грязные, связь плохая (подвал, паркинг).
- Нужно за **2–3 секунды** найти цифру («какой длины патч-корд на SIP?», «в какие порты камеры?») или запрет.
- Второй сценарий: на компьютере редактор добавляет и правит статьи.
## Принципы дизайна
1. **Mobile-first.** Основная ширина 360–430 px, десктоп вторичен.
2. **Крупно и контрастно.** Базовый текст ≥ 17 px, цифры и значения крупнее и жирнее, зоны нажатия ≥ 48 px, высокий контраст (WCAG AAA для основного текста).
3. **Важное видно сразу.** Ключевые цифры и запреты в начале статьи, раньше длинного текста.
4. **Управление одним большим пальцем.** Главные действия внизу экрана (нижняя панель / плавающая кнопка).
5. **Три темы:** светлая, тёмная и **«Солнце»** (максимальный контраст, чисто белый фон, почти чёрный текст, жирнее шрифты). Переключатель всегда под рукой.
6. **Инструментальный характер, без «маркетинга»:** строгий, технический, понятный. Можно опереться на эстетику промышленной маркировки и сигнальных цветов (красный = запрет, жёлтый = внимание, зелёный = выполнено), но без кислотности.
7. Шрифты с **хорошей кириллицей**; для цифр/артикулов моноширинный или табличные цифры.
## Блоки контента (дизайн каждого обязателен, это ядро сервиса)
В статьях используется Markdown с такими блоками. Нарисуй компонент для каждого:
- `:::keyfacts`: **«Главное»**, 3–6 ключевых цифр/правил. Самый заметный блок статьи. Подумай о виде «плитки с большой цифрой + подпись».
- `:::danger`: **ЗАПРЕЩЕНО** (красный, иконка ⛔, нельзя пропустить взглядом).
- `:::warning`: **Внимание** (жёлтый/янтарный).
- `:::tip`: совет / исключение из правила.
- `:::info`: справка / «уточнить у заказчика».
- **Чек-лист** `- [ ]`: крупные чекбоксы, отметка пальцем, счётчик «3 из 7», кнопка «сбросить». Отмеченные пункты визуально приглушены.
- **Нумерованные шаги**: шаг = карточка с номером, жирным заголовком шага и текстом.
- **Таблицы**: на мобиле не должны ломать экран. Предложи решение: таблица → карточки, или горизонтальный скролл с закреплённой первой колонкой. Покажи оба варианта, выбери лучший.
- **Фото и чертежи**: превью во всю ширину с подписью «Рис. 3: …», по тапу полноэкранный просмотр с **pinch-zoom** и листанием. Чертежи (большие А1–А3 листы) особенно нуждаются в удобном зуме.
- **Ссылки на другие статьи** `[[slug]]`: чип/пилюля с названием статьи.
- **Документ-оригинал**: карточка «Исходник: PDF, 2,6 МБ, скачать».
- Метаданные: шифр документа (например «СКБТ-10-2025-ТР/НР-АПС-10.1.1»), версия, дата обновления, теги оборудования.
## Экраны (мобильная версия обязательна, десктоп для 1, 3, 6, 7)
1. **Главная**: поиск сверху (большое поле, сразу в фокус по тапу), «Шпаргалка» закреплённой карточкой, плитки разделов с иконками (Стойка въезда/выезда, Стойка шлагбаума, Оптика ВОК, Остров безопасности, Навес терминала), «Избранное», «Недавно открытые».
2. **Поиск**: мгновенные результаты при вводе, подсветка совпадений, поиск по цифрам и артикулам («MG-12», «2273-245», «RAL 7024»), фильтры-чипы по разделам. Пустое состояние с подсказками.
3. **Статья**: заголовок, мета, блок «Главное», затем контент. Липкая мини-шапка при скролле. Оглавление выезжает снизу (bottom sheet). Нижняя панель: ☆ избранное, оглавление, тема, «наверх». Индикатор «доступно офлайн».
4. **Шпаргалка**: всё важное на одном экране: список запретов и таблица цифр со ссылками в статьи.
5. **Раздел**: список статей с кратким описанием и тегами.
6. **Редактор статьи** (десктоп + мобильная упрощённая версия): Markdown слева, живой предпросмотр справа; панель кнопок для вставки блоков (Главное / Запрет / Внимание / Совет / Чек-лист / Таблица / Фото / Ссылка на статью); загрузка фото перетаскиванием и вставкой из буфера; поля: раздел, теги, оборудование, шифр, исходный файл; кнопки «Черновик» / «Опубликовать»; история версий.
7. **Админка**: пространства и разделы (drag-n-drop порядок), пользователи и роли (Админ / Редактор / Читатель), приглашение по ссылке.
8. **Вход**: простой, крупный, «запомнить устройство».
9. **Офлайн-состояние**: баннер «Нет сети: показана сохранённая версия», кнопка «Скачать раздел для офлайна».
## Что отдать на выходе
- Дизайн-токены: цвета (3 темы), типографика, отступы, радиусы, тени, семантические цвета блоков.
- Компоненты из списка выше во всех состояниях.
- Все экраны на мобильной ширине 390 px + ключевые на 1440 px.
- Используй **реальный контент из приложенных файлов**, без lorem ipsum.
- Подготовь всё к передаче в Claude Code (handoff), чтобы код можно было собрать 1-в-1 по дизайну.
+53
View File
@@ -0,0 +1,53 @@
---
title: Шпаргалка — все цифры и запреты на одном экране
slug: shpargalka
section: Шпаргалка
order: 0
pinned: true
tags: [шпаргалка, запреты, цифры]
summary: Самое важное из всех инструкций, чтобы не листать.
---
## ⛔ Запрещено
- Подключать **УЗИП до автомата** или **на зажимы автомата** → только штатные шинки → [[stoyka-vezda-silovoe]]
- Силовые жилы **> 2,5 мм²** без распределительного блока → [[stoyka-vezda-silovoe]]
- **Больше 2** проводников под зажим автомата, или разные модели/сечения → [[stoyka-vezda-silovoe]]
- **Перекрёстный ввод** кабелей в ШКОС, **больше 2 кабелей** в ШКОС 1U → [[shkos]]
- Волокна/пигтейлы **под оболочкой** кабеля или **вне периметра** выштамповки в ШКОН → [[shkon]]
- **2 УКН на одни ленты** на опоре → [[uzly-krepleniya-vok]]
- Анкер-кольцо **не в монолитный ж/б** → [[uzly-krepleniya-vok]]
- Оптическая муфта **вводами вверх** → [[uzly-krepleniya-vok]]
## 📏 Цифры
| Что | Значение | Где |
|---|---|---|
| Запас кабеля при зачистке в стойке | **20 см** | [[stoyka-vezda-slabotochka]] |
| Патч-корд → плата управления | **1 м** | [[stoyka-vezda-slabotochka]] |
| Патч-корд → SIP-шлюз / MOXA | **2 м / 2 м** | [[stoyka-vezda-slabotochka]] |
| Порты для КПН/КЗН | **1 и 2** | [[stoyka-vezda-slabotochka]] |
| Вызывная панель | **порт PoE** | [[stoyka-vezda-slabotochka]] |
| Порог сечения для РБД | **> 2,5 мм²** | [[stoyka-vezda-silovoe]] |
| DIN-рейка под реле/РБД | **20 см** | [[stoyka-vezda-razmeshenie]] |
| Зачистка ВОК (ШКОН и ШКОС) | **1,2 м** модуля | [[shkon]] |
| Изолента на ВОК: ШКОН / ШКОС | **15 см / 30 см** | [[shkon]] · [[shkos]] |
| Обороты волокон: ШКОН / ШКОС | **3 / 2,5–3** | [[shkon]] · [[shkos]] |
| Радиус запаса ВОК | **≥ 20 Ø кабеля** | [[uzly-krepleniya-vok]] |
| Стяжки гофры на ВОК | **каждые 40 см** | [[uzly-krepleniya-vok]] |
| Отверстие под сальник MG-12 | **Ø12 мм** | [[uzel-fotoelementa]] · [[kreplenie-tablo]] |
| Закладная под петли | **−0,05 м** | [[fundament-ostrova]] |
| Анкеров на навес: тип 2 / тип 5 | **24 / 16** | [[navesy-terminala]] |
| Шаг саморезов поликарбоната | **150–200 мм** | [[navesy-terminala]] |
## 🎨 Цвета
- Уголок фотоэлемента: **RAL 5017**
- Навес и поликарбонат: **RAL 7024**
## ✅ Всегда
- маркировка на **каждом** контакте
- бирки на ВОК **до** сварки
- страховочный тросик + **контргайка М16** на подвесе ВОК
- лишние адаптеры и пигтейлы **снять**
+57
View File
@@ -0,0 +1,57 @@
---
title: ШКОН — монтаж и сварка
slug: shkon
section: Оптика (ВОК)
order: 1
tags: [ВОК, ШКОН, сварка, КДЗС, пигтейлы, hippoparking]
equipment: [ШКОН, КДЗС, пигтейлы]
source: originals/shkon_montazh-i-svarka.pdf
summary: Транзитный ШКОН в стойке: ввод слева снизу, зачистка 1,2 м, волокна и пигтейлы на 3 оборота.
---
:::keyfacts
- Ввод кабелей: **строго слева снизу** (если смотреть на крышку), отверстия под адаптеры **смотрят вверх**
- Зачистка: **1,2 м** оголённого модуля
- Изолента на кабель: **~15 см**
- Модули: **пол-оборота**
- Волокна и пигтейлы: **3 оборота**, через ложемент КДЗС (занимают 1 место)
:::
Пример дан для **транзитного** ШКОН (самый сложный случай). **Оконечный** (1 кабель ВОК) делается так же.
:::danger
Волокна и пигтейлы **не должны попасть под внешнюю оболочку** введённых кабелей.
Укладка **строго внутри периметра** из выштампованных отогнутых элементов.
:::
## До сварки
- [ ] Повесить **бирки** на каждый ВОК рядом с местом установки ШКОН
- [ ] Зачистить ВОК, оставить **1,2 м** оголённого модуля
- [ ] Промаркировать модуль каждого кабеля
:::warning
Для стоек **hippoparking**: кабели заводить **строго с левой нижней стороны** (если смотреть на крышку), отверстия под проходные адаптеры **вверх** (рисунок 2).
:::
## Пошагово
1. **Фиксация кабеля.** Плотно обмотать ВОК изолентой на **~15 см**. Силовые элементы зажать **спецзажимом** внутри ШКОН. Кабель закрепить **минимум двумя стяжками** за выштампованные элементы, **один из них заранее отогнуть на 90°**. Так кабель не проворачивается и не выдёргивается.
2. **Модули.** Уложить на **пол-оборота**, плотно обмотать изолентой, зафиксировать стяжкой за выштампованный элемент.
3. **Волокна.** Промаркировать, уложить на **3 оборота** через ложемент для КДЗС (1 место).
4. **Транзит.** Если волокна с разных ВОК: сделать **разворот транзитного кабеля**. Разворот тоже через ложемент КДЗС, **не под него**, дополнительно прихватить кусочком изоленты.
5. **Пигтейлы.** Уложить на **3 оборота** через ложемент КДЗС. В конце в это место ложемента ставится **неусаженная КДЗС**, чтобы держать волокна.
6. **Закрытие.** Поставить крышку, **подписать номера портов слева направо** по схеме (рисунок 2).
## Фото
![Рисунок 1 — транзитный ШКОН, общий вид](assets/shkon/fig-1.jpg)
![Рисунок 2 — ввод кабелей и нумерация портов](assets/shkon/fig-2.jpg)
![Шаг 1 — изолента и стяжки](assets/shkon/fig-3.jpg)
![Шаг 1 — зажим силовых элементов](assets/shkon/fig-4.jpg)
![Шаг 2 — модули](assets/shkon/fig-5.jpg)
![Шаг 3 — волокна через ложемент](assets/shkon/fig-6.jpg)
![Шаг 4 — разворот транзита](assets/shkon/fig-7.jpg)
![Шаг 5 — пигтейлы и неусаженная КДЗС](assets/shkon/fig-8.jpg)
Сравни: [[shkos]]: там другие цифры!
+74
View File
@@ -0,0 +1,74 @@
---
title: Стойка въезда/выезда — слаботочка, MOXA, SIP, камеры
slug: stoyka-vezda-slabotochka
section: Стойка въезда/выезда
order: 2
tags: [стойка, коммутатор, MOXA, SIP-шлюз, КПН, КЗН, PoE, патч-корды, FTP]
equipment: [Dahua PFS3110-8ET-96, D-Link DES-1008P, MOXA, SIP-шлюз, плата управления]
source: originals/stoyka-vezda_slabotochka.pdf
summary: Длины патч-кордов, порты для камер, укладка FTP и запасы кабеля в стойке.
---
:::keyfacts
- Запас при зачистке кабеля: **20 см** (под светофор, пожарку и т.д.)
- Патч-корды: плата управления **1 м**, SIP-шлюз **2 м**, MOXA **2 м** (только заводские UTP RJ-45)
- Камеры КПН/КЗН: **только порты 1 и 2** коммутатора
- Вызывная панель: **только PoE-порт**
- Кабель для камер и табло: **FTP 4 пары, кат. 5e**
:::
## 1. Патч-корды от коммутатора
Коммутатор стоит **вверху справа, над выдвижной полкой**. От него идут три заводских патч-корда UTP RJ-45:
| Куда | Длина |
|---|---|
| Плата управления стойки | **1 м** |
| SIP-шлюз | **2 м** |
| MOXA | **2 м** |
### Как проложить
- [ ] Пропустить все три патч-корда через **вертикальный кабель-канал справа от платы управления** (рис. 4)
- [ ] Закрепить стяжками на монтажной пластине в **выштампованных местах над платой управления**
- [ ] Патч-корд 1 м → в ethernet-порт платы управления
- [ ] Два патч-корда по 2 м → по **общему жгуту стойки** вниз → в SIP-шлюз и MOXA
- [ ] Излишки свернуть петлями и убрать в **«карман» стойки под SIP-шлюзом** (рис. 5), без перегибов и натяжения
- [ ] Всё строго по схеме, всё промаркировано
## 2. Камеры, табло, вызывная панель
Кабель: **FTP 4 пары, кат. 5e** (по единой спецификации материалов).
:::warning
Камеры **КПН и КЗН** в коммутаторы **Dahua PFS3110-8ET-96** и **D-Link DES-1008P** включать **только в порты 1 и 2**.
:::
- Если в Dahua PFS3110-8ET-96 включаются **4 камеры**: **КПН в порты 1 и 2**
- **Внешняя вызывная панель**: **обязательно в порт с PoE**
- Табло и прочее оборудование без PoE: в любой свободный порт
## 3. MOXA и кабели в стойке
- [ ] При зачистке кабеля оставить **запас 20 см** для модернизации
- [ ] После подключения MOXA **свободные жилы аккуратно скрутить вокруг кабеля** (рис. 1)
- [ ] FTP/UTP провести через кабель-канал стойки и закрепить **стяжками в двух местах к самой MOXA** (рис. 1)
- [ ] Перемычка MOXA ↔ клеммная колодка стойки: **F/UTP 4 пары** (рис. 2)
- [ ] Излишки F/UTP и ВОК свернуть кольцами и **уложить вниз стойки** (рис. 3)
## Приёмка: стойка должна быть такой
- кабели не мешают работе оборудования
- к оборудованию есть свободный доступ для обслуживания
- аккуратный внешний вид
- всё промаркировано
## Фото
![Рис. 1 — MOXA: жилы скручены, стяжки в двух местах](assets/rack-lowcurrent/fig-1.jpg)
![Рис. 2 — перемычка MOXA ↔ клеммник](assets/rack-lowcurrent/fig-2.jpg)
![Рис. 3 — запасы кабеля внизу стойки](assets/rack-lowcurrent/fig-3.jpg)
![Рис. 4 — патч-корды от коммутатора через кабель-канал](assets/rack-lowcurrent/fig-4.jpg)
![Рис. 5 — «карман» для петель под SIP-шлюзом](assets/rack-lowcurrent/fig-5.jpg)
Связано: [[stoyka-vezda-razmeshenie]] · [[stoyka-vezda-silovoe]]
File diff suppressed because it is too large Load Diff