feat: level-2 документация

This commit is contained in:
2026-07-30 10:56:48 +03:00
parent 4aa5547d20
commit bd479b346f
22 changed files with 516 additions and 77 deletions

View File

@@ -14,12 +14,12 @@ function slugifyHeading(value: string) {
.replace(/[^\p{L}\p{N}_-]/gu, '')
.replace(/-+/g, '-')
return ['app', 'compositions', 'infra', 'ui', 'shared'].includes(slug)
return ['app', 'compositions', 'domains', 'infra', 'ui', 'shared'].includes(slug)
? `layer-${slug}`
: slug
}
const levelOneSidebar = [
const documentationSidebar = [
{
text: 'SLM Level 1',
items: [
@@ -36,24 +36,37 @@ const levelOneSidebar = [
{ text: 'Проверка', link: '/level-1/validation' },
],
},
{
text: 'SLM Level 2',
items: [
{ text: 'Обзор', link: '/level-2/' },
{ text: 'Терминология', link: '/level-2/terminology' },
{ text: 'Слои', link: '/level-2/layers' },
{ text: 'Домены', link: '/level-2/domains' },
{ text: 'Зависимости', link: '/level-2/dependencies' },
{ text: 'Проверка', link: '/level-2/validation' },
],
},
{
text: 'Правила',
items: [
{ text: 'Как устроены правила', link: '/rules/' },
{ text: 'Реестр Level 1', link: '/rules/level-1' },
{ text: 'Реестр Level 2', link: '/rules/level-2' },
],
},
]
export default defineConfig({
srcDir: '../DRAFT',
srcExclude: ['README.md', 'domains/**'],
srcExclude: ['README.md', 'level-3/**'],
rewrites: {
'level-1/README.md': 'level-1/index.md',
'level-2/README.md': 'level-2/index.md',
'rules/README.md': 'rules/index.md',
},
title: 'SLM Design',
description: 'Базовая архитектура фронтенд-приложений SLM Level 1',
description: 'Последовательная архитектура фронтенд-приложений SLM',
lang: 'ru-RU',
base: '/slm-design/',
cleanUrls: true,
@@ -78,12 +91,10 @@ export default defineConfig({
siteTitle: 'SLM Design',
nav: [
{ text: 'Level 1', link: '/level-1/' },
{ text: 'Правила', link: '/rules/level-1' },
{ text: 'Level 2', link: '/level-2/' },
{ text: 'Правила', link: '/rules/' },
],
sidebar: {
'/level-1/': levelOneSidebar,
'/rules/': levelOneSidebar,
},
sidebar: documentationSidebar,
socialLinks: [{ icon: 'github', link: repositoryUrl }],
search: {
provider: 'local',
@@ -113,7 +124,7 @@ export default defineConfig({
notFound: {
code: '404',
title: 'Страница не найдена',
quote: 'Запрошенная страница отсутствует в документации Level 1.',
quote: 'Запрошенная страница отсутствует в опубликованной документации SLM.',
linkLabel: 'Перейти на главную',
linkText: 'Вернуться к документации',
},
@@ -136,7 +147,7 @@ export default defineConfig({
returnToTopLabel: 'Наверх',
skipToContentLabel: 'Перейти к содержанию',
footer: {
message: 'SLM Level 1',
message: 'SLM Levels 1-2',
copyright: 'Рабочий черновик архитектуры.',
},
},

View File

@@ -71,7 +71,7 @@ html {
font-size: clamp(2rem, 4vw, 2.65rem);
}
.vp-doc h3[id^='slm-l1-'] {
.vp-doc h3[id^='slm-l'] {
margin-top: 34px;
scroll-margin-top: calc(var(--vp-nav-height) + var(--vp-layout-top-height) + 24px);
color: var(--vp-c-brand-1);
@@ -81,7 +81,7 @@ html {
letter-spacing: -0.02em;
}
.vp-doc h3[id^='slm-l1-'] + blockquote {
.vp-doc h3[id^='slm-l'] + blockquote {
position: relative;
margin: 10px 0 24px;
padding: 42px 20px 18px;
@@ -94,7 +94,7 @@ html {
line-height: 1.7;
}
.vp-doc h3[id^='slm-l1-'] + blockquote::before {
.vp-doc h3[id^='slm-l'] + blockquote::before {
position: absolute;
top: 14px;
left: 20px;
@@ -106,23 +106,23 @@ html {
text-transform: uppercase;
}
.vp-doc h3[id^='slm-l1-'][id*='-a'] + blockquote::before {
.vp-doc h3[id^='slm-l'][id*='-a'] + blockquote::before {
content: 'Автоматическая проверка';
}
.vp-doc h3[id^='slm-l1-'][id*='-r'] + blockquote::before {
.vp-doc h3[id^='slm-l'][id*='-r'] + blockquote::before {
content: 'Проверка на ревью';
}
.vp-doc h3[id^='slm-l1-'] + blockquote > p {
.vp-doc h3[id^='slm-l'] + blockquote > p {
margin: 0;
}
.vp-doc h3[id^='slm-l1-'] + blockquote > p + p {
.vp-doc h3[id^='slm-l'] + blockquote > p + p {
margin-top: 8px;
}
.vp-doc h3[id^='slm-l1-'] + blockquote strong:first-child {
.vp-doc h3[id^='slm-l'] + blockquote strong:first-child {
color: var(--vp-c-text-1);
font-weight: 700;
}
@@ -132,7 +132,7 @@ html {
font-size: 16px;
}
.vp-doc h3[id^='slm-l1-'] + blockquote {
.vp-doc h3[id^='slm-l'] + blockquote {
margin-inline: -8px;
padding: 42px 14px 14px;
}