Skip to content

Commit bfa179e

Browse files
committed
docs: add content components and improve og image
1 parent 32e3467 commit bfa179e

File tree

15 files changed

+138
-27
lines changed

15 files changed

+138
-27
lines changed

docs/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default defineAppConfig({
2828
}]
2929
},
3030
footer: {
31-
credits: 'Copyright © 2024',
31+
credits: 'Copyright NuxtLabs © 2024',
3232
colorMode: false,
3333
links: [{
3434
icon: 'i-simple-icons-nuxtdotjs',

docs/components/OgImage/OgImageDocs.vue

Lines changed: 42 additions & 6 deletions
Large diffs are not rendered by default.

docs/components/content/Alert.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
<script setup lang="ts">
3+
import type uiColors from '#ui-colors'
4+
5+
const props = defineProps({
6+
title: { type: String },
7+
icon: { type: String },
8+
color: { type: String as PropType<(typeof uiColors)[number]> },
9+
to: { type: String },
10+
})
11+
12+
const target = computed(() => (props.to?.startsWith('https://') ? '_blank' : ''))
13+
</script>
14+
15+
<template>
16+
<Callout :icon="icon" :color="color" :to="to" :target="target">
17+
<ContentSlot :use="$slots.default" unwrap="p" />
18+
</Callout>
19+
</template>

docs/components/content/Caution.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<Alert
3+
title="Caution"
4+
icon="i-ph-warning-octagon-duotone"
5+
color="red"
6+
class="prose-a:text-red-500 hover:prose-a:border-red-500 dark:prose-a:text-red-400 dark:hover:prose-a:border-red-400 dark:!bg-red-800/40 !bg-red-200/40 dark:!border-red-600/30 !border-red-400/30"
7+
:class="$attrs.to ? 'dark:hover:!border-red-600/50 hover:!border-red-400/50' : ''"
8+
>
9+
<ContentSlot :use="$slots.default" unwrap="p" />
10+
</Alert>
11+
</template>

docs/components/content/Important.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<Alert
3+
title="Important"
4+
icon="i-ph-warning-diamond-duotone"
5+
color="violet"
6+
class="prose-a:text-violet-500 hover:prose-a:border-violet-500 dark:prose-a:text-violet-400 dark:hover:prose-a:border-violet-400 dark:!bg-violet-800/30 !bg-violet-200/50 dark:!border-violet-600/30 !border-violet-400/30"
7+
:class="$attrs.to ? 'dark:hover:!border-violet-600/50 hover:!border-violet-400/50' : ''"
8+
>
9+
<ContentSlot :use="$slots.default" unwrap="p" />
10+
</Alert>
11+
</template>

docs/components/content/Note.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<Alert
3+
title="Note"
4+
icon="i-ph-info-duotone"
5+
color="blue"
6+
class="prose-a:text-blue-500 hover:prose-a:border-blue-500 dark:prose-a:text-blue-400 dark:hover:prose-a:border-blue-400 dark:!bg-blue-800/40 !bg-blue-200/40 dark:!border-blue-600/30 !border-blue-400/30"
7+
:class="$attrs.to ? 'dark:hover:!border-blue-600/50 hover:!border-blue-400/50' : ''"
8+
>
9+
<ContentSlot :use="$slots.default" unwrap="p" />
10+
</Alert>
11+
</template>

docs/components/content/Tip.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<Alert
3+
title="Tip"
4+
icon="i-ph-lightbulb-duotone"
5+
color="green"
6+
class="dark:!bg-green-800/40 !bg-green-200/40 dark:!border-green-600/30 !border-green-400/30"
7+
:class="$attrs.to ? 'dark:hover:!border-green-600/50 hover:!border-green-400/50' : ''"
8+
>
9+
<ContentSlot :use="$slots.default" unwrap="p" />
10+
</Alert>
11+
</template>

docs/components/content/Warning.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<Alert
3+
title="Warning"
4+
icon="i-ph-warning-duotone"
5+
color="amber"
6+
class="prose-a:text-amber-500 hover:prose-a:border-amber-500 dark:prose-a:text-amber-400 dark:hover:prose-a:border-amber-400 dark:!bg-amber-800/40 dark:!border-amber-800/40 !bg-amber-200/30 !border-amber-400/30"
7+
:class="$attrs.to ? 'dark:hover:!border-amber-600/50 hover:!border-amber-400/50' : ''"
8+
>
9+
<ContentSlot :use="$slots.default" unwrap="p" />
10+
</Alert>
11+
</template>

docs/content/docs/1.getting-started/1.index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ NuxtHub comes with a powerful proxy system to connect to your project's resource
2424

2525
## Packages
2626

27-
We plan to provide a complete backend experience for Nuxt apps through various `@nuxthub` modules.
27+
We plan to provide a complete backend experience for Nuxt apps through various `@nuxthub` packages.
2828

2929
- [`@nuxthub/core`](https://github.com/nuxt-hub/core): Main package to provide storage features
3030
- `@nuxthub/auth`: Add authentication for user management (soon)
3131
- `@nuxthub/email`: Send transactional emails to your users (soon)
3232
- `@nuxthub/analytics`: Understand your traffic and track events within your application and API (soon)
3333
- `@nuxthub/...`: You name it!
3434

35-
::callout
36-
We are currently in the early stages of development and are looking for feedback from the community. If you are interested in contributing, please join us on [nuxt-hub/core](https://github.com/nuxt-hub/core).
35+
::important
36+
We are currently in the early stages of development (alpha) and are looking for feedback from the community. If you are interested in contributing, please join us on [nuxt-hub/core](https://github.com/nuxt-hub/core).
3737
::
3838

3939
## Console (alpha)
@@ -52,6 +52,6 @@ The [NuxtHub console](https://console.hub.nuxt.com) is a web based dashboard to
5252
- Give access to team members to manage the application without sharing your Cloudflare account
5353
- Monitor your application with logs and analytics
5454

55-
::callout
55+
::note
5656
The NuxtHub Console is currently in private alpha and is not yet open to the public. We are looking for early adopters to help us shape the platform. If you are interested, please register on [console.hub.nuxt.com](https://console.hub.nuxt.com) and tell us what you plan to build with NuxtHub.
5757
::

docs/content/docs/1.getting-started/2.installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default defineNuxtConfig({
6060

6161
That's it! You can now use NuxtHub features in your Nuxt project.
6262

63-
::callout
63+
::note
6464
NuxtHub will create a `.data/hub` directory in your project root, which contains the necessary configuration files and resources for the features to work. It will also add it to the `.gitignore` file to avoid committing it to your repository.
6565
::
6666

@@ -85,6 +85,6 @@ export default defineNuxtConfig({
8585
::
8686
::
8787

88-
::callout
88+
::tip{icon="i-ph-rocket-launch-duotone"}
8989
You're all set! Now, let's dive into connecting to your Cloudflare account and [deploying it on the Edge](/docs/getting-started/deploy).
9090
::

0 commit comments

Comments
 (0)