Prepare V2 corpus, editorial journal and reproducible publication boundary
No files matched your search
@@ -1,4 +1,4 @@
|
||||
"use client";
|
||||
import {useState} from 'react';
|
||||
import {useState,useEffect} from 'react';
|
||||
import Link from 'next/link';
|
||||
export default function Catalog({articles}){const [q,setQ]=useState(''),[topic,setTopic]=useState('Все');const topics=['Все',...new Set(articles.flatMap(a=>a.categories))];const shown=articles.filter(a=>(topic==='Все'||a.categories.includes(topic))&&(a.title+' '+a.excerpt+' '+a.categories.join(' ')).toLocaleLowerCase('ru').includes(q.toLocaleLowerCase('ru')));return <section id="catalog" className="articles-shell"><div className="articles-header"><div><p className="eyebrow">Восстановленные публикации</p><h2>Архив заметок</h2></div><span>{shown.length} из {articles.length}</span></div><div className="filters"><label htmlFor="search">Поиск по заголовкам и описаниям</label><input id="search" type="search" value={q} onChange={e=>setQ(e.target.value)} placeholder="Например: Bitrix, D, сертификат"/><div className="topics">{topics.map(t=><button aria-pressed={topic===t} key={t} onClick={()=>setTopic(t)}>{t}</button>)}</div></div><p aria-live="polite" className="result-count">{shown.length ? `Найдено: ${shown.length}`:'Ничего не найдено. Попробуйте другой запрос или тему.'}</p><div className="article-grid">{shown.map(a=><Link className="article-card" key={a.slug} href={'/articles/'+encodeURIComponent(a.slug)+'/'}><div className="card-topic">{a.categories[0]} <span>↗</span></div><div className="article-card__body"><div className="meta-line"><time dateTime={a.date}>{new Intl.DateTimeFormat('ru-RU',{year:'numeric',month:'long',day:'numeric',timeZone:'UTC'}).format(new Date(a.date))}</time><span>{a.readingMinutes} мин</span></div><h3>{a.title}</h3><p>{a.excerpt.slice(0,170)}…</p></div></Link>)}</div></section>}
|
||||
export default function Catalog({articles}){const [q,setQ]=useState(''),[topic,setTopic]=useState('Все');const topics=['Все',...new Set(articles.flatMap(a=>a.categories))];const shown=articles.filter(a=>(topic==='Все'||a.categories.includes(topic))&&(a.title+' '+a.excerpt+' '+a.categories.join(' ')).toLocaleLowerCase('ru').includes(q.toLocaleLowerCase('ru')));return <section id="journal" className="journal"><div className="journal-heading"><div><p className="kicker">ПОЛНЫЙ ИНДЕКС</p><h2>Статьи и заметки</h2></div><span>{articles.length} материалов</span></div><div className="catalog-controls"><label htmlFor="search"><span>Найти в журнале</span><input id="search" type="search" value={q} onChange={e=>setQ(e.target.value)} placeholder="Тема, язык или задача"/></label><div className="topic-tabs" aria-label="Темы">{topics.map(t=><button aria-pressed={topic===t} key={t} onClick={()=>setTopic(t)}>{t}</button>)}</div></div><p role="status" className="search-status">{shown.length?`Найдено материалов: ${shown.length}`:'По этому запросу ничего нет. Попробуйте другое слово или сбросьте тему.'}</p><div className="journal-list">{shown.map(a=><article key={a.slug} className="index-entry"><div className="index-date"><time dateTime={a.date}>{new Intl.DateTimeFormat('ru-RU',{year:'numeric',month:'short',day:'numeric',timeZone:'UTC'}).format(new Date(a.date))}</time><span>{a.categories.join(' · ')}</span></div><Link href={'/articles/'+encodeURIComponent(a.slug)+'/'}><h3>{a.title}</h3><p>{a.excerpt}</p></Link><span className="index-duration">{a.readingMinutes} мин <b aria-hidden="true">↗</b></span></article>)}</div>{!shown.length&&<button onClick={()=>{setQ('');setTopic('Все');}}>Сбросить поиск</button>}</section>}
|
||||
@@ -0,0 +1,4 @@
|
||||
"use client";
|
||||
import {useEffect} from 'react';
|
||||
import links from '../data/shortlinks.json';
|
||||
export default function Shortlinks(){useEffect(()=>{const id=new URLSearchParams(location.search).get('p');if(id&&links[id])location.replace(links[id]);},[]);return null;}
|
||||
@@ -1,8 +1,12 @@
|
||||
import ArticlePage,{generateMetadata as metadata} from '../articles/[slug]/page';
|
||||
import {getArticles} from '../../lib/articles';
|
||||
import Link from 'next/link';
|
||||
import {notFound} from 'next/navigation';
|
||||
import ArticlePage,{generateMetadata as articleMetadata} from '../articles/[slug]/page';
|
||||
import About from '../about/page';
|
||||
import Resources from '../resources/page';
|
||||
import routes from '../../data/archive-routes.json';
|
||||
import {getArticles,formatDate} from '../../lib/articles';
|
||||
export const dynamicParams=false;
|
||||
export function generateStaticParams(){return getArticles().map(a=>({path:a.legacyPath.split('/').filter(Boolean)}));}
|
||||
async function lookup(params){const {path}=await params;const a=getArticles().find(a=>a.legacyPath==='/'+path.map(decodeURIComponent).join('/')+'/');if(!a)notFound();return {slug:a.slug};}
|
||||
export async function generateMetadata({params}){return metadata({params:Promise.resolve(await lookup(params))});}
|
||||
export default async function Legacy({params}){return ArticlePage({params:Promise.resolve(await lookup(params))});}
|
||||
export function generateStaticParams(){return Object.keys(routes).map(p=>({path:p.split('/').filter(Boolean)}));}
|
||||
async function lookup(params){const {path}=await params;const route=routes['/'+path.map(decodeURIComponent).join('/')];if(!route)notFound();return route;}
|
||||
export async function generateMetadata({params}){const r=await lookup(params);if(r.type==='article')return articleMetadata({params:Promise.resolve({slug:r.slug})});return {title:(r.type==='index'?r.title:r.type==='about'?'О блоге':'Справочники')+' — ProgCode'};}
|
||||
export default async function Legacy({params}){const r=await lookup(params);if(r.type==='article')return ArticlePage({params:Promise.resolve({slug:r.slug})});if(r.type==='about')return About();if(r.type==='resources')return Resources();const articles=getArticles().filter(a=>r.slugs.includes(a.slug));return <main id="main" className="archive-page"><p className="kicker">ТЕМАТИЧЕСКИЙ ИНДЕКС</p><h1>{r.title}</h1><p className="large-text">Материалы по этой теме: {articles.length}. <Link href="/#journal">Перейти к поиску по всему журналу</Link>.</p><div className="journal-list">{articles.map(a=><article className="index-entry" key={a.slug}><div className="index-date"><time dateTime={a.date}>{formatDate(a.date)}</time><span>{a.categories.join(' · ')}</span></div><Link href={'/articles/'+encodeURIComponent(a.slug)+'/'}><h3>{a.title}</h3><p>{a.excerpt}</p></Link><span className="index-duration">{a.readingMinutes} мин ↗</span></article>)}</div></main>}
|
||||
@@ -1,3 +1,2 @@
|
||||
import {getArticles} from '../../lib/articles';
|
||||
export const metadata={title:'Источники и восстановление | ProgCode.Ru'};
|
||||
export default function About(){return <main className="article-page article-content"><p className="eyebrow">Прозрачный архив</p><h1>Что сохранено и откуда</h1><p>ProgCode.Ru — личный блог DarkRiDDeR о программировании. Восстановленная часть содержит 14 публикаций 2017–2019 годов: язык D, PHP, Bitrix, JavaScript и рабочие заметки Windows.</p><h2>Источники</h2><p>Использованы ранее сохранённые HTML-снимки Web Archive с метками 2017–2019 годов. Из оформления снимков 2022 года восстановлены 5 уникальных изображения (5 размещений). Встроенных иллюстраций отсутствует: 13. 26 октября 2026 года CDX повторно загружен и контрольный HTML-снимок получен; охват ограничен доступными локальными копиями, полного восстановления всего сайта мы не заявляем.</p><p>Текст извлечён из основного содержимого страницы. Комментарии, формы, старые скрипты, счётчики, встроенные плееры и исполняемые загрузки исключены. Сохранившиеся изображения размещены локально; отсутствующие не подменены выдуманными.</p><h2>Исторический контекст</h2><p>Это архив, а не актуальная документация. Примеры зависят от версий библиотек и ОС. Особенно осторожно следует относиться к старым выводам о безопасности. Новое редакционное дополнение к статье о TLS помечено отдельно и ссылается на справочник PHP.</p><h2>Новые возможности</h2><p>Поиск и фильтр тем, совместимость со старыми адресами, навигация и JSON-инструмент добавлены при восстановлении 26.10.2026. Сгенерированные редакционные публикации, включая будущие даты, не входят в этот архив.</p><h2>Реестр публикаций</h2><ul>{getArticles().map(a=><li key={a.slug}><a href={a.source}>{a.title}</a> — снимок {a.timestamp}</li>)}</ul><p>Машиночитаемый реестр, контрольные суммы и сохранённые исходники находятся в каталоге provenance репозитория.</p></main>}
|
||||
export const metadata={title:'О блоге — ProgCode'};
|
||||
export default function About(){return <main id="main" className="simple-page"><p className="kicker">PROGCODE.RU</p><h1>Блог одного<br/>программиста.</h1><p className="large-text">Здесь разбирают устройство инструментов, пишут небольшие функции и задают вопросы разработчикам.</p><div className="article-content"><h2>Что читать</h2><p>Основная коллекция — заметки DarkRiDDeR 2017–2019 годов о D, PHP, Bitrix, JavaScript и рабочем окружении. Среди них есть короткие рецепты, большой разбор сборщика мусора и интервью с создателем Tilix.</p><p>Технические примеры привязаны к контексту своих версий. Там, где старый совет мог привести к ошибке, текст уточнён. Интервью и переводы сохраняют авторство и ссылки на первичные публикации.</p><h2>Как ориентироваться</h2><p>Начните с <a href="/#journal">индекса статей</a>, выберите тему или задайте поиск. Для длинных разборов предусмотрено оглавление. В <a href="/resources/">справочниках</a> собраны первичные источники по темам блога, а <a href="/tools/">JSON-инструмент</a> помогает проверить ответ API.</p><h2>Автор и связь</h2><p>Автор исторических заметок подписывался DarkRiDDeR. Подтверждённый актуальный канал связи не указан; старые формы отправки сообщений больше не используются.</p></div></main>}
|
||||
@@ -1,62 +1,6 @@
|
||||
import Link from 'next/link';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { formatDate, getArticleBySlug, getArticles } from '../../../lib/articles';
|
||||
|
||||
export function generateStaticParams() {
|
||||
return getArticles().map((article) => ({ slug: article.slug }));
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }) {
|
||||
const { slug } = await params;
|
||||
const article = getArticleBySlug(decodeURIComponent(slug));
|
||||
|
||||
if (!article) {
|
||||
return { title: 'Статья не найдена' };
|
||||
}
|
||||
|
||||
return {
|
||||
title: `${article.title} | ProgCode.Ru`,
|
||||
description: article.excerpt,
|
||||
alternates: { canonical: `/articles/${encodeURIComponent(article.slug)}/` },
|
||||
};
|
||||
}
|
||||
|
||||
export default async function ArticlePage({ params }) {
|
||||
const { slug } = await params;
|
||||
const article = getArticleBySlug(decodeURIComponent(slug));
|
||||
|
||||
if (!article) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<main>
|
||||
<article className="article-page">
|
||||
<nav className="top-nav" aria-label="Навигация">
|
||||
<Link href="/">Все статьи</Link>
|
||||
</nav>
|
||||
|
||||
<header className="article-hero">
|
||||
<div className="article-hero__text">
|
||||
<div className="meta-line">
|
||||
<time dateTime={article.date}>{formatDate(article.date)}</time>
|
||||
<span>{article.author}</span>
|
||||
<span>{article.readingMinutes} мин</span>
|
||||
</div>
|
||||
<h1>{article.title}</h1>
|
||||
<div className="tag-list">
|
||||
{article.categories.map((category) => (
|
||||
<span key={category}>{category}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<aside className="archive-note"><strong>Архивная публикация {article.date.slice(0,4)} года.</strong> Код и версии могли устареть. Утверждения об отсутствии угроз в старых заметках не являются современной оценкой безопасности. <a href={article.source}>Снимок Web Archive ({article.timestamp.slice(0,4)}-{article.timestamp.slice(4,6)}-{article.timestamp.slice(6,8)})</a>. <Link href="/about/">Как восстановлен текст</Link>.</aside>
|
||||
{article.slug.startsWith('ошибка-php') && <aside className="archive-note">Исправление редакции, 26.10.2026: эта ошибка означает, что клиент не смог проверить цепочку доверия сертификата, а не обязательно отсутствие сертификата на сервере. Среди причин — отсутствующий CA bundle клиента или неполная цепочка сервера. Проверка TLS должна оставаться включённой. Настройка <code>curl.cainfo</code> задаёт абсолютный путь к доверенному CA bundle. <a href="https://www.php.net/manual/en/curl.configuration.php">Справочник PHP</a>; <a href="https://curl.se/libcurl/c/libcurl-errors.html">libcurl: ошибка 60</a>.</aside>}
|
||||
{article.slug.startsWith('вирус-') && <aside className="archive-note"><strong>Исправление редакции, 26.10.2026.</strong> Запуск браузера из планировщика — лишь один возможный механизм. Удаление задания не доказывает очистку системы, а оценка «никакой угрозы» из старого текста не обоснована. Перед изменениями экспортируйте подозрительное задание для анализа и выполните полную проверку актуальным защитным ПО. <a href="https://support.microsoft.com/en-us/windows/security/windows-security/stay-protected-with-the-windows-security-app">Microsoft: проверка с Windows Security</a>.</aside>}
|
||||
<div className="article-content" dangerouslySetInnerHTML={{ __html: article.contentHtml }} />
|
||||
</article>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
import {notFound} from 'next/navigation';
|
||||
import {getArticles,getArticleBySlug,formatDate} from '../../../lib/articles';
|
||||
export function generateStaticParams(){return getArticles().map(a=>({slug:a.slug}));}
|
||||
export async function generateMetadata({params}){const {slug}=await params;const a=getArticleBySlug(decodeURIComponent(slug));return a?{title:a.title+' — ProgCode',description:a.excerpt,alternates:{canonical:'/articles/'+encodeURIComponent(a.slug)+'/'}}:{title:'Статья не найдена'};}
|
||||
export default async function Article({params}){const {slug}=await params;const a=getArticleBySlug(decodeURIComponent(slug));if(!a)notFound();const related=getArticles().filter(x=>x.slug!==a.slug&&x.categories.some(c=>a.categories.includes(c))).slice(0,3);return <main id="main" className="article-shell"><nav className="breadcrumbs" aria-label="Путь"><Link href="/#journal">Журнал</Link><span>/</span><span>{a.categories.join(' · ')}</span></nav><header className="article-header"><p className="kicker">{a.categories.join(' / ')}</p><h1>{a.title}</h1><p className="article-deck">{a.excerpt}</p><div className="article-meta"><time dateTime={a.date}>{formatDate(a.date)}</time><span>{a.readingMinutes} мин чтения</span><span>{a.author}</span></div></header><div className="reading-layout">{a.toc?.length>1&&<aside className="contents-rail"><details open><summary>В этой статье</summary><nav aria-label="Оглавление статьи">{a.toc.map((s,i)=><a key={s.id} href={'#'+s.id}><span>{String(i+1).padStart(2,'0')}</span>{s.title}</a>)}</nav></details></aside>}<div className="reading-column"><div className="article-content" dangerouslySetInnerHTML={{__html:a.contentHtml}}/><div className="article-end"><span>КОНЕЦ ЗАМЕТКИ</span><a href="#main">↑ В начало</a></div>{related.length>0&&<section className="related"><p className="kicker">ПРОДОЛЖИТЬ ЧТЕНИЕ</p>{related.map(x=><Link key={x.slug} href={'/articles/'+encodeURIComponent(x.slug)+'/'}>{x.title}<span>↗</span></Link>)}</section>}</div></div></main>}
|
||||
@@ -1,330 +1,6 @@
|
||||
:root {
|
||||
--bg: #f3f0e8;
|
||||
--paper: #fffdfa;
|
||||
--ink: #1e252d;
|
||||
--muted: #64707d;
|
||||
--line: #d8d0c2;
|
||||
--accent: #216869;
|
||||
--accent-2: #b4432a;
|
||||
--code: #111827;
|
||||
}
|
||||
:root{--paper:#f6f4ef;--white:#fffefa;--ink:#242521;--muted:#6e7168;--line:#d8d8cd;--accent:#b84927;--soft:#eae7de;--code:#202621}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:92px}body{margin:0;color:var(--ink);background:var(--paper);font-family:Arial,Helvetica,sans-serif;line-height:1.6}a{color:inherit;text-underline-offset:4px}button,input,textarea{font:inherit}button,a,input,textarea,summary{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,pre:focus-visible{outline:3px solid var(--accent);outline-offset:4px}img{max-width:100%;height:auto;display:block}h1,h2,h3,p{margin-top:0}h1,h2,h3{line-height:1.12}button{border:1px solid var(--line);padding:9px 14px;background:transparent;color:var(--ink);border-radius:3px}.button{display:inline-flex;align-items:center;justify-content:center;background:var(--ink);color:var(--white);padding:12px 20px;border:1px solid var(--ink);text-decoration:none;font-weight:700;border-radius:3px}.button:hover{background:var(--accent);border-color:var(--accent)}.skip-link{position:absolute;left:16px;top:-80px;z-index:30;background:var(--ink);color:#fff;padding:12px}.skip-link:focus{top:10px}.masthead{max-width:1264px;margin:auto;min-height:88px;padding:16px 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ink);gap:24px}.wordmark{text-decoration:none;font-size:32px;font-weight:900;letter-spacing:-1.8px;line-height:1}.wordmark span{font-weight:400}.wordmark i{font-style:normal;color:var(--accent)}.masthead nav{display:flex;gap:28px;align-items:center;font-size:14px}.masthead nav a{text-decoration:none}.masthead nav a:hover{color:var(--accent)}.edition{font:11px monospace;letter-spacing:1px;color:var(--muted)}main{max-width:1200px;margin:auto}.kicker{font:700 11px/1.5 Arial,sans-serif;letter-spacing:1.5px;color:var(--accent);margin-bottom:16px}.intro{padding:58px 0 42px;display:flex;align-items:flex-end;justify-content:space-between;gap:40px}.intro h1{font-size:clamp(36px,4.2vw,62px);letter-spacing:-2.5px;margin-bottom:0}.intro h1 em{font-style:normal;color:var(--accent)}.intro-deck{font-size:16px;line-height:1.7;color:var(--muted);max-width:350px;margin-bottom:5px}.front-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:40px;border-top:1px solid var(--line);padding-top:28px}.lead-story{text-decoration:none;background:#e9e5d9;border:1px solid #d9d4c7;border-radius:4px;padding:30px 32px;display:flex;flex-direction:column}.story-meta{display:flex;justify-content:space-between;gap:10px;font:10px monospace;letter-spacing:1px;color:#706e63;margin-bottom:26px}.lead-story h2{font-size:clamp(28px,3vw,42px);letter-spacing:-1.4px;margin-bottom:17px}.lead-story>p{font-size:16px;color:#565b51;max-width:480px;line-height:1.6}.lead-visual{margin:20px -8px 26px}.lead-visual img{width:100%;max-height:280px;object-fit:contain}.text-link{display:flex;justify-content:space-between;font-size:14px;font-weight:700;margin-top:auto;border-top:1px solid #cbc8bb;padding-top:16px}.text-link b{color:var(--accent);font-size:22px}.section-title{border-bottom:2px solid var(--ink);padding-bottom:16px}.section-title .kicker{margin-bottom:8px}.section-title h2{font-size:25px;letter-spacing:-.6px;margin:0}.recipe{display:flex;gap:15px;border-bottom:1px solid var(--line);padding:22px 0;text-decoration:none;align-items:flex-start}.recipe-number{font:12px monospace;color:var(--muted);padding-top:3px}.tiny-topic{font:10px monospace;letter-spacing:.8px;color:var(--accent)}.recipe h3{font-size:19px;line-height:1.3;margin:6px 0 0;font-weight:600}.recipe>b{margin-left:auto;font-size:22px;color:var(--accent)}.recipe:hover h3,.index-entry a:hover h3{color:var(--accent)}.reading-routes{margin-top:58px;border-top:1px solid var(--ink);padding:24px 0 36px}.reading-routes>div{display:grid;grid-template-columns:repeat(3,1fr);gap:30px}.reading-routes a{text-decoration:none;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:9px;padding-right:24px}.reading-routes a:last-child{border:0}.reading-routes a>span{font:11px monospace;color:var(--muted)}.reading-routes strong{font-size:20px;line-height:1.25}.reading-routes small{font-size:13px;color:var(--muted)}.journal{padding:40px 0 56px;border-top:1px solid var(--ink)}.journal-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:25px}.journal-heading h2{font-size:38px;letter-spacing:-1px;margin:0}.journal-heading>span{font:12px monospace;color:var(--muted)}.catalog-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;background:var(--soft);padding:24px}.catalog-controls label{flex:1;max-width:390px}.catalog-controls label>span{display:block;font-size:12px;margin-bottom:8px}input{width:100%;background:var(--white);border:1px solid #a7aa9c;padding:12px;color:var(--ink);border-radius:2px}.topic-tabs{display:flex;flex-wrap:wrap;gap:7px}Line truncated
|
||||
@media(min-width:1600px){main{max-width:1200px}}@media(max-width:1280px){main{margin:0 32px}.article-header{margin-left:220px}.reading-layout{grid-template-columns:185px minmax(0,1fr);gap:35px}.reading-layout:has(>.reading-column:first-child){margin-left:220px}.simple-page{margin-left:auto;margin-right:auto;padding-left:25px;padding-right:25px}}@media(max-width:950px){.edition{display:none}.front-grid{grid-template-columns:1.2fr 1fr;gap:25px}.lead-story{padding:25px}.recipe h3{font-size:17px}.intro-deck{max-width:280px;font-size:14px}.catalog-controls{flex-direction:column;align-items:stretch;gap:18px}.catalog-controls label{max-width:none}.article-header{margin-left:0;max-width:820px}.reading-layout{display:block}.reading-layout:has(>.reading-column:first-child){margin-left:0}.contents-rail{position:static;max-height:none;max-width:810px;padding:15px 20px;background:var(--soft);margin-bottom:30px}.contents-rail nav{display:grid;grid-template-columns:1fr 1fr;gap:0 25px}.contents-rail details summary{padding-bottom:10px}.footer{grid-template-columns:1fr 1.5fr 1fr}.footer>span{display:none}.workbench{gap:20px}.index-entry{grid-template-columns:140px 1fr 70px;gap:20px}.article-content{font-size:17px}}
|
||||
@media(max-width:650px){html{scroll-padding-top:20px}.masthead{margin:0 20px;padding:20px 0;gap:20px;flex-wrap:wrap;min-height:108px}.wordmark{font-size:30px}.masthead nav{gap:22px;width:100%;font-size:12px;justify-content:space-between}.masthead nav a{white-space:nowrap}main{margin:0 20px}.intro{padding:35px 0 28px;display:block}.intro h1{font-size:41px;letter-spacing:-1.8px}.intro-deck{max-width:none;font-size:14px;margin:23px 0 0}.intro-deck br{display:none}.kicker{font-size:10px;letter-spacing:1.2px}.front-grid{display:block;padding-top:20px}.lead-story{padding:22px}.story-meta{font-size:8px;margin-bottom:22px;letter-spacing:.8px}.lead-story h2{font-size:29px;letter-spacing:-1px}.lead-story>p{font-size:14px}.lead-visual{margin:15px -12px 20px}.lead-visual img{max-height:none}.text-link{font-size:12px}.recipe-column{margin-top:30px}.section-title h2{font-size:25px}.recipe{padding:18px 0}.recipe h3{font-size:19px}.reading-routes{margin-top:35px;padding-top:20px}.reading-routes>div{display:block}.reading-routes a{border-right:0;border-bottom:1px solid var(--line);padding:17px 0;gap:7px}.reading-routes strong{font-size:20px}.journal{padding-top:28px;padding-bottom:35px}.journal-heading{display:block}.journal-heading h2{font-size:30px;margin-bottom:14px}.journal-heading>span{font-size:11px}.catalog-controls{padding:18px;margin:0 -4px}.topic-tabs{gap:6px}.topic-tabs button{font-size:12px;padding:8px 11px}.index-entry{grid-template-columns:1fr 55px;gap:10px;padding:22px 0}.index-date{grid-column:1/-1;display:flex;justify-content:space-between;gap:15px;font-size:10px;padding:0}.index-date span{display:inline;margin:0;font-size:10px}.index-entry h3{font-size:20px;line-height:1.3;margin:0 0 10px}.index-entry p{font-size:13px;line-height:1.6}.index-duration{font-size:10px;display:block;text-align:right;padding-top:6px}.index-duration b{display:block;font-size:23px;padding-top:15px}.utility-promo{display:block;padding:25px;margin-bottom:35px}.utility-promo h2{font-size:29px}.utility-promo p{font-size:14px}.utility-promo .button{font-size:12px;margin-top:25px}.footer{margin:0 20px;padding:28px 0;grid-template-columns:1fr 1fr;gap:22px}.footer>p{grid-column:1}.footer>div{grid-column:2;grid-row:1/3;font-size:12px}.footer .wordmark{font-size:24px}.breadcrumbs{font-size:10px;padding:22px 0;gap:10px}.article-header{margin:12px 0 26px}.article-header h1{font-size:34px;letter-spacing:-1px;line-height:1.13;margin-bottom:20px}.article-deck{font-size:18px;line-height:1.5;margin-bottom:20px}.article-meta{font-size:10px;gap:8px 15px;padding-top:13px}.contents-rail{padding:13px 16px;margin:0 0 25px}.contents-rail nav{display:flex;gap:0}.contents-rail nav a{padding:7px 0;font-size:12px}.article-content{font-size:17px;line-height:1.75}.article-content h2{font-size:25px;margin:36px 0 18px;line-height:1.25;letter-spacing:-.4px}.article-content h3{font-size:20px;margin-top:28px}.article-content pre{font-size:12px;padding:20px 18px;margin:24px -4px;max-width:calc(100% + 8px)}.article-content figure{margin:25px -4px;padding:10px}.article-content figcaption{font-size:11px;line-height:1.6;padding-top:10px;margin-top:10px}.article-content blockquote{padding-left:18px;margin:20px 0}.article-end{font-size:10px}.related{padding:20px}.related a{font-size:17px}.reading-layout{padding-bottom:35px}.simple-page{margin:0;padding:35px 20px 50px;max-width:none}.simple-page h1,.tool-page h1{font-size:43px;letter-spacing:-1.6px}.large-text{font-size:20px;line-height:1.6;margin-bottom:35px}.tool-page{padding:35px 0 50px}.tool-heading p:not(.kicker){font-size:15px}.workbench{grid-template-columns:1fr;gap:28px}.workbench textarea{min-height:260px;font-size:13px;padding:16px}.result-panel{min-height:280px;padding:0 18px 18px}.result-panel pre{font-size:13px;min-height:150px}.tool-actions{gap:7px}.tool-actions button{font-size:12px;padding:10px 13px}.field-note{font-size:10px;line-height:1.5}.tool-notes{margin-top:30px;font-size:14px}.missing{padding:45px 0 65px}.missing h1{font-size:34px}.missing>p:not(.kicker){font-size:14px}.missing-code{font-size:70px}.archive-page{padding:35px 0}.archive-page h1{font-size:37px}.archive-page>.large-text{font-size:18px}.resource-groups section>h2{font-size:25px}.resource-groups h3{font-size:18px}}
|
||||
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.site-hero {
|
||||
min-height: 360px;
|
||||
background:
|
||||
linear-gradient(90deg, rgba(20, 24, 28, 0.86), rgba(20, 24, 28, 0.35)),
|
||||
linear-gradient(120deg,#152c31,#216869);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.site-hero__inner {
|
||||
width: min(1120px, calc(100% - 40px));
|
||||
margin: 0 auto;
|
||||
padding: 72px 0 46px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin: 0 0 10px;
|
||||
color: var(--accent-2);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.site-hero .eyebrow {
|
||||
color: #f5b08c;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
line-height: 1.15;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.site-hero h1 {
|
||||
font-size: clamp(44px, 8vw, 82px);
|
||||
}
|
||||
|
||||
.site-description {
|
||||
max-width: 680px;
|
||||
margin: 18px 0 0;
|
||||
color: #e5e7eb;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.articles-shell {
|
||||
width: min(1120px, calc(100% - 32px));
|
||||
margin: 34px auto 64px;
|
||||
}
|
||||
|
||||
.articles-header,
|
||||
.top-nav,
|
||||
.meta-line,
|
||||
.tag-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.articles-header {
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.articles-header h2 {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.articles-header > span,
|
||||
.meta-line {
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.article-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.article-card {
|
||||
min-height: 100%;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper);
|
||||
text-decoration: none;
|
||||
transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
|
||||
}
|
||||
|
||||
.article-card:hover {
|
||||
border-color: #9f8f7a;
|
||||
box-shadow: 0 12px 30px rgba(39, 33, 25, 0.12);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.article-card > img {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
object-fit: cover;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.article-card__body {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.article-card h3 {
|
||||
margin-top: 10px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.article-card p {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.tag-list span {
|
||||
border: 1px solid #c5bba9;
|
||||
border-radius: 999px;
|
||||
padding: 4px 10px;
|
||||
background: #f8f5ee;
|
||||
color: #5c4a37;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.article-page {
|
||||
width: min(1040px, calc(100% - 32px));
|
||||
margin: 0 auto 72px;
|
||||
}
|
||||
|
||||
.top-nav {
|
||||
padding: 22px 0;
|
||||
}
|
||||
|
||||
.top-nav a {
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.article-hero {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
|
||||
gap: 28px;
|
||||
align-items: center;
|
||||
padding: 28px 0 34px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.article-hero h1 {
|
||||
margin: 14px 0 18px;
|
||||
font-size: clamp(34px, 6vw, 58px);
|
||||
}
|
||||
|
||||
.article-hero > img {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
max-width: 820px;
|
||||
margin: 34px auto 0;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.article-content h2 {
|
||||
margin: 42px 0 14px;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.article-content h3 {
|
||||
margin: 34px 0 12px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.article-content p,
|
||||
.article-content ul,
|
||||
.article-content ol {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
.article-content a {
|
||||
color: var(--accent);
|
||||
text-decoration-thickness: 1px;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
.article-content figure {
|
||||
margin: 28px 0;
|
||||
}
|
||||
|
||||
.article-content figure img {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.article-content figcaption {
|
||||
margin-top: 8px;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.article-content .table-scroll {
|
||||
overflow-x: auto;
|
||||
margin: 28px 0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper);
|
||||
}
|
||||
|
||||
.article-content table {
|
||||
width: 100%;
|
||||
min-width: 620px;
|
||||
border-collapse: collapse;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.article-content th,
|
||||
.article-content td {
|
||||
padding: 14px 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.article-content th {
|
||||
background: #f0ece2;
|
||||
color: #443a2d;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.article-content tr:last-child td {
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.article-content pre {
|
||||
overflow-x: auto;
|
||||
border-radius: 8px;
|
||||
margin: 26px 0;
|
||||
padding: 18px 20px;
|
||||
background: var(--code);
|
||||
color: #e5e7eb;
|
||||
font-size: 15px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.article-content code {
|
||||
font-family: SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.article-content :not(pre) > code {
|
||||
border-radius: 4px;
|
||||
padding: 2px 5px;
|
||||
background: #ede6da;
|
||||
color: #663c1f;
|
||||
font-size: 0.92em;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.site-hero {
|
||||
min-height: 320px;
|
||||
}
|
||||
|
||||
.site-description {
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.article-hero {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.article-content {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* Документация Bitrix и имена API часто содержат длинные неразрывные токены. */
|
||||
.article-hero h1,
|
||||
.article-content h2,
|
||||
.article-content h3,
|
||||
.article-content :not(pre) > code,
|
||||
.article-content a {
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
}
|
||||
|
||||
/* Restoration navigation and accessible tools */
|
||||
html{scroll-behavior:smooth} .masthead{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px max(20px,calc((100vw - 1120px)/2));background:#fffdfa;border-bottom:1px solid var(--line)} .brand{font-size:23px;font-weight:800;text-decoration:none;white-space:nowrap}.brand span{color:var(--accent)}.masthead nav{display:flex;gap:22px;flex-wrap:wrap;font-size:14px}.masthead nav a{text-decoration:none}.site-hero{background:#152c31;position:relative;min-height:420px;align-items:center;overflow:hidden}.site-hero__inner{position:relative;z-index:1}.site-hero h1{font-size:clamp(40px,6vw,70px);max-width:650px}.site-description{max-width:640px;font-size:18px}.hero-link{display:inline-block;margin-top:26px;color:#a7ddd5}.hero-code{position:absolute;right:max(36px,calc((100vw - 1120px)/2));font:22px/1.9 monospace;color:#9ac5bc;opacity:.5;transform:rotate(-5deg)}.hero-code span{color:#e7c995}.site-hero__inner{padding:55px 0}.filters{background:var(--paper);padding:22px;border:1px solid var(--line);border-radius:8px}.filters label{display:block;font-size:14px;margin-bottom:8px}input,textarea{font:inherit;width:100%;background:white;border:1px solid #8c9998;border-radius:4px;padding:13px;color:var(--ink)}.topics{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}button{font:inherit;cursor:pointer;border:1px solid #9bafaa;background:#fffdfa;color:#1e4440;padding:8px 16px;border-radius:5px}button[aria-pressed=true],button:hover{background:var(--accent);color:white}a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #c2732c;outline-offset:4px}.result-count{font-size:14px;color:var(--muted)}.article-card{text-decoration:none;box-shadow:none;transition:transform .15s}.article-card:hover{transform:translateY(-3px);border-color:var(--accent)}.card-topic{background:#e2ebe6;color:#24514b;padding:18px 22px;font:700 18px monospace;display:flex;justify-content:space-between;border-bottom:1px solid var(--line)}.card-topic span{color:#768c82}.article-card h3{font-size:22px}.article-card__body p{font-size:15px}.archive-note{padding:20px;background:#edf2ed;border-left:4px solid var(--accent);margin:24px 0;font-size:15px}.article-hero>img{display:none}.article-hero{display:block}.article-content{overflow-wrap:anywhere}.article-content h1{font-size:clamp(30px,5vw,52px);margin-bottom:24px}.article-content pre{max-width:100%;overflow:auto}.article-content img{height:auto}.article-content table{display:block;overflow:auto}.footer{padding:30px max(20px,calc((100vw - 1120px)/2));border-top:1px solid var(--line);font-size:14px;color:var(--muted)}.footer p{font-size:12px}textarea{display:block;min-height:240px;font:15px/1.6 monospace;margin:10px 0}pre.error{background:#5e2020} .article-page{min-width:0}
|
||||
@media(max-width:850px){.hero-code{display:none}.masthead{align-items:flex-start;flex-direction:column;gap:12px}.masthead nav{gap:16px}.article-grid{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr))}.site-hero{min-height:360px}.article-page{width:calc(100% - 32px)}}
|
||||
|
||||
.article-content table{min-width:0;max-width:100%;width:100%}.article-content td,.article-content th{min-width:120px}.article-content pre{min-width:0}.article-content figure{margin:28px 0}.article-content figcaption{font-size:13px;color:var(--muted);margin-top:8px}
|
||||
.article-content .table-scroll{max-width:100%;overflow:auto;margin:25px 0;border:1px solid var(--line);border-radius:3px}.article-content .table-scroll:focus-visible{outline:3px solid var(--accent);outline-offset:4px}.article-content .table-scroll table{display:table;min-width:620px;max-width:none;width:100%;margin:0;overflow-wrap:normal}.article-content figure img[src$=".jpg"]{width:auto;max-width:100%;margin-inline:auto}
|
||||
@@ -1,4 +1,4 @@
|
||||
import './globals.css';
|
||||
import Link from 'next/link';
|
||||
export const metadata={metadataBase:new URL('https://progcode.ru'),icons:{icon:'/icon.svg'},title:'ProgCode.Ru — архив программиста',description:'Восстановленные заметки о D, PHP, Bitrix и JavaScript. Поиск по архиву и инструменты разработчика.'};
|
||||
export default function RootLayout({children}) {return <html lang="ru"><body><header className="masthead"><Link href="/" className="brand"></> ProgCode<span>.Ru</span></Link><nav aria-label="Основная навигация"><Link href="/">Архив</Link><Link href="/tools/">JSON-инструмент</Link><Link href="/about/">Об источниках</Link></nav></header>{children}<footer className="footer">ProgCode.Ru · Записки программиста с 2017 года · <Link href="/about/">Источники и восстановление</Link><p>Исторические публикации сохраняют контекст своего времени. Проверяйте версии перед использованием кода.</p></footer></body></html>}
|
||||
export const metadata={metadataBase:new URL('https://progcode.ru'),icons:{icon:'/icon.svg'},title:'ProgCode — записки о программировании',description:'D, PHP, Bitrix и JavaScript: разборы механизмов, рабочие рецепты и разговоры с разработчиками.'};
|
||||
export default function RootLayout({children}){return <html lang="ru"><body><a className="skip-link" href="#main">К содержанию</a><header className="masthead"><Link className="wordmark" href="/" aria-label="ProgCode — главная">prog<span>code</span><i>_</i></Link><nav aria-label="Главная навигация"><Link href="/#journal">Статьи</Link><Link href="/resources/">Справочники</Link><Link href="/tools/">JSON</Link><Link href="/about/">О блоге</Link></nav><span className="edition">D / PHP / WEB</span></header>{children}<footer className="footer"><Link className="wordmark" href="/">prog<span>code</span><i>_</i></Link><p>Заметки о том, как устроен код.<br/>D, PHP, Bitrix и веб-разработка.</p><div><Link href="/#journal">Все статьи</Link><Link href="/resources/">Полезные ссылки</Link><Link href="/tools/">JSON-инструмент</Link></div><span>Материалы 2017–2019</span></footer></body></html>}
|
||||
@@ -0,0 +1,2 @@
|
||||
import Link from 'next/link';
|
||||
export default function Missing(){return <main id="main" className="missing"><p className="kicker">ОШИБКА 404</p><div className="missing-code" aria-hidden="true">{ ? }</div><h1>Такой страницы нет.</h1><p>Возможно, в адресе опечатка или ссылка больше не существует.<br/>Попробуйте найти нужную тему в журнале.</p><Link className="button" href="/#journal">Перейти к поиску →</Link><Link href="/resources/">Открыть справочники</Link></main>}
|
||||
@@ -1,3 +1,5 @@
|
||||
import Link from 'next/link';
|
||||
import Catalog from './Catalog';
|
||||
import {getArticles} from '../lib/articles';
|
||||
export default function Home(){return <main><section className="site-hero"><div className="site-hero__inner"><p className="eyebrow">Код. Опыт. История.</p><h1>Записки<br/>программиста</h1><p className="site-description">D, PHP, Bitrix и JavaScript — практические задачи, небольшие открытия и архив разработки 2017–2019.</p><a className="hero-link" href="#catalog">Читать архив ↓</a></div><div className="hero-code" aria-hidden="true"><span>// знания остаются</span><br/>while (curious) {<br/> read();<br/> try();<br/> understand();<br/>}</div></section><Catalog articles={getArticles()}/></main>}
|
||||
import Shortlinks from './Shortlinks';
|
||||
import {getArticles,getArticleSummaries,formatDate} from '../lib/articles';
|
||||
export default function Home(){const all=getArticles(),lead=all.find(a=>a.slug==='новый-движок-ctfe'),recipes=all.filter(a=>a.categories.includes('Bitrix')||a.categories.includes('PHP')).slice(0,4);return <main id="main"><Shortlinks/><section className="intro"><div><p className="kicker">ЗАПИСКИ ПРОГРАММИСТА · 2017–2019</p><h1>Разобраться.<br/><em>Написать.</em> Проверить.</h1></div><p className="intro-deck">Что происходит во время компиляции? <br/>Как связаны товар и предложение? <br/>Здесь — механизмы, примеры и опыт разработки.</p></section><section className="front-grid" aria-label="С чего начать"><Link className="lead-story" href={'/articles/'+encodeURIComponent(lead.slug)+'/'}><div className="story-meta"><span>ВНУТРИ ЯЗЫКА D</span><span>01 / РАЗБОР</span></div><h2>Код, который работает<br/>до запуска программы</h2><p>Как CTFE выполняет функции на этапе компиляции и зачем D понадобился новый движок.</p><div className="lead-visual"><img src="/visuals/v2/ctfe-overview.svg" alt="Компилятор вычисляет square(3) для enum и получает n = 9 ещё до запуска программы"/></div><span className="text-link">Разобрать CTFE <b>↗</b></span></Link><div className="recipe-column"><div className="section-title"><p className="kicker">ПРАКТИКА</p><h2>Рецепты без лишнего</h2></div>{recipes.map((article,i)=><Link className="recipe" key={article.slug} href={'/articles/'+encodeURIComponent(article.slug)+'/'}><span className="recipe-number">0{i+1}</span><div><span className="tiny-topic">{article.categories.join(' / ')}</span><h3>{article.title}</h3></div><b aria-hidden="true">↗</b></Link>)}</div></section><section className="reading-routes" aria-label="Маршруты чтения"><p className="kicker">ВЫБЕРИТЕ ЗАДАЧУ</p><div><Link href="/category/dlang/"><span>01</span><strong>Понять язык D</strong><small>CTFE, память, диапазоны и интерфейсы →</small></Link><Link href="/category/bitix/"><span>02</span><strong>Собрать интеграцию Bitrix</strong><small>Товар, предложение, символьный код →</small></Link><Link href="/articles/ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate/"><span>03</span><strong>Разобраться с TLS</strong><small>Проверка сертификата без обхода защиты →</small></Link></div></section><Catalog articles={getArticleSummaries()}/><section className="utility-promo"><div><p className="kicker">НА РАБОЧЕМ СТОЛЕ</p><h2>Сначала проверьте JSON.</h2><p>Форматирование, поиск синтаксических ошибок и компактная запись — прямо в браузере.</p></div><Link className="button" href="/tools/">Открыть инструмент ↗</Link></section></main>}
|
||||
@@ -0,0 +1,3 @@
|
||||
export const metadata={title:'Справочники разработчика — ProgCode'};
|
||||
const sources=[['D','Язык, стандартная библиотека и инструменты',[['Спецификация D','https://dlang.org/spec/spec.html','Синтаксис, семантика и правила языка.'],['Стандартная библиотека Phobos','https://dlang.org/phobos/index.html','Контракты функций, модули и примеры.'],['DUB','https://dub.pm/','Сборка проектов и управление зависимостями.']]],['PHP','Функции и интеграции',[['Справочник PHP','https://www.php.net/manual/ru/','Функции, расширения и примеры использования.'],['API Bitrix','https://dev.1c-bitrix.ru/api_help/','Описание API и ограничений конкретных методов.']]],['Web','Сборка и безопасность',[['webpack: ProvidePlugin','https://webpack.js.org/plugins/provide-plugin/','Как автоматически подключать модуль для свободного идентификатора.'],['MDN: JSON.parse','https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse','Синтаксис JSON, ошибки разбора и точность чисел.'],['curl: проверка TLS','https://curl.se/docs/sslcerts.html','Цепочка доверия и безопасная диагностика сертификатов.']]]];
|
||||
export default function Resources(){return <main id="main" className="simple-page"><p className="kicker">ДЕРЖАТЬ ПОД РУКОЙ</p><h1>Сначала —<br/>первоисточник.</h1><p className="large-text">Справочники по темам журнала: для проверки версии API, поведения функции и границ примера.</p><div className="resource-groups">{sources.map(([topic,title,links])=><section key={topic}><p className="kicker">{topic}</p><h2>{title}</h2>{links.map(([name,href,text])=><a key={href} href={href}><h3>{name}<span>↗</span></h3><p>{text}</p></a>)}</section>)}</div></main>}
|
||||
@@ -1,3 +1,3 @@
|
||||
"use client";
|
||||
import {useState} from 'react';
|
||||
export default function Tools(){const [text,setText]=useState('{"hello":"ProgCode"}'),[result,setResult]=useState(''),[error,setError]=useState(false);function run(compact){try{setResult(JSON.stringify(JSON.parse(text),null,compact?0:2));setError(false);}catch(e){setResult('Ошибка JSON: '+e.message);setError(true);}}return <main className="article-page article-content"><p className="eyebrow">Инструменты разработчика</p><h1>Проверка и форматирование JSON</h1><p>Для отладки API в PHP, Bitrix и JavaScript. Введите JSON, чтобы проверить синтаксис, расставить отступы или получить компактную строку. Данные обрабатываются в браузере.</p><label htmlFor="json">Исходный JSON (до 1 МБ текста)</label><textarea id="json" maxLength={1000000} spellCheck={false} value={text} onChange={e=>setText(e.target.value)}/><div className="topics"><button onClick={()=>run(false)}>Проверить и форматировать</button><button onClick={()=>run(true)}>Сжать</button><button onClick={()=>{setText('');setResult('');}}>Очистить</button></div><pre role="status" className={error?'error':''}>{result||'Результат появится здесь'}</pre><h2>На что обратить внимание</h2><p>В JSON нужны двойные кавычки вокруг ключей и строк. Комментарии и запятая после последнего свойства не допускаются. Форматирование не проверяет бизнес-схему API. Числа за пределами безопасного диапазона JavaScript могут потерять точность; храните такие идентификаторы строками.</p><p>Новый инструмент, добавлен 26.10.2026. Основа: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse">MDN: JSON.parse</a>.</p></main>}
|
||||
export default function Tools(){const [text,setText]=useState('{"project":"ProgCode","ready":true}'),[result,setResult]=useState(''),[state,setState]=useState('empty'),[copy,setCopy]=useState('');function run(compact){setCopy('');try{setResult(JSON.stringify(JSON.parse(text),null,compact?0:2));setState('success');}catch(e){setResult(e.message);setState('error');}}async function copyResult(){try{await navigator.clipboard.writeText(result);setCopy('Скопировано');}catch{setCopy('Не удалось скопировать. Выделите текст результата вручную.');}}return <main id="main" className="tool-page"><div className="tool-heading"><p className="kicker">ИНСТРУМЕНТ РАЗРАБОТЧИКА</p><h1>Привести JSON <br/>в порядок.</h1><p>Проверьте синтаксис, расставьте отступы или уберите пробелы.<br/>Текст обрабатывается локально в вашем браузере.</p></div><div className="workbench"><section><label htmlFor="json">01 / Исходный JSON</label><textarea id="json" value={text} maxLength={1000000} spellCheck={false} onChange={e=>setText(e.target.value)} aria-describedby="json-limit"/><p id="json-limit" className="field-note">До 1 МБ текста. Исходный текст не отправляется на сервер.</p><div className="tool-actions"><button className="button" onClick={()=>run(false)}>Форматировать</button><button onClick={()=>run(true)}>Сжать</button><button onClick={()=>{setText('');setResult('');setState('empty');setCopy('');}}>Очистить</button></div></section><section className={'result-panel '+state}><div className="result-heading"><span>02 / Результат</span>{state==='success'&&<button onClick={copyResult}>Копировать</button>}</div><div role="status" aria-live="polite"><p className="result-label">{state==='error'?'Ошибка синтаксиса':state==='success'?'JSON корректен':'Ожидает проверки'}</p><pre tabIndex={0}>{result||'Результат появится после проверки.'}</pre></div><p role="status" className="copy-feedback">{copy}</p></section></div><div className="tool-notes"><h2>Синтаксис — только первый шаг.</h2><p>Ключи и строки требуют двойных кавычек. Комментарии и завершающие запятые не поддерживаются. Проверка не подтверждает соответствие схеме API. Большие целые числа могут терять точность в JavaScript: такие идентификаторы лучше хранить строками.</p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse">Правила JSON.parse в MDN ↗</a></div></main>}
|
||||
@@ -0,0 +1,432 @@
|
||||
{
|
||||
"/2019/01/12/использование-jquery-в-webpack": {
|
||||
"type": "article",
|
||||
"slug": "использование-jquery-в-webpack"
|
||||
},
|
||||
"/2018/10/19/bitrix-api-add-foto-editor": {
|
||||
"type": "article",
|
||||
"slug": "bitrix-api-add-foto-editor"
|
||||
},
|
||||
"/2017/08/25/о-tilix-и-d-интервью-с-геральдом-нанном": {
|
||||
"type": "article",
|
||||
"slug": "о-tilix-и-d-интервью-с-геральдом-нанном"
|
||||
},
|
||||
"/2017/08/15/bitrix-api-функция-для-генерации-кода-элемент": {
|
||||
"type": "article",
|
||||
"slug": "bitrix-api-функция-для-генерации-кода-элемент"
|
||||
},
|
||||
"/2017/08/14/bitrix-api-создание-добавление-торгового-пре": {
|
||||
"type": "article",
|
||||
"slug": "bitrix-api-создание-добавление-торгового-пре"
|
||||
},
|
||||
"/2017/08/04/firefox-увеличение-ожидания-загрузки-timeout-стр": {
|
||||
"type": "article",
|
||||
"slug": "firefox-увеличение-ожидания-загрузки-timeout-стр"
|
||||
},
|
||||
"/2017/07/12/ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate": {
|
||||
"type": "article",
|
||||
"slug": "ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate"
|
||||
},
|
||||
"/2017/06/24/dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол": {
|
||||
"type": "article",
|
||||
"slug": "dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол"
|
||||
},
|
||||
"/2017/06/17/пишем-аналог-функции-php-preg_match_all-на-языке-прог": {
|
||||
"type": "article",
|
||||
"slug": "пишем-аналог-функции-php-preg_match_all-на-языке-прог"
|
||||
},
|
||||
"/2017/05/26/новый-движок-ctfe": {
|
||||
"type": "article",
|
||||
"slug": "новый-движок-ctfe"
|
||||
},
|
||||
"/2017/05/23/особенности-vibe-d": {
|
||||
"type": "article",
|
||||
"slug": "особенности-vibe-d"
|
||||
},
|
||||
"/2017/05/20/вирус-самопроизвольный-запуск-брауз": {
|
||||
"type": "article",
|
||||
"slug": "вирус-самопроизвольный-запуск-брауз"
|
||||
},
|
||||
"/2017/05/04/компиляция-64-x-разрядных-программ-на-dmd-по": {
|
||||
"type": "article",
|
||||
"slug": "компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
},
|
||||
"/2017/05/03/привет-мир": {
|
||||
"type": "article",
|
||||
"slug": "привет-мир"
|
||||
},
|
||||
"/контакты": {
|
||||
"type": "about"
|
||||
},
|
||||
"/полезные-ссылки": {
|
||||
"type": "resources"
|
||||
},
|
||||
"/2017/05": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2017 · 05",
|
||||
"slugs": [
|
||||
"новый-движок-ctfe",
|
||||
"особенности-vibe-d",
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по",
|
||||
"привет-мир"
|
||||
]
|
||||
},
|
||||
"/2017/06": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2017 · 06",
|
||||
"slugs": [
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог"
|
||||
]
|
||||
},
|
||||
"/2017/07": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2017 · 07",
|
||||
"slugs": [
|
||||
"ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate"
|
||||
]
|
||||
},
|
||||
"/2017/08": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2017 · 08",
|
||||
"slugs": [
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре",
|
||||
"firefox-увеличение-ожидания-загрузки-timeout-стр"
|
||||
]
|
||||
},
|
||||
"/2018/10": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2018 · 10",
|
||||
"slugs": [
|
||||
"bitrix-api-add-foto-editor"
|
||||
]
|
||||
},
|
||||
"/2019/01": {
|
||||
"type": "index",
|
||||
"title": "Статьи за 2019 · 01",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/author/darkridder": {
|
||||
"type": "index",
|
||||
"title": "DarkRiDDeR",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack",
|
||||
"bitrix-api-add-foto-editor",
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре",
|
||||
"firefox-увеличение-ожидания-загрузки-timeout-стр",
|
||||
"ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate",
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог",
|
||||
"новый-движок-ctfe",
|
||||
"особенности-vibe-d",
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по",
|
||||
"привет-мир"
|
||||
]
|
||||
},
|
||||
"/author/darkridder/page/2": {
|
||||
"type": "index",
|
||||
"title": "DarkRiDDeR",
|
||||
"slugs": [
|
||||
"особенности-vibe-d",
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по",
|
||||
"привет-мир"
|
||||
]
|
||||
},
|
||||
"/category/без-рубрики": {
|
||||
"type": "index",
|
||||
"title": "без рубрики",
|
||||
"slugs": [
|
||||
"привет-мир"
|
||||
]
|
||||
},
|
||||
"/category/вирусы": {
|
||||
"type": "index",
|
||||
"title": "вирусы",
|
||||
"slugs": [
|
||||
"вирус-самопроизвольный-запуск-брауз"
|
||||
]
|
||||
},
|
||||
"/category/интернет": {
|
||||
"type": "index",
|
||||
"title": "интернет",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack",
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре",
|
||||
"firefox-увеличение-ожидания-загрузки-timeout-стр",
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/category/bitix": {
|
||||
"type": "index",
|
||||
"title": "bitix",
|
||||
"slugs": [
|
||||
"bitrix-api-add-foto-editor",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре"
|
||||
]
|
||||
},
|
||||
"/category/dlang": {
|
||||
"type": "index",
|
||||
"title": "dlang",
|
||||
"slugs": [
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог",
|
||||
"новый-движок-ctfe",
|
||||
"особенности-vibe-d",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/category/dmd": {
|
||||
"type": "index",
|
||||
"title": "dmd",
|
||||
"slugs": [
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"новый-движок-ctfe",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/category/javascript": {
|
||||
"type": "index",
|
||||
"title": "javascript",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/category/php": {
|
||||
"type": "index",
|
||||
"title": "php",
|
||||
"slugs": [
|
||||
"bitrix-api-add-foto-editor",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре",
|
||||
"ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate"
|
||||
]
|
||||
},
|
||||
"/category/ssl": {
|
||||
"type": "index",
|
||||
"title": "ssl",
|
||||
"slugs": [
|
||||
"ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate"
|
||||
]
|
||||
},
|
||||
"/category/vibe-d": {
|
||||
"type": "index",
|
||||
"title": "vibe d",
|
||||
"slugs": [
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/category/windows": {
|
||||
"type": "index",
|
||||
"title": "windows",
|
||||
"slugs": [
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/page/2": {
|
||||
"type": "index",
|
||||
"title": "Ранние заметки",
|
||||
"slugs": [
|
||||
"особенности-vibe-d",
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по",
|
||||
"привет-мир"
|
||||
]
|
||||
},
|
||||
"/tag/веб-сервисы": {
|
||||
"type": "index",
|
||||
"title": "веб сервисы",
|
||||
"slugs": [
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/tag/вирус": {
|
||||
"type": "index",
|
||||
"title": "вирус",
|
||||
"slugs": [
|
||||
"вирус-самопроизвольный-запуск-брауз"
|
||||
]
|
||||
},
|
||||
"/tag/интернет": {
|
||||
"type": "index",
|
||||
"title": "интернет",
|
||||
"slugs": [
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"bitrix-api-создание-добавление-торгового-пре",
|
||||
"firefox-увеличение-ожидания-загрузки-timeout-стр",
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/tag/компилятор": {
|
||||
"type": "index",
|
||||
"title": "компилятор",
|
||||
"slugs": [
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/tag/планировщик-задач": {
|
||||
"type": "index",
|
||||
"title": "планировщик задач",
|
||||
"slugs": [
|
||||
"вирус-самопроизвольный-запуск-брауз"
|
||||
]
|
||||
},
|
||||
"/tag/регулярные-выражения": {
|
||||
"type": "index",
|
||||
"title": "регулярные выражения",
|
||||
"slugs": [
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог"
|
||||
]
|
||||
},
|
||||
"/tag/сайты": {
|
||||
"type": "index",
|
||||
"title": "сайты",
|
||||
"slugs": [
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/tag/торговые-предложения": {
|
||||
"type": "index",
|
||||
"title": "торговые предложения",
|
||||
"slugs": [
|
||||
"bitrix-api-создание-добавление-торгового-пре"
|
||||
]
|
||||
},
|
||||
"/tag/bitrix": {
|
||||
"type": "index",
|
||||
"title": "bitrix",
|
||||
"slugs": [
|
||||
"bitrix-api-add-foto-editor",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре"
|
||||
]
|
||||
},
|
||||
"/tag/compile-time": {
|
||||
"type": "index",
|
||||
"title": "compile time",
|
||||
"slugs": [
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог"
|
||||
]
|
||||
},
|
||||
"/tag/ctfe": {
|
||||
"type": "index",
|
||||
"title": "ctfe",
|
||||
"slugs": [
|
||||
"новый-движок-ctfe"
|
||||
]
|
||||
},
|
||||
"/tag/dlang": {
|
||||
"type": "index",
|
||||
"title": "dlang",
|
||||
"slugs": [
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"пишем-аналог-функции-php-preg_match_all-на-языке-прог",
|
||||
"новый-движок-ctfe",
|
||||
"особенности-vibe-d",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/tag/dmd": {
|
||||
"type": "index",
|
||||
"title": "dmd",
|
||||
"slugs": [
|
||||
"новый-движок-ctfe",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/tag/firefox": {
|
||||
"type": "index",
|
||||
"title": "firefox",
|
||||
"slugs": [
|
||||
"firefox-увеличение-ожидания-загрузки-timeout-стр"
|
||||
]
|
||||
},
|
||||
"/tag/gc": {
|
||||
"type": "index",
|
||||
"title": "gc",
|
||||
"slugs": [
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол"
|
||||
]
|
||||
},
|
||||
"/tag/javascript": {
|
||||
"type": "index",
|
||||
"title": "javascript",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/tag/jquery": {
|
||||
"type": "index",
|
||||
"title": "jquery",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/tag/js": {
|
||||
"type": "index",
|
||||
"title": "js",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/tag/php": {
|
||||
"type": "index",
|
||||
"title": "php",
|
||||
"slugs": [
|
||||
"bitrix-api-add-foto-editor",
|
||||
"bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"bitrix-api-создание-добавление-торгового-пре"
|
||||
]
|
||||
},
|
||||
"/tag/tilix": {
|
||||
"type": "index",
|
||||
"title": "tilix",
|
||||
"slugs": [
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном"
|
||||
]
|
||||
},
|
||||
"/tag/vibe-d": {
|
||||
"type": "index",
|
||||
"title": "vibe d",
|
||||
"slugs": [
|
||||
"особенности-vibe-d"
|
||||
]
|
||||
},
|
||||
"/tag/webpack": {
|
||||
"type": "index",
|
||||
"title": "webpack",
|
||||
"slugs": [
|
||||
"использование-jquery-в-webpack"
|
||||
]
|
||||
},
|
||||
"/tag/win64": {
|
||||
"type": "index",
|
||||
"title": "win64",
|
||||
"slugs": [
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
},
|
||||
"/tag/windows": {
|
||||
"type": "index",
|
||||
"title": "windows",
|
||||
"slugs": [
|
||||
"вирус-самопроизвольный-запуск-брауз",
|
||||
"компиляция-64-x-разрядных-программ-на-dmd-по"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"articlePaths": 14,
|
||||
"inventorySha256": "bf8c6ef2c5abbf11edc6eb5881bc20c1cc5e5e6c7aebabd050b4ff8f7c7b05f1",
|
||||
"reason": "Derived from reconciled inventory; update on verified new Semrush/source discoveries, not an arbitrary publication cap."
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"новый-движок-ctfe": [
|
||||
{
|
||||
"src": "/visuals/v2/ctfe-execution.svg",
|
||||
"alt": "Два пути вычисления square: константа enum вычисляется компилятором, пользовательский ввод — при запуске",
|
||||
"caption": "Когда значение нужно до запуска, вызов выполняется в CTFE. Обычный вызов с пользовательским вводом остаётся в программе.",
|
||||
"afterHeading": "Зачем выполнять функцию при компиляции",
|
||||
"width": 640,
|
||||
"height": 880
|
||||
}
|
||||
],
|
||||
"ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate": [
|
||||
{
|
||||
"src": "/visuals/v2/tls-trust-chain.svg",
|
||||
"alt": "Сертификат сервера проверяется через промежуточный CA до доверенного корневого CA клиента",
|
||||
"caption": "Сервер передаёт свою часть цепочки; корневому CA клиент должен доверять независимо от сервера.",
|
||||
"afterHeading": "Настроить доверенные CA",
|
||||
"width": 640,
|
||||
"height": 1040
|
||||
}
|
||||
],
|
||||
"bitrix-api-создание-добавление-торгового-пре": [
|
||||
{
|
||||
"src": "/visuals/v2/bitrix-product-offer.svg",
|
||||
"alt": "Товар связан с торговым предложением через свойство SKU; цена относится к ID предложения",
|
||||
"caption": "ID свойства связи, ID товара и ID предложения решают разные задачи. Цена привязана к offerId.",
|
||||
"afterHeading": "Условия перед запуском",
|
||||
"width": 640,
|
||||
"height": 1090
|
||||
}
|
||||
],
|
||||
"dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол": [
|
||||
{
|
||||
"src": "/visuals/v2/d-gc-pools.svg",
|
||||
"alt": "Малый пул использует страницы с классами размеров; крупный объект занимает последовательность страниц",
|
||||
"caption": "Модель пулов из разбора 2017 года: округление малого объекта и размещение большого объекта по страницам.",
|
||||
"afterHeading": "Пулы, везде пулы!",
|
||||
"width": 640,
|
||||
"height": 1250
|
||||
},
|
||||
{
|
||||
"src": "/visuals/v2/d-gc-reachability.svg",
|
||||
"alt": "Сборщик отмечает достижимые от корней объекты и освобождает недостижимые",
|
||||
"caption": "Достижимость определяет, какие объекты нужно сохранить. В консервативном сборщике число, похожее на указатель, может удерживать объект.",
|
||||
"afterHeading": "Процесс сбора",
|
||||
"width": 640,
|
||||
"height": 1040
|
||||
}
|
||||
],
|
||||
"особенности-vibe-d": [
|
||||
{
|
||||
"src": "/visuals/v2/vibed-fiber-io.svg",
|
||||
"alt": "Во время ожидания IO один fiber приостанавливается, а event loop выполняет другой",
|
||||
"caption": "Псевдоблокирующий стиль скрывает ожидание I/O; вычислительная работа сама по себе не становится неблокирующей.",
|
||||
"afterHeading": "Простота",
|
||||
"width": 640,
|
||||
"height": 1100
|
||||
}
|
||||
],
|
||||
"вирус-самопроизвольный-запуск-брауз": [
|
||||
{
|
||||
"src": "/visuals/v2/windows-browser-task.svg",
|
||||
"alt": "Проверка подозрительной задачи: триггер, действие, экспорт сведений, отключение и отдельная проверка системы",
|
||||
"caption": "Отключение конкретной задачи устраняет один механизм запуска; это не доказательство очистки всей системы.",
|
||||
"afterHeading": "Проверка планировщика",
|
||||
"width": 640,
|
||||
"height": 1170
|
||||
}
|
||||
],
|
||||
"bitrix-api-add-foto-editor": [
|
||||
{
|
||||
"src": "/visuals/v2/bitrix-file-preview.jpg",
|
||||
"alt": "Поле изображения Bitrix с превью, кнопками выбора файла и редактирования",
|
||||
"caption": "Элемент выбора изображения в форме Bitrix: превью и кнопки управления.",
|
||||
"afterHeading": "Вывод контрола",
|
||||
"width": 435,
|
||||
"height": 280
|
||||
},
|
||||
{
|
||||
"src": "/visuals/v2/bitrix-file-input.svg",
|
||||
"alt": "FileInput выводит контрол выбора и редактирования; отправленное поле picture обрабатывается сервером отдельно",
|
||||
"caption": "Схема работы FileInput. Отображение контрола и сохранение файла — разные этапы.",
|
||||
"afterHeading": "Контрол не заменяет обработчик загрузки",
|
||||
"width": 640,
|
||||
"height": 1100
|
||||
}
|
||||
],
|
||||
"о-tilix-и-d-интервью-с-геральдом-нанном": [
|
||||
{
|
||||
"src": "/visuals/v2/tilix-sessions.svg",
|
||||
"alt": "Боковая панель выбирает сессию, а внутри активной сессии расположены три терминальные панели",
|
||||
"caption": "Сессии и панели: схема организации терминалов.",
|
||||
"afterHeading": "Тайлинг и интерфейс GNOME",
|
||||
"width": 720,
|
||||
"height": 480
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
{
|
||||
"articles": [
|
||||
{
|
||||
"slug": "использование-jquery-в-webpack",
|
||||
"inputBytes": 3376,
|
||||
"outputBytes": 3736,
|
||||
"textCharacters": 2823,
|
||||
"bodyHash": "378d65ac148d6c90fef4c0e6ed28e6de28a6d8ded3859a771d160a06bf65615c",
|
||||
"codeBlocks": 5,
|
||||
"figures": 0,
|
||||
"toc": 5
|
||||
},
|
||||
{
|
||||
"slug": "bitrix-api-add-foto-editor",
|
||||
"inputBytes": 3490,
|
||||
"outputBytes": 3566,
|
||||
"textCharacters": 2367,
|
||||
"bodyHash": "66c92427c702a3f2a19888f263544fe7564e99090cd85603984e8f9c7f20c46c",
|
||||
"codeBlocks": 1,
|
||||
"figures": 2,
|
||||
"toc": 3
|
||||
},
|
||||
{
|
||||
"slug": "о-tilix-и-d-интервью-с-геральдом-нанном",
|
||||
"inputBytes": 24462,
|
||||
"outputBytes": 24464,
|
||||
"textCharacters": 21675,
|
||||
"bodyHash": "a09f44ce219c136a82abcc9241dc3773fc733273b95f4b971caf4a89e3d1289e",
|
||||
"codeBlocks": 0,
|
||||
"figures": 1,
|
||||
"toc": 6
|
||||
},
|
||||
{
|
||||
"slug": "bitrix-api-функция-для-генерации-кода-элемент",
|
||||
"inputBytes": 1995,
|
||||
"outputBytes": 2139,
|
||||
"textCharacters": 1624,
|
||||
"bodyHash": "59a60127c4d4eb5bb0855cf4734fb9b2fa45f014708de4c90acf02dceb1991b7",
|
||||
"codeBlocks": 2,
|
||||
"figures": 0,
|
||||
"toc": 2
|
||||
},
|
||||
{
|
||||
"slug": "bitrix-api-создание-добавление-торгового-пре",
|
||||
"inputBytes": 4518,
|
||||
"outputBytes": 4592,
|
||||
"textCharacters": 3645,
|
||||
"bodyHash": "3cfcb7c0496b8a3382833ac7a7a52331156d6b781f32501d052a09f107a90a63",
|
||||
"codeBlocks": 1,
|
||||
"figures": 1,
|
||||
"toc": 4
|
||||
},
|
||||
{
|
||||
"slug": "firefox-увеличение-ожидания-загрузки-timeout-стр",
|
||||
"inputBytes": 2827,
|
||||
"outputBytes": 2827,
|
||||
"textCharacters": 2443,
|
||||
"bodyHash": "d8d0ba74f1e6d80298706a7aa1064e862c47b92212ef8dacd3fa8d19c9f16d98",
|
||||
"codeBlocks": 0,
|
||||
"figures": 0,
|
||||
"toc": 3
|
||||
},
|
||||
{
|
||||
"slug": "ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate",
|
||||
"inputBytes": 3140,
|
||||
"outputBytes": 3286,
|
||||
"textCharacters": 2439,
|
||||
"bodyHash": "ea3fb84013d87eedbd4e95f6d0c8c501ad9072feac2ff53b125de08b27363987",
|
||||
"codeBlocks": 2,
|
||||
"figures": 1,
|
||||
"toc": 3
|
||||
},
|
||||
{
|
||||
"slug": "dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол",
|
||||
"inputBytes": 14263,
|
||||
"outputBytes": 14270,
|
||||
"textCharacters": 13267,
|
||||
"bodyHash": "7c8cd76f7a636b788a31f2302dcd1c50fcc38ff97f3125131305916068cdbc8c",
|
||||
"codeBlocks": 0,
|
||||
"figures": 2,
|
||||
"toc": 4
|
||||
},
|
||||
{
|
||||
"slug": "пишем-аналог-функции-php-preg_match_all-на-языке-прог",
|
||||
"inputBytes": 6678,
|
||||
"outputBytes": 6894,
|
||||
"textCharacters": 5431,
|
||||
"bodyHash": "1f7db501ae392ca4a57df0747db8b33363442ed4d026775af1d4944c2c7de098",
|
||||
"codeBlocks": 3,
|
||||
"figures": 0,
|
||||
"toc": 6
|
||||
},
|
||||
{
|
||||
"slug": "новый-движок-ctfe",
|
||||
"inputBytes": 6889,
|
||||
"outputBytes": 7091,
|
||||
"textCharacters": 5768,
|
||||
"bodyHash": "f44b53541fcacb2bf51b3dc392f329db2a1deec9cb5d02d224568f8ccca9c6e1",
|
||||
"codeBlocks": 1,
|
||||
"figures": 1,
|
||||
"toc": 6
|
||||
},
|
||||
{
|
||||
"slug": "особенности-vibe-d",
|
||||
"inputBytes": 19214,
|
||||
"outputBytes": 19219,
|
||||
"textCharacters": 17778,
|
||||
"bodyHash": "211eed9921cd814616e46673a4b45dddd7c98154583ab4ae86df60f39ea84fa1",
|
||||
"codeBlocks": 0,
|
||||
"figures": 1,
|
||||
"toc": 4
|
||||
},
|
||||
{
|
||||
"slug": "вирус-самопроизвольный-запуск-брауз",
|
||||
"inputBytes": 3522,
|
||||
"outputBytes": 3524,
|
||||
"textCharacters": 2868,
|
||||
"bodyHash": "32c860e9f1083c54e804043acd6155cf625049b5be7f07f8b995f764c26dba8f",
|
||||
"codeBlocks": 0,
|
||||
"figures": 1,
|
||||
"toc": 4
|
||||
},
|
||||
{
|
||||
"slug": "компиляция-64-x-разрядных-программ-на-dmd-по",
|
||||
"inputBytes": 3295,
|
||||
"outputBytes": 3511,
|
||||
"textCharacters": 2785,
|
||||
"bodyHash": "2ef2e0253c539e9f4c3df8e422d59a3a5db06ae57923c9ef5ce18f1caacf2fb6",
|
||||
"codeBlocks": 3,
|
||||
"figures": 0,
|
||||
"toc": 4
|
||||
},
|
||||
{
|
||||
"slug": "привет-мир",
|
||||
"inputBytes": 339,
|
||||
"outputBytes": 339,
|
||||
"textCharacters": 303,
|
||||
"bodyHash": "099048ba78a60eb0a7c90951b8f71025bc7660cfce9890163b19c085125bfb28",
|
||||
"codeBlocks": 0,
|
||||
"figures": 0,
|
||||
"toc": 1
|
||||
}
|
||||
],
|
||||
"hostileFixturePassed": true
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"172": "/articles/использование-jquery-в-webpack/",
|
||||
"153": "/articles/bitrix-api-add-foto-editor/",
|
||||
"139": "/articles/о-tilix-и-d-интервью-с-геральдом-нанном/",
|
||||
"131": "/articles/bitrix-api-функция-для-генерации-кода-элемент/",
|
||||
"124": "/articles/bitrix-api-создание-добавление-торгового-пре/",
|
||||
"122": "/articles/firefox-увеличение-ожидания-загрузки-timeout-стр/",
|
||||
"116": "/articles/ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate/",
|
||||
"105": "/articles/dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол/",
|
||||
"72": "/articles/пишем-аналог-функции-php-preg_match_all-на-языке-прог/",
|
||||
"55": "/articles/новый-движок-ctfe/",
|
||||
"44": "/articles/особенности-vibe-d/",
|
||||
"36": "/articles/вирус-самопроизвольный-запуск-брауз/",
|
||||
"5": "/articles/компиляция-64-x-разрядных-программ-на-dmd-по/",
|
||||
"1": "/articles/привет-мир/"
|
||||
}
|
||||
@@ -2,3 +2,5 @@ import articles from '../data/articles.json';
|
||||
export function getArticles() { return articles; }
|
||||
export function getArticleBySlug(slug) { return articles.find(a => a.slug === slug); }
|
||||
export function formatDate(date) { return new Intl.DateTimeFormat('ru-RU', {day:'2-digit',month:'long',year:'numeric'}).format(new Date(date)); }
|
||||
|
||||
export function getArticleSummaries(){return articles.map(({slug,title,date,excerpt,categories,readingMinutes})=>({slug,title,date,excerpt,categories,readingMinutes}));}
|
||||
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';
|
||||
|
||||
const nextConfig = {
|
||||
output: 'export',
|
||||
experimental: { cpus: 2 },
|
||||
trailingSlash: true,
|
||||
turbopack: {
|
||||
root: dirname(fileURLToPath(import.meta.url)),
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
"next": "^16.0.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sanitize-html": "2.18.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
@@ -670,6 +673,13 @@
|
||||
"integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.23",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz",
|
||||
"integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
|
||||
@@ -680,6 +690,146 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/dom-serializer": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-3.1.1.tgz",
|
||||
"integrity": "sha512-4MEa38/QexBob6gFNwu+EGdWvhJ1OKuNwdYY3Y3NyeWDQfnGeDYQUDfIRzWu5B5gsv03so2Uxd28YC6zrsx3Lw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domelementtype": "^3.0.0",
|
||||
"domhandler": "^6.0.0",
|
||||
"entities": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/domelementtype": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-3.0.0.tgz",
|
||||
"integrity": "sha512-umCQid3jKbDmVjx8jGaW7uUykm4DEUeyV21hPxNMo2nV955DhUThwqyOIDtreepP31hl84X7G5U9ZfsWvIB3Pg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/domhandler": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-6.0.1.tgz",
|
||||
"integrity": "sha512-gYzvtM72ZtxQO0T048kd6HWSbbGCNOUwcnfQ01cqIJ4X2IYKFFHZ5mKvrQETcFXxsRObZulDaKmy//R7TPtsBg==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"domelementtype": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/domutils": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-4.0.2.tgz",
|
||||
"integrity": "sha512-qI4JLRKnSzqFqr7hAlS5xQDusBCjKSEG4t4+7aNrIQMHBcsC2TGEhuyABJdYkgSewL57PNLYEiibY2iPKhKpaA==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"dom-serializer": "^3.0.0",
|
||||
"domelementtype": "^3.0.0",
|
||||
"domhandler": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/entities": {
|
||||
"version": "8.1.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz",
|
||||
"integrity": "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/htmlparser2": {
|
||||
"version": "12.0.0",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-12.0.0.tgz",
|
||||
"integrity": "sha512-Tz7u1i95/g2x2jz81+x0FBVhBhY5aRTvD3tXXdFaljuNdzDLJ8UGNRrTcj2cgQvAg3iW/h77Fz15nLW0L0CrZw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
"https://github.com/fb55/htmlparser2?sponsor=1",
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domelementtype": "^3.0.0",
|
||||
"domhandler": "^6.0.0",
|
||||
"domutils": "^4.0.2",
|
||||
"entities": "^8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-plain-object": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.1.0.tgz",
|
||||
"integrity": "sha512-bUi/yjmtKYcRVUtWRGr0UA6xEFh2I6zWUwMrUXB3s7bmYCaZ8a+0ZsTRkrawh/mzlSD1Y0Ph8bp/U+TvBpWDNw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/launder": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/launder/-/launder-1.7.2.tgz",
|
||||
"integrity": "sha512-DLg3HPnHUfBi5/MxMLmJD12dmlMpFEC2HgMW6vkZ/9JR0RU00kXoRGvDxAvFmdO0o610OA77i4FgNTLucmhDVg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.23"
|
||||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.12",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
||||
@@ -751,6 +901,13 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/parse-srcset": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz",
|
||||
"integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/picocolors": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
|
||||
@@ -790,7 +947,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz",
|
||||
"integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -800,7 +956,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz",
|
||||
"integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
@@ -808,6 +963,24 @@
|
||||
"react": "^19.2.6"
|
||||
}
|
||||
},
|
||||
"node_modules/sanitize-html": {
|
||||
"version": "2.18.1",
|
||||
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.18.1.tgz",
|
||||
"integrity": "sha512-2X5lC8fYla8YaT8g73Nj+HcLWXan5dLyCWLgVvaOmfw7JI78IRsyNtIDytTHdn7hBQbIkCah7Zbmd5jabzeDig==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"htmlparser2": "^12.0.0",
|
||||
"is-plain-object": "^5.1.0",
|
||||
"launder": "^1.7.2",
|
||||
"parse-srcset": "^1.0.2",
|
||||
"postcss": "^8.5.27"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/scheduler": {
|
||||
"version": "0.27.0",
|
||||
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
|
||||
|
||||
@@ -5,10 +5,11 @@
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"admin:posts": "node ../local-admin/posts-admin.mjs",
|
||||
"build": "next build",
|
||||
"build": "node scripts/prepare-publication.mjs && next build",
|
||||
"audit:articles": "node scripts/audit-quality-batch.mjs",
|
||||
"audit:draft": "node scripts/audit-editorial-draft.mjs",
|
||||
"start": "next start"
|
||||
"start": "next start",
|
||||
"check:publication": "node scripts/prepare-publication.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "^16.0.0",
|
||||
@@ -17,5 +18,8 @@
|
||||
},
|
||||
"overrides": {
|
||||
"postcss": "^8.5.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"sanitize-html": "2.18.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"sourceHash": "401f0b06436f6eeeabe2635a32e6467cc5b9ff34de7fedfbe4badb7c7ac414f7",
|
||||
"articles": 14
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1100" viewBox="0 0 640 1100" role="img" aria-labelledby="title desc"><title id="title">Схема работы FileInput</title><desc id="desc">Выбранное изображение доступно для редактирования при edit=true. Контрол выводит и передаёт значение поля picture, а серверный обработчик отдельно проверяет и сохраняет файл. Это схема, а не снимок интерфейса.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1100" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">08 / BITRIX</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Схема работы FileInput</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Показать контрол ≠ сохранить файл.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="176" width="576" height="184" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="214" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">1. Выбрать изображение</text><path d="M62 238 H140 L166 264 V334 H62 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><path d="M140 238 V264 H166" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><circle cx="87" cy="278" r="8" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><path d="M70 323 l29-27 17 15 18-17 25 29" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="202" y="263" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">allowUpload => 'I'</text><text x="202" y="300" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">upload => true</text><text x="202" y="337" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">maxCount => 1</text><path d="M320 362 V403" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="425" width="576" height="199" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="464" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">2. Редактировать изображение</text><text x="54" y="504" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">edit => true</text><path d="M75 532 V575 H122 M65 544 H109 V585" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="145" y="566" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">кадрирование</text><path d="M418 570 a24 24 0 1 1 37-23" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M455 531 V547 H439" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="477" y="566" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">поворот</text><text x="54" y="608" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Набор инструментов зависит от версии.</text><path d="M320 626 V666" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="688" width="576" height="109" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="728" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">3. Значение поля формы</text><text x="54" y="770" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">name => 'picture'</text><path d="M320 799 V854" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="347" y="837" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">отправка формы</text><rect x="32" y="879" width="576" height="130" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="54" y="919" font-size="27" font-weight="bold" fill="#fbf8f1" text-ancLine truncated
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1090" viewBox="0 0 640 1090" role="img" aria-labelledby="title desc"><title id="title">Товар, предложение и цена в Bitrix</title><desc id="desc">Одна родительская карточка товара связана с несколькими предложениями через SKU-свойство. Товарные параметры и цена варианта относятся к offerId, а не productId.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1090" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">03 / BITRIX</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Товар ≠ предложение</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">У карточки и варианта разные идентификаторы.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="178" width="576" height="197" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="215" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ИНФОБЛОК ТОВАРОВ</text><path d="M81 244 l39-17 25 17 26-9 25 44-29 17-12-16 v70 H86 v-70 l-12 16-29-17 25-44 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="230" y="263" font-size="30" font-weight="bold" fill="#242824" text-anchor="start">Футболка</text><text x="230" y="302" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">productId = 120</text><text x="230" y="340" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Общее описание</text><path d="M320 376 V414 H170 V455" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 414 H470 V455" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="343" y="404" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start">1</text><text x="193" y="457" font-size="25" font-weight="bold" fill="#b64d26" text-anchor="start">*</text><text x="493" y="457" font-size="25" font-weight="bold" fill="#b64d26" text-anchor="start">*</text><rect x="32" y="477" width="276" height="187" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="513" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ПРЕДЛОЖЕНИЕ</text><text x="52" y="554" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Размер M</text><text x="52" y="593" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">offerId = 121</text><text x="52" y="631" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">SKU-свойство: 120</text><rect x="332" y="477" width="276" height="187" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="352" y="513" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ПРЕДЛОЖЕНИЕ</text><text x="352" y="554" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Размер L</text><text x="352" y="593" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">offerId = 122</text><text x="352" y="631" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">SKU-свойство: 120</text><text x="32" y="946" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">SKU_PROPERTY_ID указывает свойство,</text><text x="32" y="983" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">значение свойства — productId товара.</text><path d="M170 666 V714" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 666 V714" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="736" width="276" height="155" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="50" y="775" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">catalog: ID=121</text><text x="50" y="815" font-size="26" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">цена:</Line truncated
|
||||
|
After Width: | Height: | Size: 5.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="880" viewBox="0 0 640 880" role="img" aria-labelledby="title desc"><title id="title">CTFE и выполнение программы</title><desc id="desc">Одна функция square используется компилятором для вычисления enum, а с данными пользователя выполняется после запуска программы.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="880" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">01 / D</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Когда выполняется функция</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Решает контекст вызова, а не имя функции.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="176" width="576" height="95" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="210" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Одна функция</text><text x="54" y="247" font-size="28" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">int square(int x) => x * x;</text><path d="M320 272 V310 H170 V338" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 310 H470 V338" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="170" y="380" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="middle">КОМПИЛЯЦИЯ</text><text x="470" y="380" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="middle">ЗАПУСК</text><rect x="32" y="405" width="276" height="120" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="442" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">enum n =</text><text x="52" y="481" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(3);</text><rect x="332" y="405" width="276" height="120" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="352" y="442" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Ввод пользователя</text><text x="352" y="481" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(input)</text><path d="M170 526 V573" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 526 V573" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M62 595 H277 L302 650 277 705 H62 L37 650 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="170" y="642" font-size="31" font-weight="bold" fill="#242824" text-anchor="middle">CTFE</text><text x="170" y="676" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">в компиляторе</text><rect x="336" y="596" width="268" height="109" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="470" y="641" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="middle">Машинный код</text><text x="470" y="676" font-size="23" font-weight="normal" fill="#d8d0c0" text-anchor="middle">в процессе</text><path d="M170 706 V751" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M470 706 V751" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="170" y="792" font-size="31" font-weight="bold" fill="#242824" text-anchor="middle" font-family="monospace">n = 9</text><text x="470" y="792" font-size="25" font-weight="bold" fill="#242824" text-anchor="middle">Результат ввода</text><text x="32" y="844" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">CTFE: значение нужно ещё до запуска программы.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="260" viewBox="0 0 720 260" role="img" aria-labelledby="title desc"><title id="title">CTFE: вызов превращается в константу</title><desc id="desc">Компилятор выполняет square(3), когда значение требуется для enum, и получает константу n, равную 9.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker></defs><rect width="720" height="260" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="24" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start">ВЫЗОВ</text><text x="360" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="middle">КОМПИЛЯТОР</text><text x="520" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start">КОНСТАНТА</text><text x="24" y="133" font-size="32" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">square(3)</text><path d="M217 123 H270" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="292" y="73" width="136" height="104" rx="6" fill="#242824" stroke="#242824" stroke-width="2"/><path d="M309 61 V73 M309 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M340 61 V73 M340 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M371 61 V73 M371 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M402 61 V73 M402 177 V189" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 89 H292 M428 89 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 113 H292 M428 113 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 137 H292 M428 137 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M280 161 H292 M428 161 H440" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="360" y="118" font-size="30" font-weight="bold" fill="#fbf8f1" text-anchor="middle">CTFE</text><text x="360" y="152" font-size="25" font-weight="normal" fill="#e7c9a9" text-anchor="middle">3 × 3</text><path d="M453 123 H502" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="520" y="112" font-size="27" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">enum</text><text x="520" y="152" font-size="35" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">n = 9;</text><path d="M24 214 H696" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="360" y="245" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">Значение известно до запуска программы</text></g></svg>
|
||||
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1250" viewBox="0 0 640 1250" role="img" aria-labelledby="title desc"><title id="title">Малые и большие пулы GC D</title><desc id="desc">В описании GC 2017 года малые объекты округляются до класса размера и размещаются блоками на странице. Большой объект занимает ряд страниц; таблица хранит страницу его начала.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1250" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">07 / D GC</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Как пул раскладывает объекты</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Две структуры из разбора реализации 2017 года.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="198" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">МАЛЫЕ ОБЪЕКТЫ: ДО 2048 БАЙТ</text><text x="32" y="240" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Запрос 40 байт → класс 64 байта</text><text x="32" y="277" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Классы: 16, 32, 64, …, 2048</text><rect x="32" y="306" width="576" height="209" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="342" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">ФРАГМЕНТ СТРАНИЦЫ</text><rect x="54" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#b64d26" stroke-width="2"/><text x="83" y="405" font-size="22" font-weight="normal" fill="#242824" text-anchor="middle">40</text><path d="M92 368 V429" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="121" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="188" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><rect x="255" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="322" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="389" y="365" width="59" height="66" rx="3" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><rect x="456" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><rect x="523" y="365" width="59" height="66" rx="3" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="473" font-size="23" font-weight="normal" fill="#242824" text-anchor="start">64 байта / блок · штриховка — свободно</text><text x="54" y="505" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">В первом занято 40; остаток — резерв.</text><path d="M320 517 V554" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="577" width="576" height="101" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="615" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Таблица страниц → класс размера</text><text x="54" y="653" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Битовые карты: отметки / свободные блоки</text><path d="M32 711 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="756" font-size="21" font-weight="bold" fill="#b64d26" text-anchor="start">БОЛЬШИЕ ОБЪЕКТЫ: СВЫШЕ 2048 БАЙТ</text><text x="32" y="799" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Запрос 9000 байт → 3 страницы</text><text x="32" y="837" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">Шаг выделения — страница 4 КиБ</text><rect x="32" y="866" width="576" height="169" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="102" y="902" font-size="22" font-weight="normal" fill="#676961" text-anchor="middle">0</text><rect x="54" y="920" width="98" height="78" rx="Line truncated
|
||||
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1040" viewBox="0 0 640 1040" role="img" aria-labelledby="title desc"><title id="title">Пулы памяти и mark-sweep</title><desc id="desc">Корневые ссылки ведут к объектам в пулах. При маркировке обходятся достижимые объекты. Недостижимый объект становится кандидатом на освобождение; освобождённый блок снова доступен выделителю.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1040" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">04 / D GC</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">От ссылок — к свободным блокам</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Упрощённая модель mark–sweep.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="179" width="576" height="80" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="320" y="230" font-size="27" font-weight="normal" fill="#fbf8f1" text-anchor="middle">Корни: стек, регистры, данные</text><path d="M200 260 V344" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M440 260 V344" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="368" width="576" height="267" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="408" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ПУЛ ПАМЯТИ</text><circle cx="155" cy="486" r="47" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><text x="155" y="497" font-size="35" font-weight="bold" fill="#242824" text-anchor="middle">A</text><circle cx="189" cy="452" r="12" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><circle cx="454" cy="486" r="47" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><text x="454" y="497" font-size="35" font-weight="bold" fill="#242824" text-anchor="middle">B</text><circle cx="488" cy="452" r="12" fill="#b64d26" stroke="#b64d26" stroke-width="2"/><path d="M203 486 H395" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="300" y="468" font-size="22" font-weight="normal" fill="#676961" text-anchor="middle">ссылка</text><rect x="68" y="563" width="213" height="43" rx="10" fill="url(#hatch)" stroke="#d8d0c0" stroke-width="2"/><text x="174" y="592" font-size="23" font-weight="normal" fill="#676961" text-anchor="middle">свободно</text><circle cx="454" cy="575" r="32" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><text x="454" y="585" font-size="27" font-weight="normal" fill="#676961" text-anchor="middle">C</text><path d="M491 551 l24 24 M515 551 l-24 24" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="683" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">01 MARK</text><text x="32" y="719" font-size="26" font-weight="normal" fill="#242824" text-anchor="start">От корней отмечаем A и B.</text><text x="32" y="756" font-size="25" font-weight="normal" fill="#676961" text-anchor="start">До C нет пути по найденным ссылкам.</text><path d="M320 781 V822" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="845" width="576" height="111" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="54" y="882" font-size="24" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">02 SWEEP</text><text x="54" y="922" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Блок C возвращается в свободные.</text><text x="32" y="1004" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">Финализаторы и ложные ссылки усложняют сборку.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="480" viewBox="0 0 720 480" role="img" aria-labelledby="title desc"><title id="title">Сессии и панели Tilix</title><desc id="desc">Схема: в боковой панели две сессии. Активная сессия содержит три терминальные панели: слева одна высокая, справа две, расположенные друг над другом. Верхнюю панель окна с кнопками рисует приложение — CSD.</desc><rect width="720" height="480" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><rect x="18" y="20" width="684" height="408" rx="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><path d="M28 20 H692 Q702 20 702 30 V82 H18 V30 Q18 20 28 20Z" fill="#efe9dd"/><path d="M18 82 H702" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="39" y="61" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Tilix: схема организации</text><text x="513" y="59" font-size="22" font-weight="normal" fill="#676961" text-anchor="start" font-family="monospace">CSD</text><circle cx="612" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><circle cx="646" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><circle cx="680" cy="51" r="10" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><rect x="30" y="96" width="151" height="318" rx="6" fill="#efe9dd" stroke="#d8d0c0" stroke-width="2"/><text x="44" y="132" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">СЕССИИ</text><rect x="41" y="151" width="129" height="103" rx="6" fill="#f1d3c1" stroke="#b64d26" stroke-width="2"/><text x="58" y="190" font-size="24" font-weight="bold" fill="#242824" text-anchor="start">Сессия</text><text x="58" y="229" font-size="29" font-weight="bold" fill="#b64d26" text-anchor="start">1</text><rect x="41" y="274" width="129" height="103" rx="6" fill="#fbf8f1" stroke="#d8d0c0" stroke-width="2"/><text x="58" y="313" font-size="24" font-weight="normal" fill="#242824" text-anchor="start">Сессия</text><text x="58" y="352" font-size="29" font-weight="normal" fill="#676961" text-anchor="start">2</text><text x="205" y="124" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">АКТИВНАЯ СЕССИЯ</text><rect x="202" y="144" width="224" height="270" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><rect x="442" y="144" width="242" height="127" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><rect x="442" y="287" width="242" height="127" rx="3" fill="#242824" stroke="#242824" stroke-width="2"/><text x="220" y="182" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель A</text><text x="220" y="225" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="460" y="182" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель B</text><text x="460" y="225" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="460" y="325" font-size="25" font-weight="normal" fill="#fbf8f1" text-anchor="start">Панель C</text><text x="460" y="368" font-size="25" font-weight="normal" fill="#83b196" text-anchor="start" font-family="monospace">$ _</text><text x="360" y="466" font-size="24" font-weight="normal" fill="#676961" text-anchor="middle">Сессия объединяет несколько терминальных панелей.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1040" viewBox="0 0 640 1040" role="img" aria-labelledby="title desc"><title id="title">Цепочка доверия TLS</title><desc id="desc">Сервер отправляет сертификат сайта и промежуточный сертификат. Клиент проверяет подписи до локально доверенного корневого центра, имя сайта и срок действия.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1040" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">02 / TLS</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">От сервера — до доверия</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Сертификат сайта и CA bundle — разные вещи.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="32" y="188" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">СЕРВЕР ОТПРАВЛЯЕТ</text><path d="M84 210 H476 L508 242 V334 H84 Z" fill="white" stroke="#242824" stroke-width="2"/><path d="M476 210 V242 H508" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="106" y="249" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Сертификат сайта</text><text x="106" y="286" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Имя: example.com</text><text x="106" y="318" font-size="22" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">leaf / конечный</text><circle cx="551" cy="279" r="25" fill="#efe9dd" stroke="#b64d26" stroke-width="2"/><path d="M540 279 l8 8 15-18" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M294 337 V378" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="324" y="366" font-size="22" font-weight="normal" fill="#676961" text-anchor="start">проверка подписи</text><path d="M84 397 H476 L508 429 V521 H84 Z" fill="white" stroke="#242824" stroke-width="2"/><path d="M476 397 V429 H508" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="106" y="436" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Промежуточный CA</text><text x="106" y="473" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Выдал сертификат сайта</text><text x="106" y="505" font-size="22" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">intermediate</text><circle cx="551" cy="466" r="25" fill="#efe9dd" stroke="#b64d26" stroke-width="2"/><path d="M540 466 l8 8 15-18" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M294 523 V572" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="324" y="554" font-size="22" font-weight="normal" fill="#676961" text-anchor="start">проверка подписи</text><path d="M32 587 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="6 7"/><text x="32" y="627" font-size="22" font-weight="bold" fill="#b64d26" text-anchor="start">ХРАНИЛИЩЕ КЛИЕНТА</text><rect x="58" y="655" width="524" height="142" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><path d="M80 655 V641 H225 L247 655" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="84" y="695" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Доверенный корневой CA</text><text x="84" y="734" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">Системное хранилище</text><text x="84" y="769" font-size="25" font-weight="normal" fill="#242824" text-anchor="start">или настроенный CA bundle</text><path d="M294 798 V839" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="32" y="883" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Подписи + имя сайта + срок действия</text><tLine truncated
|
||||
|
After Width: | Height: | Size: 5.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1100" viewBox="0 0 640 1100" role="img" aria-labelledby="title desc"><title id="title">Как fiber ждёт ввод-вывод в vibe.d</title><desc id="desc">На одном потоке fiber A уступает управление при ожидании read. Цикл событий запускает fiber B, а после готовности ввода-вывода возвращает управление fiber A.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1100" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">05 / VIBE.D</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Ожидание без простоя потока</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Один поток, несколько кооперативных задач.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="48" y="192" font-size="23" font-weight="bold" fill="#b64d26" text-anchor="start">FIBER A</text><text x="366" y="192" font-size="23" font-weight="bold" fill="#b64d26" text-anchor="start">FIBER B</text><path d="M160 235 V678" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M478 235 V678" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="224" width="256" height="94" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="260" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Читаем запрос</text><text x="52" y="297" font-size="25" font-weight="normal" fill="#327057" text-anchor="start" font-family="monospace">read()</text><path d="M160 319 V363" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="387" width="256" height="105" rx="10" fill="#efe9dd" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="426" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Ожидание I/O</text><text x="52" y="465" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">уступить поток</text><path d="M289 440 H457 V492" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="371" y="420" font-size="21" font-weight="normal" fill="#676961" text-anchor="middle">переключение</text><rect x="350" y="516" width="258" height="103" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="370" y="554" font-size="25" font-weight="bold" fill="#fbf8f1" text-anchor="start">Другая задача</text><text x="370" y="591" font-size="24" font-weight="normal" fill="#d8d0c0" text-anchor="start">выполняет код</text><path d="M478 620 V668 H310 V725" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="748" width="576" height="101" rx="10" fill="#efe9dd" stroke="#242824" stroke-width="2"/><circle cx="77" cy="797" r="20" fill="#fbf8f1" stroke="#b64d26" stroke-width="2"/><path d="M69 797 l6 6 12-15" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="114" y="790" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Цикл событий: I/O готово</text><text x="114" y="827" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Fiber A можно возобновить</text><path d="M160 850 V893" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="916" width="576" height="83" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="52" y="950" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Fiber A продолжает после read()</text><text x="52" y="984" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">с сохранённым стеком и состоянием</text><text x="32" y="1055" font-size="22" font-weight="normal" fill="#b64d26" text-anchor="start">Долгий CPU-цикл без уступки задержит другие fibers.</text></g></svg>
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="1170" viewBox="0 0 640 1170" role="img" aria-labelledby="title desc"><title id="title">Диагностика самозапуска браузера</title><desc id="desc">Задание планировщика связывает триггер и действие запуска. Нужно изучить путь программы и аргументы, сохранить описание, отключить только подтверждённо подозрительное задание и выполнить проверку защиты.</desc><defs><marker id="arrow" markerWidth="9" markerHeight="9" refX="7" refY="4" orient="auto"><path d="M0 0 8 4 0 8" fill="none" stroke="#b64d26" stroke-width="1.6"/></marker><pattern id="hatch" width="9" height="9" patternUnits="userSpaceOnUse"><path d="M-2 2 2-2 M0 9 9 0 M7 11 11 7" stroke="#d8d0c0" stroke-width="2"/></pattern></defs><rect width="640" height="1170" rx="4" fill="#fbf8f1"/><g font-family="Arial,Helvetica,sans-serif" fill="#242824"><text x="32" y="44" font-size="20" font-weight="bold" fill="#b64d26" text-anchor="start" font-family="monospace">06 / WINDOWS</text><text x="32" y="87" font-size="33" font-weight="bold" fill="#242824" text-anchor="start">Почему открывается браузер</text><text x="32" y="122" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Задание связывает событие с действием.</text><path d="M32 148 H608" fill="none" stroke="#d8d0c0" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><rect x="32" y="180" width="576" height="154" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="219" font-size="28" font-weight="bold" fill="#242824" text-anchor="start">Задание планировщика</text><circle cx="78" cy="276" r="27" fill="#fbf8f1" stroke="#242824" stroke-width="2"/><path d="M78 255 V276 L92 285" fill="none" stroke="#242824" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><text x="122" y="271" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Триггер</text><text x="122" y="307" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">время / событие</text><path d="M319 278 H369" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><text x="402" y="272" font-size="25" font-weight="bold" fill="#242824" text-anchor="start">Действие</text><text x="402" y="308" font-size="23" font-weight="normal" fill="#676961" text-anchor="start">запуск</text><path d="M320 335 V378" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><path d="M320 399 L593 487 320 575 47 487 Z" fill="#efe9dd" stroke="#242824" stroke-width="2"/><text x="320" y="469" font-size="28" font-weight="bold" fill="#242824" text-anchor="middle">Что запускается?</text><text x="320" y="508" font-size="24" font-weight="normal" fill="#676961" text-anchor="middle">Путь + аргументы + URL</text><path d="M320 576 V617" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="640" width="576" height="112" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="679" font-size="27" font-weight="bold" fill="#242824" text-anchor="start">Сохранить сведения о задании</text><text x="54" y="720" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">Имя, триггеры, действия или XML</text><path d="M320 753 V794" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="816" width="576" height="122" rx="10" fill="#242824" stroke="#242824" stroke-width="2"/><text x="54" y="855" font-size="26" font-weight="bold" fill="#fbf8f1" text-anchor="start">Отключить подозрительное задание</text><text x="54" y="894" font-size="24" font-weight="normal" fill="#d8d0c0" text-anchor="start">Только после проверки назначения.</text><text x="54" y="925" font-size="23" font-weight="normal" fill="#d8d0c0" text-anchor="start">Системные задания не отключать наугад.</text><path d="M320 939 V980" fill="none" stroke="#b64d26" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/><rect x="32" y="1002" width="576" height="88" rx="10" fill="white" stroke="#d8d0c0" stroke-width="2"/><text x="54" y="1039" font-size="26" font-weight="bold" fill="#242824" text-anchor="start">Проверить устройство защитным ПО</text><text x="54" y="1075" font-size="24" font-weight="normal" fill="#676961" text-anchor="start">и повторно провеLine truncated
|
||||
|
After Width: | Height: | Size: 5.1 KiB |
@@ -0,0 +1,43 @@
|
||||
import {readFile,writeFile,readdir,access} from 'node:fs/promises';
|
||||
import {createHash} from 'node:crypto';
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import path from 'node:path';
|
||||
import assert from 'node:assert/strict';
|
||||
import {cleanPublication} from './publication-sanitizer.mjs';
|
||||
const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
|
||||
// Raw captures never enter this pipeline. Only individually edited publication input is eligible.
|
||||
const input=JSON.parse(await readFile(path.join(root,'data/articles-v2.json'),'utf8'));
|
||||
const corpus=JSON.parse(await readFile(path.join(root,'data/corpus-manifest.json'),'utf8'));
|
||||
assert.equal(input.length,corpus.articlePaths,'Corpus must match independently reconciled inventory');
|
||||
const placements=JSON.parse(await readFile(path.join(root,'data/figure-placements.json'),'utf8'));
|
||||
const decode=s=>s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,"'");
|
||||
const report=[];const output=[];
|
||||
for(const article of input){
|
||||
let html=article.contentHtml;
|
||||
for(const figure of placements[article.slug]||[]){
|
||||
await access(path.join(root,'public',figure.src));
|
||||
const markup=`<figure><img src="${figure.src}" alt="${figure.alt}" width="${figure.width||640}" height="${figure.height||880}" loading="lazy" decoding="async"><figcaption>${figure.caption}</figcaption></figure>`;
|
||||
if(figure.afterHeading){const index=html.indexOf(figure.afterHeading);const paragraph=html.indexOf('</p>',index);if(index>=0&¶graph>=0)html=html.slice(0,paragraph+4)+markup+html.slice(paragraph+4);else html+=markup;}
|
||||
else {const first=html.indexOf('</p>');html=first>=0?html.slice(0,first+4)+markup+html.slice(first+4):markup+html;}
|
||||
|
||||
}
|
||||
const toc=[];let number=0;
|
||||
html=html.replace(/<h([23])(?:\s[^>]*)?>([\s\S]*?)<\/h\1>/g,(_,level,title)=>{const id='section-'+(++number);if(level==='2')toc.push({id,title:decode(title.replace(/<[^>]*>/g,''))});return `<h${level} id="${id}">${title}</h${level}>`;});
|
||||
const clean=cleanPublication(html).replace(/(<table[\s\S]*?<\/table>)/g,'<div class="table-scroll" role="region" tabindex="0" aria-label="Сравнительная таблица; прокрутка клавишами со стрелками">$1</div>');
|
||||
assert(!/Не удалось восстановить|Источник изображения|Иллюстрация из архивного|Данный вирус практически никакой угрозы/.test(clean),'Unedited process or unsafe copy: '+article.slug);
|
||||
const text=decode(clean.replace(/<[^>]*>/g,' ')).replace(/\s+/g,' ').trim();assert(text.length>80,'Empty or damaged body '+article.slug);
|
||||
const bodyHash=createHash('sha256').update(clean).digest('hex');report.push({slug:article.slug,inputBytes:html.length,outputBytes:clean.length,textCharacters:text.length,bodyHash,codeBlocks:(clean.match(/<pre/g)||[]).length,figures:(clean.match(/<figure/g)||[]).length,toc:toc.length});
|
||||
output.push({...article,contentHtml:clean,toc,readingMinutes:Math.max(1,Math.ceil(text.split(/\s+/).length/180))});
|
||||
}
|
||||
assert.equal(new Set(output.map(a=>createHash('sha256').update(a.contentHtml).digest('hex'))).size,output.length,'Duplicate article bodies');
|
||||
await writeFile(path.join(root,'data/articles.json'),JSON.stringify(output,null,2)+'\n');
|
||||
// Exercise actual parser boundary with hostile imports and malformed URL schemes.
|
||||
const hostile='<script>alert(1)</script><p onclick="evil()">ok<a href="javascript:alert(1)">bad</a><a href="//tracker.test">bad</a><img src="https://tracker.test/pixel" onerror="evil()"><iframe src="https://evil.test"></iframe><code><script></code></p>';
|
||||
const safe=cleanPublication(hostile);assert(!/onclick|onerror|javascript:|tracker.test|<script|<iframe/.test(safe));assert(safe.includes('<script>'));
|
||||
await writeFile(path.join(root,'data/publication-report.json'),JSON.stringify({articles:report,hostileFixturePassed:true},null,2)+'\n');
|
||||
// Stable source identity excludes runtime build identity/output and internal review documents.
|
||||
async function files(dir){const out=[];for(const entry of await readdir(path.join(root,dir),{withFileTypes:true})){const name=path.join(dir,entry.name);if(entry.isDirectory())out.push(...await files(name));else out.push(name);}return out;}
|
||||
const names=[...await files('app'),...await files('lib'),...await files('scripts'),...await files('data'),...await files('public/visuals'),'package.json','package-lock.json','next.config.mjs'].sort();
|
||||
const hash=createHash('sha256');for(const name of names){hash.update(name);hash.update(await readFile(path.join(root,name)));}const sourceHash=hash.digest('hex');
|
||||
await writeFile(path.join(root,'public/build-identity.json'),JSON.stringify({sourceHash,articles:output.length},null,2)+'\n');
|
||||
console.log(JSON.stringify({sourceHash,articles:report.length,hostileFixturePassed:true}));
|
||||
@@ -0,0 +1,9 @@
|
||||
import sanitizeHtml from 'sanitize-html';
|
||||
export function cleanPublication(html){return sanitizeHtml(html,{
|
||||
allowedTags:['p','h2','h3','h4','pre','code','strong','em','b','i','ul','ol','li','blockquote','figure','figcaption','img','table','thead','tbody','tr','th','td','br','a'],
|
||||
allowedAttributes:{a:['href','title','rel'],img:['src','alt','width','height','loading','decoding'],h2:['id'],h3:['id'],h4:['id'],pre:['tabindex','aria-label']},
|
||||
allowedSchemes:['https','http'],allowProtocolRelative:false,
|
||||
transformTags:{a:(tag,attrs)=>({tagName:tag,attribs:{href:attrs.href||'',rel:'noopener noreferrer'}}),pre:(tag,attrs)=>({tagName:tag,attribs:{tabindex:'0','aria-label':'Пример кода, прокрутка клавишами со стрелками'}})},
|
||||
exclusiveFilter:frame=>frame.tag==='img'&&(!frame.attribs.src?.startsWith('/visuals/')||frame.attribs.src.startsWith('//')),
|
||||
disallowedTagsMode:'discard',nonTextTags:['script','style','textarea','option','iframe','object','embed','form'],
|
||||
});}
|
||||