@wordup-md/nuxt-layer-shadcn-unocss 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playground/app.config.ts +3 -3
- package/.playground/content/3.components/2.docs/badge.md +18 -39
- package/.playground/content/3.components/2.docs/button-link.md +12 -12
- package/.playground/content/3.components/3.page/file-download.md +6 -0
- package/.playground/content/index.md +1 -0
- package/.playground/content/layout.md +1 -1
- package/.playground/content/test.md +24 -1
- package/README.md +2 -2
- package/components/content/Badge.vue +7 -0
- package/components/content/ButtonLink.vue +11 -8
- package/components/content/ButtonLogin.vue +19 -0
- package/components/content/FileDownload.vue +103 -0
- package/components/content/Menu.vue +43 -0
- package/components/content/MenuItem.vue +22 -0
- package/components/layout/Block404.vue +24 -0
- package/components/layout/Footer.vue +2 -11
- package/i18n/i18n.config.ts +180 -2
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/pages/[...slug].vue +47 -12
- package/public/content-doc.json +10 -3
- package/.playground/content/_menu-footer.md +0 -12
|
@@ -78,7 +78,7 @@ export default defineAppConfig({
|
|
|
78
78
|
}],
|
|
79
79
|
links: [{
|
|
80
80
|
icon: 'lucide:twitter',
|
|
81
|
-
to: 'https://x.com/
|
|
81
|
+
to: 'https://x.com/wordup_md',
|
|
82
82
|
target: '_blank',
|
|
83
83
|
}],
|
|
84
84
|
},
|
|
@@ -97,7 +97,7 @@ export default defineAppConfig({
|
|
|
97
97
|
codeCopyToast: true,
|
|
98
98
|
editLink: {
|
|
99
99
|
enable: true,
|
|
100
|
-
pattern: 'https://github.com/wordup-md/nuxt-layer-shadcn-unocss/edit/main/content/:path',
|
|
100
|
+
pattern: 'https://github.com/wordup-md/nuxt-layer-shadcn-unocss/edit/main/.playground/content/:path',
|
|
101
101
|
text: 'Edit this page',
|
|
102
102
|
icon: 'lucide:square-pen',
|
|
103
103
|
placement: ['pageFooter', 'toc'],
|
|
@@ -147,7 +147,7 @@ export default defineAppConfig({
|
|
|
147
147
|
},
|
|
148
148
|
},
|
|
149
149
|
footer: {
|
|
150
|
-
credits: 'Made with ❤️ by [**Emmanuel Salomon**](https://github.com/ManUtopiK/) with [
|
|
150
|
+
credits: 'Made with ❤️ by [**Emmanuel Salomon**](https://github.com/ManUtopiK/) with [WordUp](https://wordup.md)',
|
|
151
151
|
links: [
|
|
152
152
|
{
|
|
153
153
|
title: 'shadcn-vue',
|
|
@@ -40,7 +40,7 @@ badges:
|
|
|
40
40
|
|
|
41
41
|
### Types
|
|
42
42
|
|
|
43
|
-
::stack
|
|
43
|
+
::stack
|
|
44
44
|
::div{class="p-3"}
|
|
45
45
|
:badge[Default]
|
|
46
46
|
:badge[Primary]{type="primary"}
|
|
@@ -64,46 +64,24 @@ badges:
|
|
|
64
64
|
|
|
65
65
|
### Variants
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
::
|
|
67
|
+
|Default|Fill|Outline|Text|
|
|
68
|
+
|---|---|---|---|
|
|
69
|
+
|:badge[Default]|:badge[Default]{variant="fill"}|:badge[Default]{variant="outline"}|:badge[Default]{variant="text"}|
|
|
70
|
+
|:badge[Primary]{type="primary"}|:badge[Primary]{type="primary" variant="fill"}|:badge[Primary]{type="primary" variant="outline"}|:badge[Primary]{type="primary" variant="text"}|
|
|
71
|
+
|:badge[Secondary]{type="secondary"}|:badge[Secondary]{type="secondary" variant="fill"}|:badge[Secondary]{type="secondary" variant="outline"}|:badge[Secondary]{type="secondary" variant="text"}|
|
|
72
|
+
|:badge[Info]{type="info"}|:badge[Info]{type="info" variant="fill"}|:badge[Info]{type="info" variant="outline"}|:badge[Info]{type="info" variant="text"}|
|
|
73
|
+
|:badge[Warning]{type="warning"}|:badge[Warning]{type="warning" variant="fill"}|:badge[Warning]{type="warning" variant="outline"}|:badge[Warning]{type="warning" variant="text"}|
|
|
74
|
+
|:badge[Success]{type="success"}|:badge[Success]{type="success" variant="fill"}|:badge[Success]{type="success" variant="outline"}|:badge[Success]{type="success" variant="text"}|
|
|
75
|
+
|:badge[Danger]{type="danger"}|:badge[Danger]{type="danger" variant="fill"}|:badge[Danger]{type="danger" variant="outline"}|:badge[Danger]{type="danger" variant="text"}|
|
|
76
|
+
|:badge[New]{type="new"}|:badge[New]{type="new" variant="fill"}|:badge[New]{type="new" variant="outline"}|:badge[New]{type="new" variant="text"}|
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
:badge[Default]{variant="outline"}
|
|
81
|
-
:badge[Primary]{type="primary" variant="outline"}
|
|
82
|
-
:badge[Secondary]{type="secondary" variant="outline"}
|
|
83
|
-
:badge[Info]{type="info" variant="outline"}
|
|
84
|
-
:badge[Warning]{type="warning" variant="outline"}
|
|
85
|
-
:badge[Success]{type="success" variant="outline"}
|
|
86
|
-
:badge[Danger]{type="danger" variant="outline"}
|
|
87
|
-
:badge[New]{type="new" variant="outline"}
|
|
88
|
-
::
|
|
78
|
+
**Examples:**
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:badge[Warning]{type="warning" variant="text"}
|
|
96
|
-
:badge[Success]{type="success" variant="text"}
|
|
97
|
-
:badge[Danger]{type="danger" variant="text"}
|
|
98
|
-
:badge[New]{type="new" variant="text"}
|
|
99
|
-
::
|
|
100
|
-
|
|
101
|
-
```mdc
|
|
102
|
-
:badge[...]{type="..." variant="fill"}
|
|
103
|
-
:badge[...]{type="..." variant="outline"}
|
|
104
|
-
:badge[...]{type="..." variant="text"}
|
|
105
|
-
```
|
|
106
|
-
::
|
|
80
|
+
```mdc
|
|
81
|
+
:badge[Some text]{type="info" variant="fill"}
|
|
82
|
+
:badge[Some text]{type="danger" variant="outline"}
|
|
83
|
+
:badge[Some text]{type="new" variant="text"}
|
|
84
|
+
```
|
|
107
85
|
|
|
108
86
|
### Link
|
|
109
87
|
|
|
@@ -123,6 +101,7 @@ badges:
|
|
|
123
101
|
## Props
|
|
124
102
|
|
|
125
103
|
::field-group
|
|
104
|
+
:field{name="title" type="string"}[Can be used to set the label of the badge instead of the content]
|
|
126
105
|
:field{name="type" type="'default' | 'info' | 'warning' | 'success' | 'danger' | 'lime'" default-value="'default'"}
|
|
127
106
|
:field{name="variant" type="'default' | 'secondary' | 'destructive' | 'outline'" default-value="'default'"}
|
|
128
107
|
:field{name="size" type="'md' | 'sm'" default-value="'md'"}
|
|
@@ -16,26 +16,26 @@ badges:
|
|
|
16
16
|
|
|
17
17
|
::stack
|
|
18
18
|
::div{class="p-3 flex gap-4"}
|
|
19
|
-
::button-link{
|
|
20
|
-
Get Started
|
|
21
|
-
::
|
|
22
|
-
::button-link{left-icon="lucide:github" variant="outline" to="https://github.com/wordup-md/nuxt-layer-shadcn-unocss" target="_blank"}
|
|
19
|
+
::button-link{icon="lucide:github" variant="outline" to="https://github.com/wordup-md/nuxt-layer-shadcn-unocss" target="_blank"}
|
|
23
20
|
GitHub
|
|
24
21
|
::
|
|
25
|
-
::button-link{
|
|
22
|
+
::button-link{icon="lucide:ghost" variant="ghost" href="https://github.com/wordup-md/nuxt-layer-shadcn-unocss" blank}
|
|
26
23
|
Ghost
|
|
27
24
|
::
|
|
28
|
-
::
|
|
29
|
-
```mdc
|
|
30
|
-
::button-link{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
|
|
25
|
+
::button-link{trailing-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
|
|
31
26
|
Get Started
|
|
32
27
|
::
|
|
33
|
-
::
|
|
28
|
+
::
|
|
29
|
+
```mdc
|
|
30
|
+
::button-link{icon="lucide:github" variant="outline" to="https://github.com/wordup-md/nuxt-layer-shadcn-unocss" target="_blank"}
|
|
34
31
|
GitHub
|
|
35
32
|
::
|
|
36
|
-
::button-link{
|
|
33
|
+
::button-link{icon="lucide:ghost" variant="ghost" href="https://github.com/wordup-md/nuxt-layer-shadcn-unocss" blank}
|
|
37
34
|
Ghost
|
|
38
35
|
::
|
|
36
|
+
::button-link{trailing-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
|
|
37
|
+
Get Started
|
|
38
|
+
::
|
|
39
39
|
```
|
|
40
40
|
::
|
|
41
41
|
|
|
@@ -44,8 +44,8 @@ badges:
|
|
|
44
44
|
::field-group
|
|
45
45
|
:field{name="variant" type="'default' | 'secondary' | 'link' | 'destructive' | 'outline' | 'ghost'" default-value="'default'"}
|
|
46
46
|
:field{name="size" type="'default' | 'icon' | 'sm' | 'xs' | 'lg'" default-value="'default'"}
|
|
47
|
-
:field{name="
|
|
48
|
-
:field{name="
|
|
47
|
+
:field{name="icon" type="string"}[Icon on the left]
|
|
48
|
+
:field{name="trailingIcon" type="string"}[Icon on the right]
|
|
49
49
|
:field{name="to" type="string"}[Link URL]
|
|
50
50
|
:field{name="href" type="string"}[Alias to `to`]
|
|
51
51
|
:field{name="target" type="Target"}[A `target` attribute value to apply on the link]
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Test
|
|
3
3
|
layout: editorial
|
|
4
4
|
header:
|
|
5
5
|
position: over
|
|
6
|
+
sidebarRight:
|
|
7
|
+
enable: true
|
|
8
|
+
components:
|
|
9
|
+
- ButtonLink:
|
|
10
|
+
title: GitHub
|
|
11
|
+
variant: outline
|
|
12
|
+
to: https://github.com/wordup-md/nuxt-layer-shadcn-unocss
|
|
13
|
+
icon: lucide:github
|
|
14
|
+
class: w-full
|
|
15
|
+
- Menu:
|
|
16
|
+
title: Menu test
|
|
17
|
+
items:
|
|
18
|
+
- /getting-started
|
|
19
|
+
- title: Menu
|
|
20
|
+
to: /getting-started
|
|
21
|
+
icon: lucide:menu
|
|
22
|
+
- Alert:
|
|
23
|
+
title: New
|
|
24
|
+
to: /getting-started
|
|
25
|
+
icon: lucide:party-popper
|
|
26
|
+
navBadges:
|
|
27
|
+
- value: New
|
|
28
|
+
type: new
|
|
6
29
|
---
|
|
7
30
|
|
|
8
31
|
::hero
|
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ npx create-nuxt-app <project-name>
|
|
|
12
12
|
|
|
13
13
|
- Install the layer
|
|
14
14
|
```bash
|
|
15
|
-
pnpm add @
|
|
15
|
+
pnpm add @wordup-md/nuxt-layer-shadcn-unocss
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
- Extend the layer in your nuxt.config.ts
|
|
19
19
|
```ts
|
|
20
20
|
defineNuxtConfig({
|
|
21
|
-
extends: '@
|
|
21
|
+
extends: '@wordup-md/nuxt-layer-shadcn-unocss'
|
|
22
22
|
})
|
|
23
23
|
```
|
|
24
24
|
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
&& 'rounded-md px-1.5 py-0.5 text-xs font-normal leading-none',
|
|
15
15
|
]"
|
|
16
16
|
>
|
|
17
|
+
<span v-if="title">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</span>
|
|
17
20
|
<ContentSlot unwrap="p" />
|
|
18
21
|
</UiBadge>
|
|
19
22
|
</NuxtLink>
|
|
@@ -32,6 +35,9 @@
|
|
|
32
35
|
&& 'px-3 text-base',
|
|
33
36
|
]"
|
|
34
37
|
>
|
|
38
|
+
<span v-if="title">
|
|
39
|
+
{{ title }}
|
|
40
|
+
</span>
|
|
35
41
|
<ContentSlot unwrap="p" />
|
|
36
42
|
</UiBadge>
|
|
37
43
|
</span>
|
|
@@ -44,6 +50,7 @@ const {
|
|
|
44
50
|
size = 'md',
|
|
45
51
|
} = defineProps<{
|
|
46
52
|
type?: 'default' | 'primary' | 'secondary' | 'info' | 'warning' | 'success' | 'danger' | 'new'
|
|
53
|
+
title?: string
|
|
47
54
|
to?: string
|
|
48
55
|
target?: Target
|
|
49
56
|
variant?: 'default' | 'fill' | 'outline' | 'text'
|
|
@@ -7,20 +7,23 @@
|
|
|
7
7
|
<UiButton
|
|
8
8
|
:variant
|
|
9
9
|
:size
|
|
10
|
+
:class="String($attrs.class || '')"
|
|
10
11
|
>
|
|
11
12
|
<Icon
|
|
12
|
-
v-if="
|
|
13
|
-
:name="
|
|
14
|
-
class="mr-
|
|
13
|
+
v-if="icon"
|
|
14
|
+
:name="icon"
|
|
15
|
+
class="mr-2"
|
|
15
16
|
/>
|
|
17
|
+
|
|
16
18
|
<span v-if="title">
|
|
17
19
|
{{ title }}
|
|
18
20
|
</span>
|
|
19
21
|
<ContentSlot unwrap="p" />
|
|
22
|
+
|
|
20
23
|
<Icon
|
|
21
|
-
v-if="
|
|
22
|
-
:name="
|
|
23
|
-
class="ml-
|
|
24
|
+
v-if="trailingIcon"
|
|
25
|
+
:name="trailingIcon"
|
|
26
|
+
class="ml-2"
|
|
24
27
|
/>
|
|
25
28
|
</UiButton>
|
|
26
29
|
</NuxtLink>
|
|
@@ -33,8 +36,8 @@ defineProps<{
|
|
|
33
36
|
variant?: ButtonVariants['variant']
|
|
34
37
|
size?: ButtonVariants['size']
|
|
35
38
|
title?: string
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
icon?: string
|
|
40
|
+
trailingIcon?: string
|
|
38
41
|
to?: string
|
|
39
42
|
href?: string
|
|
40
43
|
target?: Target
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useUnpress } from '#imports'
|
|
3
|
+
|
|
4
|
+
const { client, logout, login } = useUnpress()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<UiButton
|
|
9
|
+
variant="ghost"
|
|
10
|
+
class="flex gap-2"
|
|
11
|
+
@click="!!client ? logout() : login()"
|
|
12
|
+
>
|
|
13
|
+
<Icon
|
|
14
|
+
:name="!!client ? 'lucide:log-out' : 'lucide:log-in'"
|
|
15
|
+
:size="20"
|
|
16
|
+
/>
|
|
17
|
+
{{ !!client ? $t('Logout') : $t('Login') }}
|
|
18
|
+
</UiButton>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
path: string
|
|
4
|
+
title?: string
|
|
5
|
+
size?: number
|
|
6
|
+
icon?: string
|
|
7
|
+
inStack?: boolean
|
|
8
|
+
external?: boolean
|
|
9
|
+
}>()
|
|
10
|
+
|
|
11
|
+
// Get the asset
|
|
12
|
+
const { data } = await useFetch(props.path)
|
|
13
|
+
|
|
14
|
+
// Compute size
|
|
15
|
+
const size = computed(() => {
|
|
16
|
+
return props.size ?? data.value?.size
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
// onMounted(async () => {
|
|
20
|
+
// // Download the asset and get the size
|
|
21
|
+
// const size = await fetch(data.value?.url).then(res => res.headers.get('content-length'))
|
|
22
|
+
// console.log(size.value)
|
|
23
|
+
// })
|
|
24
|
+
|
|
25
|
+
const files = {
|
|
26
|
+
pdf: 'i-mdi-file-pdf-outline',
|
|
27
|
+
jpeg: 'i-mdi-file-image',
|
|
28
|
+
svg: 'i-mdi-file-image',
|
|
29
|
+
}
|
|
30
|
+
function ext(name: string) {
|
|
31
|
+
const ext = name.split('.').slice(-1)
|
|
32
|
+
if (files[ext]) return files[ext]
|
|
33
|
+
return 'i-mdi-file'
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function fileSize(size: number) {
|
|
37
|
+
if (props.size) return props.size
|
|
38
|
+
if (!size) return null
|
|
39
|
+
if (size < 1024)
|
|
40
|
+
return `${size} octets`
|
|
41
|
+
if (size < 1024 * 1024)
|
|
42
|
+
return `${(size / 1024).toFixed(2)} Ko`
|
|
43
|
+
return `${(size / 1024 / 1024).toFixed(2)} Mo`
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const _icon = computed(() => {
|
|
47
|
+
return props.icon ?? ext(props.path.split('/').pop() ?? '')
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const _title = computed(() => {
|
|
51
|
+
return props.title ?? props.path.split('/').pop()
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<template>
|
|
56
|
+
<UiAlert
|
|
57
|
+
class="transition-all [&:not(:first-child)]:mt-5 group/card"
|
|
58
|
+
:class="[
|
|
59
|
+
path && 'hover:bg-muted/50',
|
|
60
|
+
path && 'cursor-pointer',
|
|
61
|
+
inStack && 'm-0 rounded-none border-none',
|
|
62
|
+
]"
|
|
63
|
+
>
|
|
64
|
+
<a
|
|
65
|
+
:href="path"
|
|
66
|
+
:target="external ? '_blank' : undefined"
|
|
67
|
+
:download="external ? undefined : path"
|
|
68
|
+
>
|
|
69
|
+
<div
|
|
70
|
+
v-if="_title"
|
|
71
|
+
class="flex flex-row gap-2 items-center"
|
|
72
|
+
>
|
|
73
|
+
<Icon
|
|
74
|
+
v-if="_icon && _title"
|
|
75
|
+
:name="_icon"
|
|
76
|
+
:size="20"
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<UiAlertTitle
|
|
80
|
+
class="mb-0 flex flex-row gap-2"
|
|
81
|
+
>
|
|
82
|
+
<span class="font-semibold">{{ _title }}</span>
|
|
83
|
+
<span
|
|
84
|
+
v-if="size"
|
|
85
|
+
class="text-sm font-normal text-muted-foreground"
|
|
86
|
+
>
|
|
87
|
+
( {{ fileSize(size) }} )
|
|
88
|
+
</span>
|
|
89
|
+
</UiAlertTitle>
|
|
90
|
+
</div>
|
|
91
|
+
</a>
|
|
92
|
+
|
|
93
|
+
<div
|
|
94
|
+
v-if="path"
|
|
95
|
+
class="absolute right-3 top-3 flex z-1 p-1 transition bg-background/50 rounded group-hover/card:translate-y-1"
|
|
96
|
+
>
|
|
97
|
+
<NuxtIcon
|
|
98
|
+
name="i-mdi-download"
|
|
99
|
+
:size="20"
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
</UiAlert>
|
|
103
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { NavItem } from '@nuxt/content'
|
|
3
|
+
|
|
4
|
+
const { items, title } = defineProps<{
|
|
5
|
+
title?: string
|
|
6
|
+
items: NavItem[]
|
|
7
|
+
}>()
|
|
8
|
+
|
|
9
|
+
const { navigation } = useContent()
|
|
10
|
+
|
|
11
|
+
const _links = computed(() => {
|
|
12
|
+
return items?.map((link) => {
|
|
13
|
+
if (typeof link === 'string') {
|
|
14
|
+
return {
|
|
15
|
+
...navigation.value?.find(n => n._path === link),
|
|
16
|
+
_path: link,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
...link,
|
|
22
|
+
_path: link.to || link._path,
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div>
|
|
30
|
+
<p
|
|
31
|
+
v-if="title"
|
|
32
|
+
class="mb-2 text-base font-semibold"
|
|
33
|
+
>
|
|
34
|
+
{{ title }}
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<MenuItem
|
|
38
|
+
v-for="link in _links"
|
|
39
|
+
:key="link._path"
|
|
40
|
+
:link="link"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLink
|
|
3
|
+
:to="link._path"
|
|
4
|
+
class="flex items-center gap-2 rounded-md p-2 text-sm text-foreground/80 hover:bg-muted hover:text-primary"
|
|
5
|
+
:class="[
|
|
6
|
+
isActive && 'bg-muted !text-primary',
|
|
7
|
+
!!link.navTruncate && 'h-8',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
10
|
+
<LayoutAsideTreeItemButton :link />
|
|
11
|
+
</NuxtLink>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { NavItem } from '@nuxt/content'
|
|
16
|
+
|
|
17
|
+
const { link } = defineProps<{
|
|
18
|
+
link: NavItem
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const isActive = computed(() => link._path === useRoute().path)
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="col-span-3 mt-[20vh] flex flex-col items-center justify-center">
|
|
7
|
+
<div class="col-span-3 mb-12 flex items-center justify-center">
|
|
8
|
+
<h3 class="scroll-m-20 border-r px-4 py-3 text-2xl font-semibold">
|
|
9
|
+
404
|
|
10
|
+
</h3>
|
|
11
|
+
<span class="scroll-m-20 px-4"> {{ $t('This page could not be found.') }} </span>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<slot>
|
|
15
|
+
<ButtonLink
|
|
16
|
+
to="/"
|
|
17
|
+
as="a"
|
|
18
|
+
icon="lucide:home"
|
|
19
|
+
>
|
|
20
|
+
{{ $t('Go to home') }}
|
|
21
|
+
</ButtonLink>
|
|
22
|
+
</slot>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<footer
|
|
3
|
-
class="site-footer border-t"
|
|
3
|
+
class="site-footer border-t relative"
|
|
4
4
|
:class="footer.class"
|
|
5
5
|
>
|
|
6
6
|
<div
|
|
@@ -33,16 +33,7 @@
|
|
|
33
33
|
</UiButton>
|
|
34
34
|
</NuxtLink>
|
|
35
35
|
|
|
36
|
-
<
|
|
37
|
-
<template #default="{ login }">
|
|
38
|
-
<UiButton
|
|
39
|
-
variant="ghost"
|
|
40
|
-
@click="login()"
|
|
41
|
-
>
|
|
42
|
-
Admin
|
|
43
|
-
</UiButton>
|
|
44
|
-
</template>
|
|
45
|
-
</CmsAuth>
|
|
36
|
+
<ButtonLogin />
|
|
46
37
|
</div>
|
|
47
38
|
|
|
48
39
|
<MDCRenderer
|
package/i18n/i18n.config.ts
CHANGED
|
@@ -50,6 +50,14 @@ export default defineI18nConfig(() => ({
|
|
|
50
50
|
|
|
51
51
|
// Field
|
|
52
52
|
'required': 'required',
|
|
53
|
+
|
|
54
|
+
// 404
|
|
55
|
+
'This page could not be found.': 'This page could not be found.',
|
|
56
|
+
'Go to home': 'Go to home',
|
|
57
|
+
|
|
58
|
+
// Footer
|
|
59
|
+
'Login': 'Login',
|
|
60
|
+
'Logout': 'Logout',
|
|
53
61
|
},
|
|
54
62
|
'fr': {
|
|
55
63
|
// Breadcrumb
|
|
@@ -98,6 +106,126 @@ export default defineI18nConfig(() => ({
|
|
|
98
106
|
|
|
99
107
|
// Field
|
|
100
108
|
'required': 'requis',
|
|
109
|
+
|
|
110
|
+
// 404
|
|
111
|
+
'This page could not be found.': 'Cette page n\'existe pas.',
|
|
112
|
+
'Go to home': 'Retour à l\'accueil',
|
|
113
|
+
|
|
114
|
+
// Footer
|
|
115
|
+
'Login': 'Se connecter',
|
|
116
|
+
'Logout': 'Se déconnecter',
|
|
117
|
+
},
|
|
118
|
+
'es': {
|
|
119
|
+
// Breadcrumb
|
|
120
|
+
'Home': 'Inicio',
|
|
121
|
+
|
|
122
|
+
// Search
|
|
123
|
+
'Search...': 'Buscar...',
|
|
124
|
+
'Search documentation...': 'Buscar en la documentación...',
|
|
125
|
+
'No results found.': 'No se encontraron resultados.',
|
|
126
|
+
|
|
127
|
+
// TOC
|
|
128
|
+
'On This Page': 'En esta página',
|
|
129
|
+
|
|
130
|
+
// Search command
|
|
131
|
+
'Light': 'Claro',
|
|
132
|
+
'Dark': 'Oscuro',
|
|
133
|
+
'System': 'Sistema',
|
|
134
|
+
|
|
135
|
+
// Doc footer
|
|
136
|
+
'Edit this page': 'Editar esta página',
|
|
137
|
+
'Back to Top': 'Volver al inicio',
|
|
138
|
+
|
|
139
|
+
// Collapse Code
|
|
140
|
+
'Expand': 'Expandir',
|
|
141
|
+
'Collapse': 'Colapsar',
|
|
142
|
+
|
|
143
|
+
// Language Switcher
|
|
144
|
+
'Language': 'Idioma',
|
|
145
|
+
'Choose your language': 'Elegir tu idioma',
|
|
146
|
+
|
|
147
|
+
// Theme Switcher
|
|
148
|
+
'Customize': 'Personalizar',
|
|
149
|
+
'Pick a style and color for the docs.': 'Elige un estilo y color para la documentación.',
|
|
150
|
+
'Color': 'Color',
|
|
151
|
+
'Radius': 'Radio',
|
|
152
|
+
'Theme': 'Tema',
|
|
153
|
+
|
|
154
|
+
// Copy Code
|
|
155
|
+
'Copied to clipboard!': 'Copiado al portapapeles!',
|
|
156
|
+
|
|
157
|
+
// Carbon Ads
|
|
158
|
+
'Please support us by disabling your ad blocker.': 'Por favor, apoyanos desactivando tu bloqueador de publicidad.',
|
|
159
|
+
|
|
160
|
+
// Read More
|
|
161
|
+
'Read more at': 'Leer más en',
|
|
162
|
+
|
|
163
|
+
// Field
|
|
164
|
+
'required': 'requerido',
|
|
165
|
+
|
|
166
|
+
// 404
|
|
167
|
+
'This page could not be found.': 'Esta página no existe.',
|
|
168
|
+
'Go to home': 'Ir a la página de inicio',
|
|
169
|
+
|
|
170
|
+
// Footer
|
|
171
|
+
'Login': 'Iniciar sesión',
|
|
172
|
+
'Logout': 'Cerrar sesión',
|
|
173
|
+
},
|
|
174
|
+
'de': {
|
|
175
|
+
// Breadcrumb
|
|
176
|
+
'Home': 'Startseite',
|
|
177
|
+
|
|
178
|
+
// Search
|
|
179
|
+
'Search...': 'Suchen...',
|
|
180
|
+
'Search documentation...': 'Dokumentation suchen...',
|
|
181
|
+
'No results found.': 'Keine Ergebnisse gefunden.',
|
|
182
|
+
|
|
183
|
+
// TOC
|
|
184
|
+
'On This Page': 'In dieser Seite',
|
|
185
|
+
|
|
186
|
+
// Search command
|
|
187
|
+
'Light': 'Hell',
|
|
188
|
+
'Dark': 'Dunkel',
|
|
189
|
+
'System': 'System',
|
|
190
|
+
|
|
191
|
+
// Doc footer
|
|
192
|
+
'Edit this page': 'Diese Seite bearbeiten',
|
|
193
|
+
'Back to Top': 'Nach oben',
|
|
194
|
+
|
|
195
|
+
// Collapse Code
|
|
196
|
+
'Expand': 'Erweitern',
|
|
197
|
+
'Collapse': 'Einklappen',
|
|
198
|
+
|
|
199
|
+
// Language Switcher
|
|
200
|
+
'Language': 'Sprache',
|
|
201
|
+
'Choose your language': 'Sprache auswählen',
|
|
202
|
+
|
|
203
|
+
// Theme Switcher
|
|
204
|
+
'Customize': 'Anpassen',
|
|
205
|
+
'Pick a style and color for the docs.': 'Wählen Sie ein Stil und eine Farbe für die Dokumentation.',
|
|
206
|
+
'Color': 'Farbe',
|
|
207
|
+
'Radius': 'Radius',
|
|
208
|
+
'Theme': 'Thema',
|
|
209
|
+
|
|
210
|
+
// Copy Code
|
|
211
|
+
'Copied to clipboard!': 'In Zwischenablage kopiert!',
|
|
212
|
+
|
|
213
|
+
// Carbon Ads
|
|
214
|
+
'Please support us by disabling your ad blocker.': 'Bitte unterstützen Sie uns, indem Sie Ihren Werbeblocker deaktivieren.',
|
|
215
|
+
|
|
216
|
+
// Read More
|
|
217
|
+
'Read more at': 'Mehr erfahren auf',
|
|
218
|
+
|
|
219
|
+
// Field
|
|
220
|
+
'required': 'erforderlich',
|
|
221
|
+
|
|
222
|
+
// 404
|
|
223
|
+
'This page could not be found.': 'Diese Seite existiert nicht.',
|
|
224
|
+
'Go to home': 'Zurück zur Startseite',
|
|
225
|
+
|
|
226
|
+
// Footer
|
|
227
|
+
'Login': 'Anmelden',
|
|
228
|
+
'Logout': 'Abmelden',
|
|
101
229
|
},
|
|
102
230
|
'zh-CN': {
|
|
103
231
|
// Breadcrumb
|
|
@@ -146,6 +274,14 @@ export default defineI18nConfig(() => ({
|
|
|
146
274
|
|
|
147
275
|
// Field
|
|
148
276
|
'required': '必填',
|
|
277
|
+
|
|
278
|
+
// 404
|
|
279
|
+
'This page could not be found.': '此页面不存在。',
|
|
280
|
+
'Go to home': '返回首页',
|
|
281
|
+
|
|
282
|
+
// Footer
|
|
283
|
+
'Login': '登录',
|
|
284
|
+
'Logout': '退出',
|
|
149
285
|
},
|
|
150
286
|
'zh-TW': {
|
|
151
287
|
// Breadcrumb
|
|
@@ -194,6 +330,14 @@ export default defineI18nConfig(() => ({
|
|
|
194
330
|
|
|
195
331
|
// Field
|
|
196
332
|
'required': '必填',
|
|
333
|
+
|
|
334
|
+
// 404
|
|
335
|
+
'This page could not be found.': '此页面不存在。',
|
|
336
|
+
'Go to home': '返回首页',
|
|
337
|
+
|
|
338
|
+
// Footer
|
|
339
|
+
'Login': '登錄',
|
|
340
|
+
'Logout': '登出',
|
|
197
341
|
},
|
|
198
342
|
'ja': {
|
|
199
343
|
// Breadcrumb
|
|
@@ -242,6 +386,10 @@ export default defineI18nConfig(() => ({
|
|
|
242
386
|
|
|
243
387
|
// Field
|
|
244
388
|
'required': '必須',
|
|
389
|
+
|
|
390
|
+
// 404
|
|
391
|
+
'This page could not be found.': '此页面不存在。',
|
|
392
|
+
'Go to home': '返回首页',
|
|
245
393
|
},
|
|
246
394
|
'ru': {
|
|
247
395
|
// Breadcrumb
|
|
@@ -290,8 +438,15 @@ export default defineI18nConfig(() => ({
|
|
|
290
438
|
|
|
291
439
|
// Field
|
|
292
440
|
'required': 'обязательно',
|
|
293
|
-
},
|
|
294
441
|
|
|
442
|
+
// 404
|
|
443
|
+
'This page could not be found.': 'Эта страница не существует.',
|
|
444
|
+
'Go to home': 'На главную',
|
|
445
|
+
|
|
446
|
+
// Footer
|
|
447
|
+
'Login': 'Войти',
|
|
448
|
+
'Logout': 'Выйти',
|
|
449
|
+
},
|
|
295
450
|
'ko': {
|
|
296
451
|
// Breadcrumb
|
|
297
452
|
'Home': '홈',
|
|
@@ -339,8 +494,15 @@ export default defineI18nConfig(() => ({
|
|
|
339
494
|
|
|
340
495
|
// Field
|
|
341
496
|
'required': '필수',
|
|
342
|
-
},
|
|
343
497
|
|
|
498
|
+
// 404
|
|
499
|
+
'This page could not be found.': '이 페이지는 존재하지 않습니다.',
|
|
500
|
+
'Go to home': '홈으로 이동',
|
|
501
|
+
|
|
502
|
+
// Footer
|
|
503
|
+
'Login': '로그인',
|
|
504
|
+
'Logout': '로그아웃',
|
|
505
|
+
},
|
|
344
506
|
'hi': {
|
|
345
507
|
// Breadcrumb
|
|
346
508
|
'Home': 'होम',
|
|
@@ -388,6 +550,14 @@ export default defineI18nConfig(() => ({
|
|
|
388
550
|
|
|
389
551
|
// Field
|
|
390
552
|
'required': 'आवश्यक',
|
|
553
|
+
|
|
554
|
+
// 404
|
|
555
|
+
'This page could not be found.': 'यह पृष्ठ मौजूद नहीं है।',
|
|
556
|
+
'Go to home': 'होम पर जाएं',
|
|
557
|
+
|
|
558
|
+
// Footer
|
|
559
|
+
'Login': 'लॉग इन',
|
|
560
|
+
'Logout': 'लॉग आउट',
|
|
391
561
|
},
|
|
392
562
|
'bn': {
|
|
393
563
|
// Breadcrumb
|
|
@@ -436,6 +606,14 @@ export default defineI18nConfig(() => ({
|
|
|
436
606
|
|
|
437
607
|
// Field
|
|
438
608
|
'required': 'অবশ্যক',
|
|
609
|
+
|
|
610
|
+
// 404
|
|
611
|
+
'This page could not be found.': 'এই পাতাটি অনুপস্থিত।',
|
|
612
|
+
'Go to home': 'হোম পর যান',
|
|
613
|
+
|
|
614
|
+
// Footer
|
|
615
|
+
'Login': 'লগ ইন',
|
|
616
|
+
'Logout': 'লগ আউট',
|
|
439
617
|
},
|
|
440
618
|
},
|
|
441
619
|
}))
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/pages/[...slug].vue
CHANGED
|
@@ -14,15 +14,7 @@
|
|
|
14
14
|
<LayoutAside :is-mobile="false" />
|
|
15
15
|
</aside>
|
|
16
16
|
|
|
17
|
-
<
|
|
18
|
-
v-if="!page?.body"
|
|
19
|
-
class="col-span-3 mt-[20vh] flex items-center justify-center"
|
|
20
|
-
>
|
|
21
|
-
<h3 class="scroll-m-20 border-r px-4 py-3 text-2xl font-semibold">
|
|
22
|
-
404
|
|
23
|
-
</h3>
|
|
24
|
-
<span class="scroll-m-20 px-4"> This page could not be found. </span>
|
|
25
|
-
</div>
|
|
17
|
+
<LayoutBlock404 v-if="!page?.body" />
|
|
26
18
|
|
|
27
19
|
<main
|
|
28
20
|
v-else
|
|
@@ -76,11 +68,34 @@
|
|
|
76
68
|
</article>
|
|
77
69
|
|
|
78
70
|
<div
|
|
79
|
-
v-if="showToc"
|
|
71
|
+
v-if="showToc || showSidebarRight"
|
|
80
72
|
class="text-sm hidden lg:block lg:sticky lg:top-[calc(var(--header-height)+var(--banner-height)+1.75rem)] h-min max-h-[calc(100vh-var(--header-height)-var(--banner-height)-6rem)]"
|
|
81
73
|
>
|
|
82
|
-
<div class="overflow-hidden">
|
|
83
|
-
<LayoutToc
|
|
74
|
+
<div class="overflow-hidden flex flex-col gap-5">
|
|
75
|
+
<LayoutToc
|
|
76
|
+
v-if="showToc"
|
|
77
|
+
:is-small="false"
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<div
|
|
81
|
+
v-if="showSidebarRight && sidebarRightComponents.length"
|
|
82
|
+
class="border-t pt-5 flex flex-col gap-5"
|
|
83
|
+
>
|
|
84
|
+
<!-- <LayoutSubmenuTree
|
|
85
|
+
:level="1"
|
|
86
|
+
/> -->
|
|
87
|
+
|
|
88
|
+
<div
|
|
89
|
+
v-for="component in sidebarRightComponents"
|
|
90
|
+
:key="component.name"
|
|
91
|
+
>
|
|
92
|
+
<Component
|
|
93
|
+
:is="component.name"
|
|
94
|
+
v-bind="component.props || {}"
|
|
95
|
+
/>
|
|
96
|
+
<!-- <Component :is="sidebarComponents[component as keyof typeof sidebarComponents]" /> -->
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
84
99
|
</div>
|
|
85
100
|
</div>
|
|
86
101
|
</main>
|
|
@@ -100,6 +115,26 @@ const showToc = computed(() => {
|
|
|
100
115
|
return (config.value.toc.enable && page.value?.toc !== false) || !!page.value?.toc
|
|
101
116
|
})
|
|
102
117
|
|
|
118
|
+
const showSidebarRight = computed(() => {
|
|
119
|
+
return (config.value.sidebarRight.enable && page.value?.sidebarRight !== false) || !!page.value?.sidebarRight
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
const sidebarRightComponents = computed(() => {
|
|
123
|
+
return config.value.sidebarRight.components.map((component) => {
|
|
124
|
+
if (typeof component === 'string') {
|
|
125
|
+
return {
|
|
126
|
+
name: component,
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const [name, props] = Object.entries(component)[0]
|
|
131
|
+
return {
|
|
132
|
+
name,
|
|
133
|
+
props,
|
|
134
|
+
}
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
|
|
103
138
|
useSeoMeta({
|
|
104
139
|
title: `${page.value?.title ?? '404'} - ${config.value.site.name}`,
|
|
105
140
|
ogTitle: page.value?.title,
|
package/public/content-doc.json
CHANGED
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"title": "Badge",
|
|
210
210
|
"_id": "content:3.components:2.docs:badge.md",
|
|
211
211
|
"_path": "components/docs/badge",
|
|
212
|
-
"content": "\n\n## Usage\n\n::stack\n ::div{class=\"p-3\"}\n ::badge\n Default\n ::\n ::badge{size=\"sm\"}\n Small\n ::\n ::badge{size=\"lg\"}\n Large\n ::\n ::\n ```mdc\n ::badge\n Default\n ::\n ::badge{size=\"sm\"}\n Small\n ::\n ::badge{size=\"lg\"}\n Large\n ::\n ```\n::\n\n### Types\n\n::stack
|
|
212
|
+
"content": "\n\n## Usage\n\n::stack\n ::div{class=\"p-3\"}\n ::badge\n Default\n ::\n ::badge{size=\"sm\"}\n Small\n ::\n ::badge{size=\"lg\"}\n Large\n ::\n ::\n ```mdc\n ::badge\n Default\n ::\n ::badge{size=\"sm\"}\n Small\n ::\n ::badge{size=\"lg\"}\n Large\n ::\n ```\n::\n\n### Types\n\n::stack\n ::div{class=\"p-3\"}\n :badge[Default]\n :badge[Primary]{type=\"primary\"}\n :badge[Secondary]{type=\"secondary\"}\n :badge[Info]{type=\"info\"}\n :badge[Warning]{type=\"warning\"}\n :badge[Success]{type=\"success\"}\n :badge[Danger]{type=\"danger\"}\n :badge[New]{type=\"new\"}\n ::\n\n ```mdc\n :badge[Default]\n :badge[Info]{type=\"info\"}\n :badge[Warning]{type=\"warning\"}\n :badge[Success]{type=\"success\"}\n :badge[Danger]{type=\"danger\"}\n :badge[New]{type=\"new\"}\n ```\n::\n\n### Variants\n\n|Default|Fill|Outline|Text|\n|---|---|---|---|\n|:badge[Default]|:badge[Default]{variant=\"fill\"}|:badge[Default]{variant=\"outline\"}|:badge[Default]{variant=\"text\"}|\n|:badge[Primary]{type=\"primary\"}|:badge[Primary]{type=\"primary\" variant=\"fill\"}|:badge[Primary]{type=\"primary\" variant=\"outline\"}|:badge[Primary]{type=\"primary\" variant=\"text\"}|\n|:badge[Secondary]{type=\"secondary\"}|:badge[Secondary]{type=\"secondary\" variant=\"fill\"}|:badge[Secondary]{type=\"secondary\" variant=\"outline\"}|:badge[Secondary]{type=\"secondary\" variant=\"text\"}|\n|:badge[Info]{type=\"info\"}|:badge[Info]{type=\"info\" variant=\"fill\"}|:badge[Info]{type=\"info\" variant=\"outline\"}|:badge[Info]{type=\"info\" variant=\"text\"}|\n|:badge[Warning]{type=\"warning\"}|:badge[Warning]{type=\"warning\" variant=\"fill\"}|:badge[Warning]{type=\"warning\" variant=\"outline\"}|:badge[Warning]{type=\"warning\" variant=\"text\"}|\n|:badge[Success]{type=\"success\"}|:badge[Success]{type=\"success\" variant=\"fill\"}|:badge[Success]{type=\"success\" variant=\"outline\"}|:badge[Success]{type=\"success\" variant=\"text\"}|\n|:badge[Danger]{type=\"danger\"}|:badge[Danger]{type=\"danger\" variant=\"fill\"}|:badge[Danger]{type=\"danger\" variant=\"outline\"}|:badge[Danger]{type=\"danger\" variant=\"text\"}|\n|:badge[New]{type=\"new\"}|:badge[New]{type=\"new\" variant=\"fill\"}|:badge[New]{type=\"new\" variant=\"outline\"}|:badge[New]{type=\"new\" variant=\"text\"}|\n\n**Examples:**\n\n```mdc\n:badge[Some text]{type=\"info\" variant=\"fill\"}\n:badge[Some text]{type=\"danger\" variant=\"outline\"}\n:badge[Some text]{type=\"new\" variant=\"text\"}\n```\n\n### Link\n\n::stack\n ::div{class=\"p-3\"}\n ::badge{variant=\"outline\" type=\"info\" to=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" target=\"_blank\"}\n Link\n ::\n ::\n ```mdc\n ::badge{variant=\"outline\" type=\"info\" to=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" target=\"_blank\"}\n Link\n ::\n ```\n::\n\n## Props\n\n::field-group\n :field{name=\"title\" type=\"string\"}[Can be used to set the label of the badge instead of the content]\n :field{name=\"type\" type=\"'default' | 'info' | 'warning' | 'success' | 'danger' | 'lime'\" default-value=\"'default'\"}\n :field{name=\"variant\" type=\"'default' | 'secondary' | 'destructive' | 'outline'\" default-value=\"'default'\"}\n :field{name=\"size\" type=\"'md' | 'sm'\" default-value=\"'md'\"}\n :field{name=\"to\" type=\"string\"}[Link URL]\n :field{name=\"target\" type=\"Target\"}[A `target` attribute value to apply on the link]\n::\n",
|
|
213
213
|
"icon": "lucide:badge",
|
|
214
214
|
"badges": [
|
|
215
215
|
{
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
"title": "Button Link",
|
|
230
230
|
"_id": "content:3.components:2.docs:button-link.md",
|
|
231
231
|
"_path": "components/docs/button-link",
|
|
232
|
-
"content": "\n\n## Usage\n\n::stack\n ::div{class=\"p-3 flex gap-4\"}\n ::button-link{
|
|
232
|
+
"content": "\n\n## Usage\n\n::stack\n ::div{class=\"p-3 flex gap-4\"}\n ::button-link{icon=\"lucide:github\" variant=\"outline\" to=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" target=\"_blank\"}\n GitHub\n ::\n ::button-link{icon=\"lucide:ghost\" variant=\"ghost\" href=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" blank}\n Ghost\n ::\n ::button-link{trailing-icon=\"lucide:arrow-up-right\" to=\"/getting-started\" target=\"_blank\"}\n Get Started\n ::\n ::\n ```mdc\n ::button-link{icon=\"lucide:github\" variant=\"outline\" to=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" target=\"_blank\"}\n GitHub\n ::\n ::button-link{icon=\"lucide:ghost\" variant=\"ghost\" href=\"https://github.com/wordup-md/nuxt-layer-shadcn-unocss\" blank}\n Ghost\n ::\n ::button-link{trailing-icon=\"lucide:arrow-up-right\" to=\"/getting-started\" target=\"_blank\"}\n Get Started\n ::\n ```\n::\n\n## Props\n\n::field-group\n :field{name=\"variant\" type=\"'default' | 'secondary' | 'link' | 'destructive' | 'outline' | 'ghost'\" default-value=\"'default'\"}\n :field{name=\"size\" type=\"'default' | 'icon' | 'sm' | 'xs' | 'lg'\" default-value=\"'default'\"}\n :field{name=\"icon\" type=\"string\"}[Icon on the left]\n :field{name=\"trailingIcon\" type=\"string\"}[Icon on the right]\n :field{name=\"to\" type=\"string\"}[Link URL]\n :field{name=\"href\" type=\"string\"}[Alias to `to`]\n :field{name=\"target\" type=\"Target\"}[A `target` attribute value to apply on the link]\n :field{name=\"blank\" type=\"boolean\"}[Alias to `target='_blank'`]\n::\n",
|
|
233
233
|
"icon": "lucide:external-link",
|
|
234
234
|
"badges": [
|
|
235
235
|
{
|
|
@@ -578,6 +578,13 @@
|
|
|
578
578
|
}
|
|
579
579
|
]
|
|
580
580
|
},
|
|
581
|
+
{
|
|
582
|
+
"title": "File Download",
|
|
583
|
+
"_id": "content:3.components:3.page:file-download.md",
|
|
584
|
+
"_path": "components/page/file-download",
|
|
585
|
+
"content": "\n\n:file-download{path=\"/logo.svg\"}",
|
|
586
|
+
"icon": "i-mdi-file"
|
|
587
|
+
},
|
|
581
588
|
{
|
|
582
589
|
"title": "HeroAlt",
|
|
583
590
|
"_id": "content:3.components:3.page:hero-alt.md",
|
|
@@ -794,7 +801,7 @@
|
|
|
794
801
|
"_path": "development"
|
|
795
802
|
},
|
|
796
803
|
{
|
|
797
|
-
"title": "
|
|
804
|
+
"title": "Layout",
|
|
798
805
|
"_id": "content:layout.md",
|
|
799
806
|
"_path": "layout",
|
|
800
807
|
"content": "\n\n::hero\n---\nactions:\n - name: Get Started\n to: /getting-started/introduction\n - name: GitHub\n variant: outline\n to: https://github.com/wordup-md/nuxt-layer-shadcn-unocss\n leftIcon: lucide:github\nannouncement:\n title: Release v0.8.13\n icon: 🎉\n to: https://github.com/wordup-md/nuxt-layer-shadcn-unocss/releases/latest\n target: _blank\nclass: bg-gradient-to-b from-primary/20 to-transparent full-width full-content\n---\n#title\nEffortless and Beautiful Template.\n\n#description\nBeautifully designed Nuxt Content template built with :br\n[shadcn-vue](https://www.shadcn-vue.com) and [unocss](https://unocss.dev).\n::\n\n::div{.bg-gray-100}\ntest div\n::\n\n::section{.bg-gray-100}\ntest section\n::\n\n::prose-section{.bg-gray-100}\n :::card\n lorem ipsum\n :::\n\n :::card\n auiea\n :::\n::\n\nlatuinerst nrst auiea Quisque rutrum. Praesent congue erat at massa. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Duis vel nibh at velit scelerisque suscipit. Praesent nec nisl a purus blandit viverra.\n\n::prose-section{.wide-content.bg-gray-100}\nsection wide-content\n::\n\n::prose-section{.full-width.bg-gray-100}\nsection full-width\n::\n\n::prose-section{.bg-gray-100.full-width.wide-content}\nsection full-width wide-content\n::\n\n::prose-section{.bg-gray-100.full-width.full-content}\nsection full-width full-content\n::\n",
|