-
Notifications
You must be signed in to change notification settings - Fork 190
docs: refactor to use docus v3 #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
+6,963
β4,110
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 0 additions & 28 deletions
docs/app.config.ts
Oops, something went wrong.
93 changes: 0 additions & 93 deletions
docs/app.vue
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
docs/app/app.config.ts
This file contains hidden or 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,26 @@ | ||
| export default defineAppConfig({ | ||
| socials: { | ||
| nuxt: 'https://nuxt.com', | ||
| x: 'https://x.com/nuxt_js', | ||
| }, | ||
| ui: { | ||
| colors: { | ||
| primary: 'green', | ||
| secondary: 'sky', | ||
| neutral: 'slate', | ||
| gray: 'slate', | ||
| }, | ||
| }, | ||
| elements: { | ||
| variables: { | ||
| light: { | ||
| background: '255 255 255', | ||
| foreground: 'var(--color-gray-700)', | ||
| }, | ||
| dark: { | ||
| background: 'var(--color-gray-950)', | ||
| foreground: 'var(--color-gray-200)', | ||
| }, | ||
| }, | ||
| }, | ||
| }) |
33 changes: 33 additions & 0 deletions
docs/app/components/AppHeaderBody.vue
This file contains hidden or 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,33 @@ | ||
| <script setup lang="ts"> | ||
| import type { ContentNavigationItem } from '@nuxt/content' | ||
|
|
||
| const navigation = inject<Ref<ContentNavigationItem[]>>('navigation') | ||
|
|
||
| const nav = computed(() => ([ | ||
| { | ||
| title: 'Documentation', | ||
| icon: 'i-heroicons-book-open-solid', | ||
| path: '/get-started/installation', | ||
| children: navigation!.value, | ||
| }, | ||
| { | ||
| title: 'Playground', | ||
| icon: 'i-ph-play-duotone', | ||
| path: '/playground', | ||
| }, | ||
| { | ||
| title: 'Releases', | ||
| icon: 'i-heroicons-rocket-launch-solid', | ||
| path: 'https://github.com/nuxt/image/releases', | ||
| target: '_blank', | ||
| }, | ||
| ])) | ||
| </script> | ||
|
|
||
| <template> | ||
| <UContentNavigation | ||
| highlight | ||
| variant="link" | ||
| :navigation="nav" | ||
| /> | ||
| </template> |
24 changes: 24 additions & 0 deletions
docs/app/components/AppHeaderCenter.vue
This file contains hidden or 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,24 @@ | ||
| <script setup lang="ts"> | ||
| const links = [ | ||
| { | ||
| label: 'Documentation', | ||
| to: '/guide/getting-started', | ||
| }, | ||
| { | ||
| label: 'Playground', | ||
| to: '/playground', | ||
| }, | ||
| { | ||
| label: 'Releases', | ||
| to: 'https://github.com/nuxt/devtools/releases', | ||
| target: '_blank', | ||
| }, | ||
| ] | ||
| </script> | ||
|
|
||
| <template> | ||
| <UNavigationMenu | ||
| :items="links" | ||
| variant="link" | ||
| /> | ||
| </template> |
File renamed without changes.
6 changes: 6 additions & 0 deletions
docs/app/components/DocsAsideLeftTop.vue
This file contains hidden or 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,6 @@ | ||
| <template> | ||
| <UContentSearchButton | ||
| :collapsed="false" | ||
| class="mb-8 w-full" | ||
| /> | ||
| </template> |
File renamed without changes.
89 changes: 89 additions & 0 deletions
docs/app/components/content/Cta.vue
This file contains hidden or 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,89 @@ | ||
| <script setup lang="ts"> | ||
| const { data: mod } = await useFetch<{ | ||
| stats: { | ||
| downloads: number | ||
| stars: number | ||
| } | ||
| contributors: { | ||
| username: string | ||
| }[] | ||
| }>('https://api.nuxt.com/modules/devtools', { | ||
| transform: ({ stats, contributors }: any) => ({ stats, contributors }), | ||
| }) | ||
|
|
||
| const { format: formatNumber } = Intl.NumberFormat('en-GB', { notation: 'compact' }) | ||
| </script> | ||
|
|
||
| <template> | ||
| <UPageCTA | ||
| align="left" | ||
| orientation="horizontal" | ||
| card | ||
| :ui="{ | ||
| links: 'mt-10 flex flex-col space-y-4 items-center justify-center lg:justify-start gap-x-6', | ||
| title: 'text-2xl font-medium tracking-tight text-white sm:text-3xl text-center lg:text-left', | ||
| root: 'bg-linear-to-b from-gray-900 to-gray-950', | ||
| }" | ||
| > | ||
| <template #title> | ||
| <span> | ||
| Trusted and supported by our amazing community | ||
| </span> | ||
| </template> | ||
|
|
||
| <template #links> | ||
| <UAvatarGroup v-if="mod" :max="13" size="md" class="flex-wrap lg:self-start [&_span:first-child]:text-xs"> | ||
| <UTooltip | ||
| v-for="(contributor, idx) of mod.contributors" | ||
| :key="idx" | ||
| :text="contributor.username" | ||
| :popper="{ offsetDistance: 16 }" | ||
| > | ||
| <UAvatar | ||
| :alt="contributor.username" | ||
| :src="`https://github.com/${contributor.username}.png`" | ||
| class="lg:hover:ring-primary-500 dark:lg:hover:ring-primary-400 transition-transform lg:hover:scale-125 lg:hover:ring-2" | ||
| size="md" | ||
| > | ||
| <NuxtLink | ||
| :to="`https://github.com/${contributor.username}`" | ||
| target="_blank" | ||
| class="focus:outline-none" | ||
| tabindex="-1" | ||
| > | ||
| <span class="absolute inset-0" aria-hidden="true" /> | ||
| </NuxtLink> | ||
| </UAvatar> | ||
| </UTooltip> | ||
| </UAvatarGroup> | ||
| <p class="text-center text-sm"> | ||
| Created and maintained by 50+ contributors | ||
| </p> | ||
| </template> | ||
|
|
||
| <div v-if="mod" class="flex flex-col items-center justify-center gap-8 sm:flex-row lg:gap-16"> | ||
| <NuxtLink class="group text-center" to="https://npmjs.org/package/@nuxt/devtools" target="_blank"> | ||
| <p class="group-hover:text-primary-500 dark:group-hover:text-primary-400 text-6xl text-gray-900 font-semibold dark:text-white"> | ||
| {{ formatNumber(mod.stats.downloads) }}+ | ||
| </p> | ||
| <p class="mt-2 text-sm font-normal"> | ||
| Monthly Downloads | ||
| </p> | ||
| </NuxtLink> | ||
|
|
||
| <NuxtLink class="group text-center" to="https://github.com/nuxt/devtools" target="_blank"> | ||
| <p class="group-hover:text-primary-500 dark:group-hover:text-primary-400 text-6xl text-gray-900 font-semibold dark:text-white"> | ||
| {{ formatNumber(mod.stats.stars) }}+ | ||
| </p> | ||
| <p class="mt-2 text-sm font-normal"> | ||
| Stars | ||
| </p> | ||
| </NuxtLink> | ||
| </div> | ||
|
|
||
| <slot /> | ||
| </UPageCTA> | ||
| </template> | ||
|
|
||
| <style lang="scss" scoped> | ||
| </style> |
16 changes: 16 additions & 0 deletions
docs/app/components/content/Gradient.vue
This file contains hidden or 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,16 @@ | ||
| <template> | ||
| <span class="gradient" /> | ||
| </template> | ||
|
|
||
| <style scoped> | ||
| .gradient { | ||
| position: fixed; | ||
| top: 35vh; | ||
| width: 100%; | ||
| height: 30vh; | ||
| background: radial-gradient(50% 50% at 50% 50%, #00dc82 0%, rgba(0, 220, 130, 0) 100%); | ||
| filter: blur(180px); | ||
| opacity: 0.6; | ||
| z-index: -1; | ||
| } | ||
| </style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.