Skip to content

Commit

Permalink
feat: page badges
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
  • Loading branch information
ZTL-UwU committed Oct 23, 2024
1 parent a9d8e2d commit 8d6215e
Show file tree
Hide file tree
Showing 22 changed files with 177 additions and 42 deletions.
11 changes: 11 additions & 0 deletions content/1.getting-started/3.writing/2.pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ icon: lucide:book-type
navBadges:
- value: New
type: lime
badges:
- value: Docus
to: https://docus.dev/api/components#alert
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Alert.vue
target: _blank
---

<!-- Content of the page -->
Expand All @@ -35,6 +43,9 @@ navBadges:
::field{name="navBadges" type="[]"}
A list of badges appended to the end of the sidebar link.
::
::field{name="badges" type="[]"}
A list of badges shown at the bottom of page title.
::
::field{name="toc" type="boolean" default-value="true"}
Whether to show the toc section for this page.
::
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/alert.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
icon: lucide:triangle-alert
badges:
- value: Docus
to: https://docus.dev/api/components#alert
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Alert.vue
target: _blank
---

:badge[Docus]{variant="outline" to="https://docus.dev/api/components#alert" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::alert{icon="lucide:info"}
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/badge.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Badge
icon: lucide:badge
badges:
- value: Docus
to: https://docus.dev/api/components#badge
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Badge.vue
target: _blank
---

:badge[Docus]{variant="outline" to="https://docus.dev/api/components#badge" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::badge
Expand Down
12 changes: 9 additions & 3 deletions content/2.components/2.docs/button-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ icon: lucide:external-link
navBadges:
- value: New
type: lime
badges:
- value: Docus
to: https://docus.dev/api/components#buttonlink
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/ButtonLink.vue
target: _blank
- value: 0.6.5
---

:badge[0.6.5]{variant="outline"}
:badge[Docus]{variant="outline" to="https://docus.dev/api/components#buttonlink" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4 flex gap-4"}
:button-link[Get Started]{right-icon="lucide:arrow-up-right" to="/getting-started" target="_blank"}
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/callout.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Callout
icon: lucide:megaphone
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/callout
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Callout.vue
target: _blank
---

:badge[* Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/callout" target="_blank"}

::alert{to="/components/alert"}
`::callout`{lang="mdc"} is an alias to `::alert`{lang="mdc"}.
::
10 changes: 8 additions & 2 deletions content/2.components/2.docs/card-group.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Card Group
icon: lucide:layout-grid
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/card-group
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/CardGroup.vue
target: _blank
---

:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/card-group" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::card-group
Expand Down
14 changes: 11 additions & 3 deletions content/2.components/2.docs/card.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
title: Card
icon: lucide:square
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/card
target: _blank
- value: Docus
to: https://docus.dev/api/components#card
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Card.vue
target: _blank
---

:badge[Docus]{variant="outline" to="https://docus.dev/api/components#card" target="_blank"}
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/card" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::card
Expand Down
14 changes: 11 additions & 3 deletions content/2.components/2.docs/code-group.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---
title: Code Group
icon: lucide:code-xml
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/code-group
target: _blank
- value: Docus
to: https://docus.dev/api/components#codegroup
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/CodeGroup.vue
target: _blank
---

:badge[Docus]{variant="outline" to="https://docus.dev/api/components#codegroup" target="_blank"}
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/code-group" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::code-group
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/field-group.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Field Group
icon: lucide:settings-2
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/field-group
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/FieldGroup.vue
target: _blank
---

:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/field-group" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::field-group
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/field.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Field
icon: lucide:settings-2
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/field
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Field.vue
target: _blank
---

:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/field" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::field{name="Field" type="string" defaultValue="'default'" required}
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/icon.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Icon
icon: lucide:star
badges:
- value: Docus
to: https://docus.dev/api/components#icon
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Icon.vue
target: _blank
---

:badge[Docus]{variant="outline" to="https://docus.dev/api/components#icon" target="_blank"}

::alert{to="https://github.com/nuxt-modules/icon" target="_blank"}
The icon component uses **Nuxt Icon** under the hood. Check out the usage guide from Nuxt Icon.
::
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/read-more.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Read More
icon: lucide:bookmark
badges:
- value: undocs
to: https://undocs.pages.dev/guide/components#read-more
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/ReadMore.vue
target: _blank
---

:badge[undocs]{variant="outline" to="https://undocs.pages.dev/guide/components#read-more" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
:read-more{to="/getting-started/writing/markdown"}
Expand Down
12 changes: 9 additions & 3 deletions content/2.components/2.docs/shortcut.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
---
title: Shortcut
icon: lucide:keyboard
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/shortcut
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Shortcut.vue
target: _blank
- value: 0.6.3
---

:badge[0.6.3]{variant="outline"}
:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/shortcut" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
:shortcut{value="meta"} :shortcut{value="K"} :br
Expand Down
8 changes: 6 additions & 2 deletions content/2.components/2.docs/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ icon: lucide:rows-3
navBadges:
- value: New
type: lime
badges:
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Stack.vue
target: _blank
- value: 0.6.2
---

:badge[0.6.2]{variant="outline"}

::code-group
::div{label="Preview" class="md:p-4"}
::stack
Expand Down
5 changes: 5 additions & 0 deletions content/2.components/2.docs/steps.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
title: Steps
icon: lucide:arrow-down-0-1
badges:
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Steps.vue
target: _blank
---

::code-group
Expand Down
10 changes: 8 additions & 2 deletions content/2.components/2.docs/tabs.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: Tabs
icon: lucide:table-2
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/tabs
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Tabs.vue
target: _blank
---

:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/tabs" target="_blank"}

#### Default Style

::code-group
Expand Down
8 changes: 6 additions & 2 deletions content/2.components/3.page/accordion.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
title: Accordion
icon: lucide:layout-list
badges:
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Accordion.vue
target: _blank
- value: 0.5.0
---

:badge[0.5.0]{variant="outline"}

::code-group
::div{label="Preview" class="md:p-4"}
::accordion{default-value="first-item" collapsible}
Expand Down
13 changes: 9 additions & 4 deletions content/2.components/3.page/collapsible.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
---
title: Collapsible
icon: lucide:list-collapse
badges:
- value: Nuxt UI Pro
to: https://ui.nuxt.com/pro/prose/collapsible
target: _blank
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Collapsible.vue
target: _blank
- value: 0.5.8
---

:badge[0.5.8]{variant="outline"}

#### Simple

:badge[Nuxt UI Pro]{variant="outline" to="https://ui.nuxt.com/pro/prose/callout" target="_blank"}

::code-group
::div{label="Preview" class="md:p-4"}
::collapsible
Expand Down
8 changes: 6 additions & 2 deletions content/2.components/3.page/hero-alt.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
title: HeroAlt
icon: lucide:align-left
badges:
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/HeroAlt.vue
target: _blank
- value: 0.4.0
---

:badge[0.4.0]{variant="outline"}

::code-group
::div{label="Preview" class="md:p-4"}
::hero-alt
Expand Down
5 changes: 5 additions & 0 deletions content/2.components/3.page/hero.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
title: Hero
icon: lucide:align-center
badges:
- value: Source
icon: lucide:code
to: https://github.com/ZTL-UwU/shadcn-docs-nuxt/blob/main/components/content/Hero.vue
target: _blank
---

::code-group
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default defineNuxtConfig({
fields: [
'icon',
'navBadges',
'badges',
'toc',
'sidebar',
],
Expand Down
Loading

0 comments on commit 8d6215e

Please sign in to comment.