Skip to content

Commit 4c5d4e9

Browse files
committed
feat(docs): update configuration and content for AI Better UI, add logo and image module
1 parent fbd120b commit 4c5d4e9

File tree

10 files changed

+347
-17
lines changed

10 files changed

+347
-17
lines changed

aibetter.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"rules": {
44
"constitution": true,
55
"roles": {
6-
"R&D Engineer": true
6+
"R&D Engineer": true,
7+
"Translator": true
78
},
89
"languages": {
910
"TypeScript": true,

docs/app/pages/[...slug].vue

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ const { data: page } = await useAsyncData(route.path, () => {
1010

1111
<template>
1212
<div>
13-
<header class="h-16 px-4 flex items-center justify-between">
13+
<header class="h-14 px-4 flex items-center justify-between">
1414
<div>
15-
<NuxtLink to="/" class="text-2xl font-bold">
16-
UI
15+
<NuxtLink to="/" class="flex items-center gap-2">
16+
<NuxtImg src="/logo.svg" alt="AI Better UI" class="size-8" />
17+
<span class="text-2xl font-bold">UI</span>
1718
</NuxtLink>
1819
</div>
1920
<div>
@@ -29,35 +30,48 @@ const { data: page } = await useAsyncData(route.path, () => {
2930
/>
3031
</div>
3132
</header>
32-
<main class="flex">
33-
<menu class="w-48 px-4">
33+
<main class="flex h-[calc(100vh-3.5rem)]">
34+
<menu class="w-48 h-full px-4 overflow-auto">
3435
<ul>
3536
<li>
36-
<NuxtLink to="/components/button">
37+
<NuxtLink
38+
class="block px-3 py-1 rounded-md transition-colors hover:bg-primary-50"
39+
to="/components/button"
40+
>
3741
Button
3842
</NuxtLink>
3943
</li>
4044
<li>
41-
<NuxtLink to="/components/icon">
45+
<NuxtLink
46+
class="block px-3 py-1 rounded-md transition-colors hover:bg-primary-50"
47+
to="/components/icon"
48+
>
4249
Icon
4350
</NuxtLink>
4451
</li>
4552
<li>
46-
<NuxtLink to="/components/input">
53+
<NuxtLink
54+
class="block px-3 py-1 rounded-md transition-colors hover:bg-primary-50"
55+
to="/components/input"
56+
>
4757
Input
4858
</NuxtLink>
4959
</li>
5060
<li>
51-
<NuxtLink to="/components/select">
61+
<NuxtLink
62+
class="block px-3 py-1 rounded-md transition-colors hover:bg-primary-50"
63+
to="/components/select"
64+
>
5265
Select
5366
</NuxtLink>
5467
</li>
5568
</ul>
5669
</menu>
57-
<article class="flex-1 prose">
58-
<ContentRenderer v-if="page" :value="page" />
59-
</article>
70+
<div class="flex-1 h-full overflow-auto">
71+
<article class=" prose h-full">
72+
<ContentRenderer v-if="page" :value="page" />
73+
</article>
74+
</div>
6075
</main>
61-
<footer><!-- ... --></footer>
6276
</div>
6377
</template>

docs/content/index.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,36 @@
1-
# UI
1+
# AI Better UI
2+
3+
UI Kit for AI & Vue
4+
5+
## Theme
6+
7+
Use [tailwindcss](https://tailwindcss.com/) to maintain UI style
8+
9+
### Color Tokens
10+
11+
| Color | Description |
12+
| --- | --- |
13+
| `color`-50 | Lightest background color, large area background |
14+
| `color`-100 | Card/container background color |
15+
| `color`-200 | Disabled state |
16+
| `color`-300 | Border line/divider line |
17+
| `color`-400 | Secondary action |
18+
| `color`-500 | Base color |
19+
| `color`-600 | Primary action |
20+
| `color`-700 | Hover state |
21+
| `color`-800 | Active state |
22+
| `color`-900 | Emphasis state |
23+
| `color`-950 | Darkest border color |
24+
25+
### Semantic Tokens
26+
27+
| Color | Description |
28+
| --- | --- |
29+
| `primary` | Primary color |
30+
| `secondary` | Secondary color |
31+
| `accent` | Accent color |
32+
| `muted` | Muted color |
33+
| `info` | Info color |
34+
| `success` | Success color |
35+
| `warning` | Warning color |
36+
| `error` | Error color |

docs/nuxt.config.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ import path from 'node:path'
22
import tailwindcss from '@tailwindcss/vite'
33

44
export default defineNuxtConfig({
5+
app: {
6+
head: {
7+
title: 'AI Better UI',
8+
htmlAttrs: {
9+
lang: 'en',
10+
},
11+
link: [
12+
{
13+
rel: 'icon',
14+
href: '/logo.svg',
15+
},
16+
],
17+
},
18+
},
519
compatibilityDate: '2025-07-15',
620
devtools: { enabled: true },
721
css: ['~/assets/css/main.css'],
@@ -17,5 +31,5 @@ export default defineNuxtConfig({
1731
},
1832
watch: ['./../packages/vue/src/**/*.{ts,vue}'],
1933

20-
modules: ['@nuxt/content', '@nuxt/fonts'],
34+
modules: ['@nuxt/content', '@nuxt/fonts', '@nuxt/image'],
2135
})

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@aibetter/ui-vue": "workspace:*",
1515
"@nuxt/content": "3.6.3",
1616
"@nuxt/fonts": "0.11.4",
17+
"@nuxt/image": "1.11.0",
1718
"nuxt": "^4.0.3",
1819
"vue": "^3.5.18",
1920
"vue-router": "^4.5.1",

docs/public/favicon.ico

-4.19 KB
Binary file not shown.

docs/public/logo.svg

Lines changed: 10 additions & 0 deletions
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ui",
33
"type": "module",
44
"version": "0.0.0",
5-
"packageManager": "pnpm@10.15.0",
5+
"packageManager": "pnpm@10.15.1",
66
"description": "The UI component library specially adapted for AI programming.",
77
"author": "litingyes",
88
"license": "MIT",

0 commit comments

Comments
 (0)