Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Commit 81ca7a1

Browse files
committed
docs: special thanks to nuxt ui
fix #114
1 parent e24aa4e commit 81ca7a1

File tree

4 files changed

+72
-20
lines changed

4 files changed

+72
-20
lines changed

packages/.vitepress/theme/components/AsideOutlineAfter.vue

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { computed } from 'vue'
66
const route = useRoute()
77
88
const show = computed(() => {
9-
if (route.path.match(/components\/\w+/)) {
9+
if (route.path.match(/\/components\/\w+/)) {
1010
return true
1111
}
1212
13-
if (route.path.match(/composables\/\w+/)) {
13+
if (route.path.match(/\/composables\/\w+/)) {
1414
return true
1515
}
1616
17-
if (route.path.match(/keys\/\w+/)) {
17+
if (route.path.match(/\/keys\/\w+/)) {
1818
return true
1919
}
2020
@@ -41,24 +41,37 @@ const openIssue = computed(() => {
4141
</script>
4242

4343
<template>
44-
<div v-if="show" class="mt-6 pt-6 border-t border-dashed border-(--vp-c-divider)">
45-
<div role="heading" aria-level="2" class="font-semibold text-sm ml-4 leading-8">
46-
Contribute
47-
</div>
44+
<template v-if="show">
45+
<AsideOutlineAfterSection>
46+
<AsideOutlineAfterHeading title="Contribute" />
4847

49-
<a :href="viewComponent" target="_blank" class="flex flex-row items-center text-(--vp-c-text-2)! text-sm transition-colors duration-[250ms] leading-8 hover:text-(--vp-c-text-1)!">
50-
<span class="i-simple-icons-github mr-2 size-4" />
51-
View on GitHub
52-
</a>
48+
<AsideOutlineAfterLink
49+
:href="viewComponent"
50+
label="View Component"
51+
icon="i-simple-icons-github"
52+
/>
5353

54-
<a :href="openIssue" target="_blank" class="flex flex-row items-center text-(--vp-c-text-2)! text-sm transition-colors duration-[250ms] leading-8 hover:text-(--vp-c-text-1)!">
55-
<span class="i-lucide-message-square mr-2 size-4" />
56-
Open an issue
57-
</a>
54+
<AsideOutlineAfterLink
55+
:href="openIssue"
56+
label="Open an issue"
57+
icon="i-lucide-message-square"
58+
/>
5859

59-
<a :href="editComponent" target="_blank" class="flex flex-row items-center text-(--vp-c-text-2)! text-sm transition-colors duration-[250ms] leading-8 hover:text-(--vp-c-text-1)!">
60-
<span class="i-lucide-pen mr-2 size-4" />
61-
Edit the component
62-
</a>
63-
</div>
60+
<AsideOutlineAfterLink
61+
:href="editComponent"
62+
label="Edit the component"
63+
icon="i-lucide-pen"
64+
/>
65+
</AsideOutlineAfterSection>
66+
67+
<AsideOutlineAfterSection>
68+
<AsideOutlineAfterHeading title="Special Thanks" />
69+
70+
<AsideOutlineAfterLink
71+
href="https://ui.nuxt.com"
72+
label="Nuxt UI"
73+
icon="i-simple-icons-nuxtdotjs"
74+
/>
75+
</AsideOutlineAfterSection>
76+
</template>
6477
</template>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts" setup>
2+
interface Props {
3+
title: string
4+
}
5+
const props = defineProps<Props>()
6+
</script>
7+
8+
<template>
9+
<div role="heading" aria-level="2" class="font-semibold text-sm ml-4 leading-8">
10+
{{ props.title }}
11+
</div>
12+
</template>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script lang="ts" setup>
2+
interface Props {
3+
href: string
4+
label: string
5+
icon: string
6+
}
7+
const props = defineProps<Props>()
8+
</script>
9+
10+
<template>
11+
<a :href="props.href" target="_blank" class="flex flex-row items-center text-(--vp-c-text-2)! text-sm transition-colors duration-[250ms] leading-8 hover:text-(--vp-c-text-1)!">
12+
<span :class="props.icon" class="mr-2 size-4" />
13+
{{ props.label }}
14+
</a>
15+
</template>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script lang="ts" setup>
2+
interface Slots {
3+
default: (props?: any) => void
4+
}
5+
defineSlots<Slots>()
6+
</script>
7+
8+
<template>
9+
<div class="mt-6 pt-6 border-t border-dashed border-(--vp-c-divider)">
10+
<slot />
11+
</div>
12+
</template>

0 commit comments

Comments
 (0)