Skip to content

Commit 8af0745

Browse files
committed
docs: improve templates and add status page
1 parent a777038 commit 8af0745

File tree

5 files changed

+44
-22
lines changed

5 files changed

+44
-22
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"eslint.experimental.useFlatConfig": true,
2+
"eslint.useFlatConfig": true,
33
"prettier.enable": false,
44
}

docs/components/AppFooter.vue

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const links = [
1111
label: 'Privacy',
1212
to: 'https://admin.hub.nuxt.com/privacy',
1313
target: '_blank'
14+
}, {
15+
label: 'Status',
16+
to: 'https://status.hub.nuxt.com',
17+
target: '_blank'
1418
}
1519
]
1620
</script>

docs/content/2.templates.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ hero:
88
- label: Deploy a template
99
icon: i-ph-rocket-launch-duotone
1010
color: black
11-
to: https://admin.hub.nuxt.com
12-
target: _blank
11+
to: https://hub.nuxt.com/new
12+
external: true
1313
- label: Read the documentation
1414
icon: i-ph-book-open
1515
color: white

docs/pages/index.vue

+9-5
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ onMounted(() => {
136136

137137
<!-- Full Stack section -->
138138
<ULandingSection
139-
:title="page?.fullStack.title" :links="page?.fullStack.buttons"
139+
:title="page?.fullStack.title"
140+
:links="page?.fullStack.buttons"
141+
:ui="{
142+
title: 'text-4xl'
143+
}"
140144
>
141145
<template v-if="page?.fullStack.headline" #headline>
142146
<UBadge color="white" size="lg" class="rounded-full mb-6">
@@ -156,7 +160,7 @@ onMounted(() => {
156160
align="left"
157161
:ui="{
158162
wrapper: 'pt-0 sm:pt-0 pb-24',
159-
container: 'gap-8',
163+
container: 'gap-y-8 sm:gap-y-12',
160164
title: 'text-xl sm:text-2xl lg:text-3xl font-semibold',
161165
description: 'text-base mt-3 dark:text-gray-400'
162166
}"
@@ -192,7 +196,7 @@ onMounted(() => {
192196
align="right"
193197
:ui="{
194198
wrapper: 'pt-0 sm:pt-0 pb-24',
195-
container: 'gap-8',
199+
container: 'gap-y-8 sm:gap-y-12',
196200
title: 'text-xl sm:text-2xl lg:text-3xl font-semibold',
197201
description: 'text-base mt-3 dark:text-gray-400'
198202
}"
@@ -228,7 +232,7 @@ onMounted(() => {
228232
align="left"
229233
:ui="{
230234
wrapper: 'pt-0 sm:pt-0 pb-24',
231-
container: 'gap-8',
235+
container: 'gap-y-8 sm:gap-y-12',
232236
title: 'text-xl sm:text-2xl lg:text-3xl font-semibold',
233237
description: 'text-base mt-3 dark:text-gray-400'
234238
}"
@@ -264,7 +268,7 @@ onMounted(() => {
264268
align="right"
265269
:ui="{
266270
wrapper: 'pt-0 sm:pt-0 pb-24 mb-10',
267-
container: 'gap-8',
271+
container: 'gap-y-8 sm:gap-y-12',
268272
title: 'text-xl sm:text-2xl lg:text-3xl font-semibold',
269273
description: 'text-base mt-3 dark:text-gray-400'
270274
}"

docs/pages/templates.vue

+28-14
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ defineOgImageComponent('Docs')
1818
<template>
1919
<UContainer>
2020
<UPageHero v-bind="page?.hero" :ui="{ base: 'z-10' }" />
21-
<UPageGrid class="lg:grid-cols-3 xl:grid-cols-4">
21+
<UPageGrid class="lg:grid-cols-3 xl:grid-cols-4 pb-10">
2222
<UPageCard
2323
v-for="(template, index) in templates"
2424
:key="index"
@@ -28,9 +28,24 @@ defineOgImageComponent('Docs')
2828
description: 'line-clamp-2 sm:min-h-[45px]'
2929
}"
3030
class="overflow-hidden"
31-
:title="template.title"
3231
:description="template.description"
3332
>
33+
<template #title>
34+
<div class="flex flex-1 items-center justify-between">
35+
<span class="text-gray-900 dark:text-white text-base font-semibold truncate">
36+
{{ template.title }}
37+
</span>
38+
<UButton
39+
icon="i-simple-icons-github"
40+
:to="`https://github.com/${template.owner}/${template.repo}`"
41+
target="_blank"
42+
size="xs"
43+
color="gray"
44+
variant="ghost"
45+
class="opacity-75 hover:opacity-100"
46+
/>
47+
</div>
48+
</template>
3449
<template #header>
3550
<img
3651
:src="template.imageUrl"
@@ -57,14 +72,14 @@ defineOgImageComponent('Docs')
5772
size="sm"
5873
class="rounded-full"
5974
/>
60-
<UBadge
61-
v-for="feature of template.features"
62-
:key="feature"
63-
:label="feature"
64-
size="sm"
65-
color="gray"
66-
class="rounded-full"
67-
/>
75+
<NuxtLink v-for="feature of template.features" :key="feature" :to="`/docs/features/${feature}`">
76+
<UBadge
77+
:label="feature"
78+
size="sm"
79+
color="gray"
80+
class="rounded-full hover:text-black dark:hover:text-white"
81+
/>
82+
</NuxtLink>
6883
</div>
6984
<UButtonGroup class="mt-3 w-full">
7085
<UButton
@@ -79,10 +94,9 @@ defineOgImageComponent('Docs')
7994
:ui="{ icon: { size: { sm: 'w-4 h-4' } } }"
8095
/>
8196
<UButton
82-
label="GitHub"
83-
icon="i-simple-icons-github"
84-
:to="`https://github.com/${template.owner}/${template.repo}`"
85-
target="_blank"
97+
label="Deploy"
98+
icon="i-ph-rocket-launch-duotone"
99+
:to="`https://hub.nuxt.com/new?template=${template.slug}`"
86100
size="sm"
87101
color="gray"
88102
class="justify-center"

0 commit comments

Comments
 (0)