-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add content components and improve og image
- Loading branch information
Showing
15 changed files
with
138 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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,19 @@ | ||
|
||
<script setup lang="ts"> | ||
import type uiColors from '#ui-colors' | ||
const props = defineProps({ | ||
title: { type: String }, | ||
Check warning on line 6 in docs/components/content/Alert.vue GitHub Actions / test
|
||
icon: { type: String }, | ||
Check warning on line 7 in docs/components/content/Alert.vue GitHub Actions / test
|
||
color: { type: String as PropType<(typeof uiColors)[number]> }, | ||
Check warning on line 8 in docs/components/content/Alert.vue GitHub Actions / test
|
||
to: { type: String }, | ||
Check warning on line 9 in docs/components/content/Alert.vue GitHub Actions / test
|
||
}) | ||
const target = computed(() => (props.to?.startsWith('https://') ? '_blank' : '')) | ||
</script> | ||
|
||
<template> | ||
<Callout :icon="icon" :color="color" :to="to" :target="target"> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Callout> | ||
</template> |
This file contains 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,11 @@ | ||
<template> | ||
<Alert | ||
title="Caution" | ||
icon="i-ph-warning-octagon-duotone" | ||
color="red" | ||
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" | ||
:class="$attrs.to ? 'dark:hover:!border-red-600/50 hover:!border-red-400/50' : ''" | ||
> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Alert> | ||
</template> |
This file contains 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,11 @@ | ||
<template> | ||
<Alert | ||
title="Important" | ||
icon="i-ph-warning-diamond-duotone" | ||
color="violet" | ||
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" | ||
:class="$attrs.to ? 'dark:hover:!border-violet-600/50 hover:!border-violet-400/50' : ''" | ||
> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Alert> | ||
</template> |
This file contains 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,11 @@ | ||
<template> | ||
<Alert | ||
title="Note" | ||
icon="i-ph-info-duotone" | ||
color="blue" | ||
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" | ||
:class="$attrs.to ? 'dark:hover:!border-blue-600/50 hover:!border-blue-400/50' : ''" | ||
> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Alert> | ||
</template> |
This file contains 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,11 @@ | ||
<template> | ||
<Alert | ||
title="Tip" | ||
icon="i-ph-lightbulb-duotone" | ||
color="green" | ||
class="dark:!bg-green-800/40 !bg-green-200/40 dark:!border-green-600/30 !border-green-400/30" | ||
:class="$attrs.to ? 'dark:hover:!border-green-600/50 hover:!border-green-400/50' : ''" | ||
> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Alert> | ||
</template> |
This file contains 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,11 @@ | ||
<template> | ||
<Alert | ||
title="Warning" | ||
icon="i-ph-warning-duotone" | ||
color="amber" | ||
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" | ||
:class="$attrs.to ? 'dark:hover:!border-amber-600/50 hover:!border-amber-400/50' : ''" | ||
> | ||
<ContentSlot :use="$slots.default" unwrap="p" /> | ||
</Alert> | ||
</template> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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