Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
arashsheyda wants to merge 3 commits into main
base: main
Choose a base branch
Loading
from refactor/docs-docus-v3
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions docs/app.config.ts
View file Open in desktop

This file was deleted.

93 changes: 0 additions & 93 deletions docs/app.vue
View file Open in desktop

This file was deleted.

26 changes: 26 additions & 0 deletions docs/app/app.config.ts
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
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
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<UContentSearchButton
:collapsed="false"
class="mb-8 w-full"
/>
</template>
89 changes: 89 additions & 0 deletions docs/app/components/content/Cta.vue
View file Open in desktop
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
View file Open in desktop
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>
Loading

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /