Skip to content

Commit

Permalink
feat: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Jan 4, 2024
1 parent 881e062 commit 106c974
Show file tree
Hide file tree
Showing 40 changed files with 10,499 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist

# Node dependencies
node_modules

# Logs
logs
*.log

# Misc
.DS_Store
.fleet
.idea

# Local env files
.env
.env.*
!.env.example
1 change: 1 addition & 0 deletions .docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
3 changes: 3 additions & 0 deletions .docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"references.preferredLocation": "peek"
}
75 changes: 75 additions & 0 deletions .docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Nuxt 3 Minimal Starter

Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Setup

Make sure to install the dependencies:

```bash
# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

# bun
bun install
```

## Development Server

Start the development server on `http://localhost:3000`:

```bash
# npm
npm run dev

# pnpm
pnpm run dev

# yarn
yarn dev

# bun
bun run dev
```

## Production

Build the application for production:

```bash
# npm
npm run build

# pnpm
pnpm run build

# yarn
yarn build

# bun
bun run build
```

Locally preview production build:

```bash
# npm
npm run preview

# pnpm
pnpm run preview

# yarn
yarn preview

# bun
bun run preview
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
33 changes: 33 additions & 0 deletions .docs/[...slug].vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<script setup lang="ts">
import type { NavItem } from '@nuxt/content/dist/runtime/types'
const navigation = inject<Ref<NavItem[]>>('navigation')
const route = useRoute()
const { navPageFromPath } = useContentHelpers()
const { headerLinks } = useNavigation()
const links = computed(() => headerLinks.value.find(link => link.to === '/pergel')?.children ?? [])
const navigationLinks = computed(() => {
const path = ['/pergel', route.params.slug?.[0]].filter(Boolean).join('/')
return mapContentNavigation(navPageFromPath(path, navigation!.value)?.children || [])
})
</script>

<template>
<UContainer>
<UPage>
<template #left>
<UAside :links="links">
<UDivider type="dashed" class="mb-6" />

<UNavigationTree :links="navigationLinks" default-open :multiple="false" />
</UAside>
</template>

<NuxtPage />
</UPage>
</UContainer>
</template>
192 changes: 192 additions & 0 deletions .docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
export default defineAppConfig({
ui: {
primary: 'yellow',
gray: 'slate',
avatar: {
default: {
icon: 'i-ph-image',
},
},
button: {
default: {
loadingIcon: 'i-ph-spinner',
},
},
input: {
default: {
loadingIcon: 'i-ph-spinner',
},
},
select: {
default: {
loadingIcon: 'i-ph-spinner',
trailingIcon: 'i-ph-caret-down',
},
},
selectMenu: {
default: {
selectedIcon: 'i-ph-check',
},
},
notification: {
default: {
closeButton: {
icon: 'i-ph-x',
},
},
},
commandPalette: {
default: {
icon: 'i-ph-magnifying-glass-duotone',
loadingIcon: 'i-ph-spinner',
selectedIcon: 'i-ph-check',
emptyState: {
icon: 'i-ph-magnifying-glass-duotone',
},
closeButton: {
icon: 'i-ph-x',
},
},
},
table: {
default: {
sortAscIcon: 'i-ph-sort-ascending',
sortDescIcon: 'i-ph-sort-descending',
sortButton: {
icon: 'i-ph-list',
},
loadingState: {
icon: 'i-ph-spinner',
},
emptyState: {
icon: 'i-ph-database',
},
},
},
pagination: {
default: {
prevButton: {
icon: 'i-ph-arrow-left',
},
nextButton: {
icon: 'i-ph-arrow-right',
},
},
},
card: {
rounded: 'rounded-xl',
},
tooltip: {
background: '!bg-background',
popper: {
strategy: 'absolute',
},
},
breadcrumb: {
divider: {
base: 'w-4 h-4',
},
default: {
divider: 'i-ph-caret-right',
},
},
// `@nuxt/ui-pro` specific
variables: {
dark: {
background: 'var(--color-gray-950)',
},
},
icons: {
dark: 'i-ph-moon-duotone',
light: 'i-ph-sun-duotone',
search: 'i-ph-magnifying-glass-duotone',
external: 'i-ph-arrow-up-right',
chevron: 'i-ph-caret-down',
hash: 'i-ph-hash-duotone',
},
header: {
wrapper: 'lg:mb-0 lg:border-0',
links: {
trailingIcon: {
base: 'w-4 h-4',
},
popover: {
popper: {
strategy: 'absolute',
},
ui: {
width: 'w-[16rem]',
},
},
},
popover: {
links: {
active: 'dark:bg-gray-950/50',
inactive: 'dark:hover:bg-gray-950/50',
},
},
button: {
icon: {
open: 'i-ph-list',
close: 'i-ph-x',
},
},
},
navigation: {
accordion: {
button: {
trailingIcon: {
base: 'w-4 h-4',
},
},
},
},
page: {
card: {
to: 'dark:hover:bg-gray-900/50',
},
},
docs: {
search: {
fileIcon: {
name: 'i-ph-file-text-duotone',
},
},
toc: {
button: {
trailingIcon: {
base: 'w-4 h-4',
},
},
},
surround: {
icon: {
prev: 'i-ph-arrow-left',
next: 'i-ph-arrow-right',
},
},
},
content: {
collapsible: {
button: {
icon: {
base: 'w-3 h-3',
},
},
},
prose: {
code: {
button: {
icon: {
copy: 'i-ph-copy-duotone',
copied: 'i-ph-check-square-duotone',
},
},
icon: {
terminal: 'i-ph-terminal-window-duotone',
},
},
},
},
},
})
Loading

0 comments on commit 106c974

Please sign in to comment.