Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Applelo committed Feb 28, 2024
1 parent 87bd3b2 commit 813e8b8
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 41 deletions.
98 changes: 57 additions & 41 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,67 @@ export default defineConfig({
nav: [
{ text: 'Home', link: '/' },
{ text: 'Guide', link: '/guide/' },
{ text: 'Demo', link: '/demo/collapse' },
{ text: 'Demo', link: '/demo/' },
],
search: {
provider: 'local',
},
sidebar: [
{
text: 'Guide',
items: [
{ text: 'Get started', link: '/guide/' },
{
text: 'Collapse / Accordion',
link: '/guide/collapse',
},
{
text: 'Drag',
link: '/guide/drag',
},
{
text: 'Drilldown',
link: '/guide/drilldown',
},
{
text: 'Dropdown',
link: '/guide/dropdown',
},
{
text: 'Marquee',
link: '/guide/marquee',
},
],
},
{
text: 'Demo',
collapsed: true,
items: [
{ text: 'Collapse/Accordion', link: '/demo/collapse' },
{ text: 'Drag', link: '/demo/drag' },
{ text: 'Drilldown', link: '/demo/drilldown' },
{ text: 'Dropdown', link: '/demo/dropdown' },
{ text: 'Marquee', link: '/demo/marquee' },
],
},
],

sidebar: {
'/guide/': [
{
text: 'Guide',
items: [
{ text: 'Get started', link: '/guide/' },
{
text: 'Collapse / Accordion',
link: '/guide/collapse',
},
{
text: 'Drag',
link: '/guide/drag',
},
{
text: 'Drilldown',
link: '/guide/drilldown',
},
{
text: 'Dropdown',
link: '/guide/dropdown',
},
{
text: 'Marquee',
link: '/guide/marquee',
},
],
},
{
text: 'Vue',
items: [
{
text: 'Get started',
link: '/guide/vue/',
},
{
text: 'Composables',
link: '/guide/vue/composables',
},
],
},
],
'/demo/': [
{
text: 'Demo',
link: '/demo/',
items: [
{ text: 'Collapse/Accordion', link: '/demo/collapse' },
{ text: 'Drag', link: '/demo/drag' },
{ text: 'Drilldown', link: '/demo/drilldown' },
{ text: 'Dropdown', link: '/demo/dropdown' },
{ text: 'Marquee', link: '/demo/marquee' },
],
},
],
},
socialLinks: [
{ icon: 'github', link: 'https://github.com/Applelo/compotes' },
],
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
--vp-c-brand-dark: #535bf2;
--vp-c-brand-darker: #454ce1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
--vp-c-brand-1: var(--vp-c-brand);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions docs/demo/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Demo

Compotes provides minimum styles, so some CSS is added to make it work with the CSS provided by the documentation (VitePress).

Demo are made with the Vanilla JS version of the library and encapsulated with VueJS.

You can check directly [the source code of the documentation](https://github.com/Applelo/compotes/tree/main/docs/demo) for more details.
3 changes: 3 additions & 0 deletions docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# pnpm
pnpm add -D compotes

# bun
bun add -D compotes

#npm
npm i -D compotes

Expand Down
1 change: 1 addition & 0 deletions docs/guide/vue/composables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Vue Composables
27 changes: 27 additions & 0 deletions docs/guide/vue/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Vue

`@compotes/vue` provides [composables](/guide/vue/composables) and soon components wrappers for the `compotes` library.

## Installation

Install the Vue version of the library with your favorite package manager.

::: info
No needs to install the `compotes` package since it is a dependencies of `@compotes/vue`.
:::

```shell
# pnpm
pnpm add -D @compotes/vue

# bun
bun add -D @compotes/vue

#npm
npm i -D @compotes/vue

# yarn
yarn add -D @compotes/vue
```

For usage, check the [composables](/guide/vue/composables) page.

0 comments on commit 813e8b8

Please sign in to comment.