Skip to content

Commit 00578e1

Browse files
committed
dev reka layout
1 parent e4f2431 commit 00578e1

File tree

27 files changed

+2261
-59
lines changed

27 files changed

+2261
-59
lines changed

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"docs/@capsule/components/capsule-input/vscode.data.json",
2929
"docs/@capsule/components/capsule-hover-card/vscode.data.json",
3030
"docs/@capsule/components/capsule-radio-group/vscode.data.json",
31-
"docs/@capsule/components/capsule-sidebar/vscode.data.json"
31+
"docs/@capsule/components/capsule-sidebar/vscode.data.json",
32+
"docs/@capsule/components/capsule-avatar/vscode.data.json"
3233
]
3334
}

docs/.vitepress/config.ts

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import { defineConfig } from 'vitepress';
1+
import { defineConfig, postcssIsolateStyles } from 'vitepress';
2+
3+
// Badge HTML helper
4+
function BadgeHTML(text: string, type: 'new' | 'updated' | 'beta' = 'new') {
5+
const classMap = {
6+
new: 'vp-badge-new',
7+
updated: 'vp-badge-updated',
8+
beta: 'vp-badge-updated',
9+
};
10+
11+
return `<span class="${classMap[type]}">${text}</span>`;
12+
}
213

314
// https://vitepress.dev/reference/site-config
415
export default defineConfig({
@@ -77,29 +88,30 @@ export default defineConfig({
7788
text: 'Components',
7889
items: [
7990
{ text: 'Overview', link: '/components/' },
91+
{ text: 'Accordion', link: '/components/accordion' },
92+
{ text: 'Alert', link: '/components/alert' },
93+
{ text: 'AspectRatio', link: '/components/aspect-ratio' },
94+
{ text: `Avatar ${BadgeHTML('New', 'new')}`, link: '/components/avatar' },
95+
{ text: `Badge ${BadgeHTML('Updated', 'updated')}`, link: '/components/badge' },
96+
{ text: 'Breadcrumb', link: '/components/breadcrumb' },
8097
{ text: 'Button', link: '/components/button' },
81-
{ text: 'Input', link: '/components/input' },
82-
{ text: 'Textarea', link: '/components/textarea' },
83-
{ text: 'RadioGroup', link: '/components/radio-group' },
8498
{ text: 'Button Group', link: '/components/button-group' },
85-
{ text: 'Badge', link: '/components/badge' },
99+
{ text: 'Calendar', link: '/components/calendar' },
100+
{ text: 'Comparison', link: '/components/comparison' },
101+
{ text: 'Divider', link: '/components/divider' },
102+
{ text: `Icon ${BadgeHTML('New', 'new')}`, link: '/components/icon' },
103+
{ text: 'Input', link: '/components/input' },
86104
{ text: 'Kbd', link: '/components/kbd' },
87-
{ text: 'Breadcrumb', link: '/components/breadcrumb' },
88105
{ text: 'Pagination', link: '/components/pagination' },
106+
{ text: 'Progress', link: '/components/progress' },
107+
{ text: 'Range', link: '/components/range' },
108+
{ text: `RadioGroup ${BadgeHTML('New', 'new')}`, link: '/components/radio-group' },
109+
{ text: 'Rating', link: '/components/rating' },
89110
{ text: 'Skeleton', link: '/components/skeleton' },
90-
{ text: 'Divider', link: '/components/divider' },
91-
{ text: 'Icon', link: '/components/icon' },
92-
{ text: 'Alert', link: '/components/alert' },
93-
{ text: 'AspectRatio', link: '/components/aspect-ratio' },
94-
{ text: 'Accordion', link: '/components/accordion' },
95-
{ text: 'Tabs', link: '/components/tabs' },
96-
{ text: 'Calendar', link: '/components/calendar' },
97111
{ text: 'Stepper', link: '/components/stepper' },
98112
{ text: 'Switch', link: '/components/switch' },
99-
{ text: 'Range', link: '/components/range' },
100-
{ text: 'Rating', link: '/components/rating' },
101-
{ text: 'Progress', link: '/components/progress' },
102-
{ text: 'Comparison', link: '/components/comparison' },
113+
{ text: 'Tabs', link: '/components/tabs' },
114+
{ text: 'Textarea', link: '/components/textarea' },
103115
{ text: 'Tooltip', link: '/components/tooltip' },
104116
{ text: 'Tour', link: '/components/tour' },
105117
],
@@ -148,29 +160,30 @@ export default defineConfig({
148160
text: 'Компоненты',
149161
items: [
150162
{ text: 'Обзор', link: '/ru/components/' },
163+
{ text: 'Accordion', link: '/ru/components/accordion' },
164+
{ text: 'Alert', link: '/ru/components/alert' },
165+
{ text: 'AspectRatio', link: '/ru/components/aspect-ratio' },
166+
{ text: `Avatar ${BadgeHTML('Новый', 'new')}`, link: '/ru/components/avatar' },
167+
{ text: `Badge ${BadgeHTML('Обновлен', 'updated')}`, link: '/ru/components/badge' },
168+
{ text: 'Breadcrumb', link: '/ru/components/breadcrumb' },
151169
{ text: 'Button', link: '/ru/components/button' },
152-
{ text: 'Input', link: '/ru/components/input' },
153-
{ text: 'Textarea', link: '/ru/components/textarea' },
154-
{ text: 'RadioGroup', link: '/ru/components/radio-group' },
155170
{ text: 'Button Group', link: '/ru/components/button-group' },
156-
{ text: 'Badge', link: '/ru/components/badge' },
171+
{ text: 'Calendar', link: '/ru/components/calendar' },
172+
{ text: 'Comparison', link: '/ru/components/comparison' },
173+
{ text: 'Divider', link: '/ru/components/divider' },
174+
{ text: `Icon ${BadgeHTML('Новый', 'new')}`, link: '/ru/components/icon' },
175+
{ text: 'Input', link: '/ru/components/input' },
157176
{ text: 'Kbd', link: '/ru/components/kbd' },
158-
{ text: 'Breadcrumb', link: '/ru/components/breadcrumb' },
159177
{ text: 'Pagination', link: '/ru/components/pagination' },
178+
{ text: 'Progress', link: '/ru/components/progress' },
179+
{ text: 'Range', link: '/ru/components/range' },
180+
{ text: `RadioGroup ${BadgeHTML('Новый', 'new')}`, link: '/ru/components/radio-group' },
181+
{ text: 'Rating', link: '/ru/components/rating' },
160182
{ text: 'Skeleton', link: '/ru/components/skeleton' },
161-
{ text: 'Divider', link: '/ru/components/divider' },
162-
{ text: 'Icon', link: '/ru/components/icon' },
163-
{ text: 'Alert', link: '/ru/components/alert' },
164-
{ text: 'AspectRatio', link: '/ru/components/aspect-ratio' },
165-
{ text: 'Accordion', link: '/ru/components/accordion' },
166-
{ text: 'Tabs', link: '/ru/components/tabs' },
167-
{ text: 'Calendar', link: '/ru/components/calendar' },
168183
{ text: 'Stepper', link: '/ru/components/stepper' },
169184
{ text: 'Switch', link: '/ru/components/switch' },
170-
{ text: 'Range', link: '/ru/components/range' },
171-
{ text: 'Rating', link: '/ru/components/rating' },
172-
{ text: 'Progress', link: '/ru/components/progress' },
173-
{ text: 'Comparison', link: '/ru/components/comparison' },
185+
{ text: 'Tabs', link: '/ru/components/tabs' },
186+
{ text: 'Textarea', link: '/ru/components/textarea' },
174187
{ text: 'Tooltip', link: '/ru/components/tooltip' },
175188
{ text: 'Tour', link: '/ru/components/tour' },
176189
],
@@ -211,4 +224,14 @@ export default defineConfig({
211224
copyright: 'Copyright © 2025-present Alexander Zhukov',
212225
},
213226
},
227+
228+
vite: {
229+
css: {
230+
postcss: {
231+
plugins: [
232+
postcssIsolateStyles({ includeFiles: [/vp-doc\.css/] }),
233+
],
234+
},
235+
},
236+
},
214237
});

0 commit comments

Comments
 (0)