Skip to content

Commit 9dc5b37

Browse files
committed
chore(app): initial commit by Nuxt Studio
0 parents  commit 9dc5b37

31 files changed

+13416
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Production license for @nuxt/ui-pro, get one at https://ui.nuxt.com/pro/purchase
2+
NUXT_UI_PRO_LICENSE=
3+
4+
# Public URL, used for OG Image when running nuxt generate
5+
NUXT_PUBLIC_SITE_URL=

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
dist
8+
9+
# Node dependencies
10+
node_modules
11+
12+
# Logs
13+
logs
14+
*.log
15+
16+
# Misc
17+
.DS_Store
18+
.fleet
19+
.idea
20+
21+
# Local env files
22+
.env
23+
.env.*
24+
!.env.example
25+
26+
# VSC
27+
.history

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shamefully-hoist=true

README.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
![nuxt-ui-docs-social-card](https://github.com/nuxt-ui-pro/docs/assets/739984/f64e13d9-9ae0-4e03-bf7f-6be4c36cd9ba)
2+
3+
# Nuxt UI Pro - Docs template
4+
5+
[![Nuxt UI Pro](https://img.shields.io/badge/Made%20with-Nuxt%20UI%20Pro-00DC82?logo=nuxt.js&labelColor=020420)](https://ui.nuxt.com/pro)
6+
[![Nuxt Studio](https://img.shields.io/badge/Open%20in%20Nuxt%20Studio-18181B?&logo=nuxt.js&logoColor=3BB5EC)](https://nuxt.studio/themes/docs)
7+
8+
- [Live demo](https://docs-template.nuxt.dev/)
9+
- [Play on Stackblitz](https://stackblitz.com/github/nuxt-ui-pro/docs)
10+
- [Documentation](https://ui.nuxt.com/pro/getting-started)
11+
- [Clone on Nuxt Studio](https://nuxt.studio/templates/docs)
12+
13+
[![Deploy to NuxtHub](https://hub.nuxt.com/button.svg)](https://hub.nuxt.com/new?repo=nuxt-ui-pro/docs)
14+
15+
## Quick Start
16+
17+
```bash [Terminal]
18+
npx nuxi init -t github:nuxt-ui-pro/docs
19+
```
20+
21+
## Setup
22+
23+
Make sure to install the dependencies:
24+
25+
```bash
26+
# npm
27+
npm install
28+
29+
# pnpm
30+
pnpm install
31+
32+
# yarn
33+
yarn install
34+
35+
# bun
36+
bun install
37+
```
38+
39+
## Development Server
40+
41+
Start the development server on `http://localhost:3000`:
42+
43+
```bash
44+
# npm
45+
npm run dev
46+
47+
# pnpm
48+
pnpm run dev
49+
50+
# yarn
51+
yarn dev
52+
53+
# bun
54+
bun run dev
55+
```
56+
57+
## Production
58+
59+
Build the application for production:
60+
61+
```bash
62+
# npm
63+
npm run build
64+
65+
# pnpm
66+
pnpm run build
67+
68+
# yarn
69+
yarn build
70+
71+
# bun
72+
bun run build
73+
```
74+
75+
Locally preview production build:
76+
77+
```bash
78+
# npm
79+
npm run preview
80+
81+
# pnpm
82+
pnpm run preview
83+
84+
# yarn
85+
yarn preview
86+
87+
# bun
88+
bun run preview
89+
```
90+
91+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
92+
93+
## Nuxt Studio integration
94+
95+
Add `@nuxthq/studio` dependency to your package.json:
96+
97+
```bash
98+
# npm
99+
npm install --save-dev @nuxthq/studio
100+
101+
# pnpm
102+
pnpm add -D @nuxthq/studio
103+
104+
# yarn
105+
yarn add -D @nuxthq/studio
106+
107+
# bun
108+
bun add -d @nuxthq/studio
109+
```
110+
111+
Add this module to your `nuxt.config.ts`:
112+
113+
```ts
114+
export default defineNuxtConfig({
115+
...
116+
modules: [
117+
...
118+
'@nuxthq/studio'
119+
]
120+
})
121+
```
122+
123+
Read more on [Nuxt Studio docs](https://nuxt.studio/docs/get-started/setup).
124+
125+
## Renovate integration
126+
127+
Install [Renovate GitHub app](https://github.com/apps/renovate/installations/select_target) on your repository and you are good to go.

app/app.config.ts

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
export default defineAppConfig({
2+
ui: {
3+
primary: 'green',
4+
gray: 'slate',
5+
footer: {
6+
bottom: {
7+
left: 'text-sm text-gray-500 dark:text-gray-400',
8+
wrapper: 'border-t border-gray-200 dark:border-gray-800'
9+
}
10+
}
11+
},
12+
seo: {
13+
siteName: 'Nuxt UI Pro - Docs template'
14+
},
15+
header: {
16+
logo: {
17+
alt: '',
18+
light: '',
19+
dark: ''
20+
},
21+
search: true,
22+
colorMode: true,
23+
links: [{
24+
'icon': 'i-simple-icons-github',
25+
'to': 'https://github.com/nuxt-ui-pro/docs',
26+
'target': '_blank',
27+
'aria-label': 'Docs template on GitHub'
28+
}]
29+
},
30+
footer: {
31+
credits: 'Copyright © 2023',
32+
colorMode: false,
33+
links: [{
34+
'icon': 'i-simple-icons-nuxtdotjs',
35+
'to': 'https://nuxt.com',
36+
'target': '_blank',
37+
'aria-label': 'Nuxt Website'
38+
}, {
39+
'icon': 'i-simple-icons-discord',
40+
'to': 'https://discord.com/invite/ps2h6QT',
41+
'target': '_blank',
42+
'aria-label': 'Nuxt UI on Discord'
43+
}, {
44+
'icon': 'i-simple-icons-x',
45+
'to': 'https://x.com/nuxt_js',
46+
'target': '_blank',
47+
'aria-label': 'Nuxt on X'
48+
}, {
49+
'icon': 'i-simple-icons-github',
50+
'to': 'https://github.com/nuxt/ui',
51+
'target': '_blank',
52+
'aria-label': 'Nuxt UI on GitHub'
53+
}]
54+
},
55+
toc: {
56+
title: 'Table of Contents',
57+
bottom: {
58+
title: 'Community',
59+
edit: 'https://github.com/nuxt-ui-pro/docs/edit/main/content',
60+
links: [{
61+
icon: 'i-heroicons-star',
62+
label: 'Star on GitHub',
63+
to: 'https://github.com/nuxt/ui',
64+
target: '_blank'
65+
}, {
66+
icon: 'i-heroicons-book-open',
67+
label: 'Nuxt UI Pro docs',
68+
to: 'https://ui.nuxt.com/pro/guide',
69+
target: '_blank'
70+
}, {
71+
icon: 'i-simple-icons-nuxtdotjs',
72+
label: 'Purchase a license',
73+
to: 'https://ui.nuxt.com/pro/purchase',
74+
target: '_blank'
75+
}]
76+
}
77+
}
78+
})

app/app.vue

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<script setup lang="ts">
2+
import type { ParsedContent } from '@nuxt/content'
3+
4+
const { seo } = useAppConfig()
5+
6+
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
7+
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
8+
default: () => [],
9+
server: false
10+
})
11+
12+
useHead({
13+
meta: [
14+
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
15+
],
16+
link: [
17+
{ rel: 'icon', href: '/favicon.ico' }
18+
],
19+
htmlAttrs: {
20+
lang: 'en'
21+
}
22+
})
23+
24+
useSeoMeta({
25+
titleTemplate: `%s - ${seo?.siteName}`,
26+
ogSiteName: seo?.siteName,
27+
ogImage: 'https://docs-template.nuxt.dev/social-card.png',
28+
twitterImage: 'https://docs-template.nuxt.dev/social-card.png',
29+
twitterCard: 'summary_large_image'
30+
})
31+
32+
provide('navigation', navigation)
33+
</script>
34+
35+
<template>
36+
<div>
37+
<NuxtLoadingIndicator />
38+
39+
<AppHeader />
40+
41+
<UMain>
42+
<NuxtLayout>
43+
<NuxtPage />
44+
</NuxtLayout>
45+
</UMain>
46+
47+
<AppFooter />
48+
49+
<ClientOnly>
50+
<LazyUContentSearch
51+
:files="files"
52+
:navigation="navigation"
53+
/>
54+
</ClientOnly>
55+
56+
<UNotifications />
57+
</div>
58+
</template>

app/components/AppFooter.vue

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<script setup lang="ts">
2+
const { footer } = useAppConfig()
3+
</script>
4+
5+
<template>
6+
<UFooter>
7+
<template #left>
8+
{{ footer.credits }}
9+
</template>
10+
11+
<template #right>
12+
<UColorModeButton v-if="footer?.colorMode" />
13+
14+
<template v-if="footer?.links">
15+
<UButton
16+
v-for="(link, index) of footer?.links"
17+
:key="index"
18+
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
19+
/>
20+
</template>
21+
</template>
22+
</UFooter>
23+
</template>

app/components/AppHeader.vue

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<script setup lang="ts">
2+
import type { NavItem } from '@nuxt/content'
3+
4+
const navigation = inject<NavItem[]>('navigation', [])
5+
6+
const { header } = useAppConfig()
7+
</script>
8+
9+
<template>
10+
<UHeader>
11+
<template #logo>
12+
<template v-if="header?.logo?.dark || header?.logo?.light">
13+
<UColorModeImage v-bind="{ class: 'h-6 w-auto', ...header?.logo }" />
14+
</template>
15+
<template v-else>
16+
Nuxt UI Pro <UBadge
17+
label="Docs"
18+
variant="subtle"
19+
class="mb-0.5"
20+
/>
21+
</template>
22+
</template>
23+
24+
<template
25+
v-if="header?.search"
26+
#center
27+
>
28+
<UContentSearchButton class="hidden lg:flex" />
29+
</template>
30+
31+
<template #right>
32+
<UContentSearchButton
33+
v-if="header?.search"
34+
:label="null"
35+
class="lg:hidden"
36+
/>
37+
38+
<UColorModeButton v-if="header?.colorMode" />
39+
40+
<template v-if="header?.links">
41+
<UButton
42+
v-for="(link, index) of header.links"
43+
:key="index"
44+
v-bind="{ color: 'gray', variant: 'ghost', ...link }"
45+
/>
46+
</template>
47+
</template>
48+
49+
<template #panel>
50+
<UNavigationTree :links="mapContentNavigation(navigation)" />
51+
</template>
52+
</UHeader>
53+
</template>

0 commit comments

Comments
 (0)