From 5cf0f0f8baee3192292a95ae0cb2d1c36e33c87e Mon Sep 17 00:00:00 2001 From: "S.Gromov" Date: Sat, 25 Apr 2026 21:14:17 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA=D0=BB?= =?UTF-8?q?=D1=8E=D1=87=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=20=D1=8F=D0=B7=D1=8B?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B8=20=D0=B8=D0=BA=D0=BE=D0=BD=D0=BA=D0=B0=20?= =?UTF-8?q?=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B2=20=D1=88=D0=B0=D0=BF=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - восстановлены link для локалей: ru → /ru/, en → /en/ (были сломаны на /) - добавлена иконка GitHub в socialLinks шапки VitePress для ru и en со ссылкой на https://gromlab.ru/docs/nextjs-style-guide - root-локаль скрыта из переключателя языка через CSS (display: none для href="/"): в дропдауне теперь только Русский и English - pill-кнопка «Репозиторий» добавлена в блок controls лендинга с иконкой GitHub, открывается в новой вкладке - мобильная вёрстка лендинга переработана: контролы стопкой, репозиторий на ≤480px сжимается до иконки 36x36, увеличены отступы между блоками (hero / controls / cards) для разделения --- .vitepress/config.ts | 10 ++++- .vitepress/theme/custom.css | 11 +++++ docs/index.md | 85 ++++++++++++++++++++++++++++++++++++- 3 files changed, 102 insertions(+), 4 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index e9e7087..05fd795 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -141,10 +141,13 @@ export default defineConfig({ ru: { label: 'Русский', lang: 'ru-RU', - link: '/', + link: '/ru/', description: 'Стандарты разработки на Next.js + TypeScript с архитектурой SLM', themeConfig: { sidebar: ruSidebar, + socialLinks: [ + { icon: 'github', link: 'https://gromlab.ru/docs/nextjs-style-guide' }, + ], }, // Расширенный блок описания для llms.txt — даёт LLM полный // технический контекст: стек, методология, охват тем. @@ -156,10 +159,13 @@ export default defineConfig({ en: { label: 'English', lang: 'en-US', - link: '/', + link: '/en/', description: 'Next.js + TypeScript development standards with SLM architecture', themeConfig: { sidebar: enSidebar, + socialLinks: [ + { icon: 'github', link: 'https://gromlab.ru/docs/nextjs-style-guide' }, + ], }, llmsBlockquote: 'Frontend development standards for Next.js (App Router) + TypeScript + React projects with SLM architecture (Scoped Layered Module Design — a modular architecture with responsibility layers, where each module contains everything it needs: components, hooks, stores, types, styles).', diff --git a/.vitepress/theme/custom.css b/.vitepress/theme/custom.css index 1831c87..840117d 100644 --- a/.vitepress/theme/custom.css +++ b/.vitepress/theme/custom.css @@ -15,3 +15,14 @@ max-width: 100%; overflow-wrap: anywhere; } + +/* + * Скрыть root-локаль (лендинг с layout: false) из переключателя языка. + * VitePress не даёт исключить root через config — она всегда попадает + * в lang-switcher. Идентифицируем по href="/" — другие локали используют + * href="/ru/" и href="/en/". + */ +.VPNavBarTranslations a[href="/"], +.VPNavScreenTranslations a[href="/"] { + display: none; +} diff --git a/docs/index.md b/docs/index.md index 529878c..bd9aede 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,6 +17,7 @@ const dict = { tagline: 'Соглашения по разработке Next.js проектов: архитектура и слои приложения, структура кода, организация модулей, стилизация, типизация и инфраструктура.', langLabel: 'Язык', themeLabel: 'Тема', + repoLabel: 'Репозиторий', themes: { auto: 'Авто', light: 'Светлая', dark: 'Тёмная' }, cards: { docs: { @@ -45,6 +46,7 @@ const dict = { tagline: 'Conventions for Next.js project development: application architecture and layers, code structure, module organization, styling, typing, and infrastructure.', langLabel: 'Language', themeLabel: 'Theme', + repoLabel: 'Repository', themes: { auto: 'Auto', light: 'Light', dark: 'Dark' }, cards: { docs: { @@ -124,6 +126,17 @@ function toggleTheme(value) {

{{ t.tagline }}

+ + + {{ t.repoLabel }} +