-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97d234d
commit a072384
Showing
11 changed files
with
160 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
dist | ||
.github/ | ||
.vitepress/dist | ||
.vitepress/cache | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
import { defineConfig } from "vitepress"; | ||
import UnoCSS from "unocss/vite"; | ||
import { presetUno, presetWind, presetTypography } from "unocss"; | ||
// https://vitepress.dev/reference/site-config | ||
import { defineConfig } from 'vitepress' | ||
import UnoCSS from 'unocss/vite' | ||
import { presetUno, presetWind, presetTypography } from 'unocss' | ||
|
||
export default defineConfig({ | ||
title: "Design System", | ||
description: "🎋", | ||
title: 'Design System', | ||
description: '🎋', | ||
vite: { | ||
plugins: [ | ||
UnoCSS({ presets: [presetUno(), presetWind(), presetTypography()] }), | ||
], | ||
UnoCSS({ presets: [presetUno(), presetWind(), presetTypography()] }) | ||
] | ||
}, | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: "Home", link: "/" }, | ||
{ text: "Examples", link: "/markdown-examples" }, | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Colors', link: '/colors' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: "Examples", | ||
items: [ | ||
{ text: "Markdown Examples", link: "/markdown-examples" }, | ||
{ text: "Runtime API Examples", link: "/api-examples" }, | ||
], | ||
}, | ||
], | ||
sidebar: [{ text: 'Colors', link: '/colors' }], | ||
|
||
socialLinks: [ | ||
{ icon: "github", link: "https://github.com/vuejs/vitepress" }, | ||
], | ||
}, | ||
}); | ||
{ icon: 'github', link: 'https://github.com/fmhy/design-system' } | ||
] | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<template> | ||
<div class="flex flex-col space-y-12"> | ||
<div v-for="name in colorNames" :key="name"> | ||
<h3 class="capitalize">{{ name.replaceAll('-', ' ') }}</h3> | ||
<div class="grid grid-cols-5 md:grid-cols-10 mt-2"> | ||
<div v-for="color in colors[name]" :key="color"> | ||
<div | ||
class="h-12 transition-all" | ||
:style="`background: ${color}`" | ||
></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { colors } from '@fmhy/colors' | ||
const colorNames = Object.keys(colors) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import { h } from "vue"; | ||
import type { Theme } from "vitepress"; | ||
import DefaultTheme from "vitepress/theme"; | ||
import "./style.css"; | ||
import "uno.css"; | ||
import { h } from 'vue' | ||
import type { Theme } from 'vitepress' | ||
import DefaultTheme from 'vitepress/theme' | ||
import './style.css' | ||
import 'uno.css' | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
Layout: () => { | ||
return h(DefaultTheme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
}); | ||
}) | ||
}, | ||
enhanceApp({ app, router, siteData }) { | ||
// ... | ||
}, | ||
} satisfies Theme; | ||
} | ||
} satisfies Theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
<script setup> | ||
import Colors from "./.vitepress/theme/components/ColorShowcase.vue" | ||
</script> | ||
|
||
<Colors /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
{ | ||
"name": "@fmhy/docs", | ||
"private": true, | ||
"version": "1.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vitepress dev", | ||
"build": "vitepress build", | ||
"preview": "vitepress preview" | ||
}, | ||
"dependencies": { | ||
"sass": "^1.71.1", | ||
"unocss": "^0.58.5", | ||
"vitepress": "1.0.0-rc.45", | ||
"vue": "^3.4.21" | ||
} | ||
"name": "@fmhy/docs", | ||
"version": "1.0.0", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "vitepress build", | ||
"dev": "vitepress dev", | ||
"format": "prettier --write --cache .", | ||
"preview": "vitepress preview" | ||
}, | ||
"dependencies": { | ||
"@fmhy/colors": "workspace:^", | ||
"sass": "^1.71.1", | ||
"unocss": "^0.58.5", | ||
"vitepress": "1.0.0-rc.45", | ||
"vue": "^3.4.21" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.