# 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 ``, 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`).