Skip to content

Commit

Permalink
fix: use NuxtLink for breadcrumb links (#84, #85)
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 Jan 9, 2025
1 parent dfa2846 commit 31195d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Beautifully designed _Nuxt Content_ template built with _shadcn-vue_. **Customiz

MIT

---

<a href='https://ko-fi.com/T6T7R1M58' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi3.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>

[npm-version-src]: https://img.shields.io/npm/v/shadcn-docs-nuxt?style=flat&colorA=18181b&colorB=18181b
[npm-version-href]: https://npmjs.com/package/shadcn-docs-nuxt
[npm-downloads-src]: https://img.shields.io/npm/dm/shadcn-docs-nuxt?style=flat&colorA=18181b&colorB=18181b
Expand Down
Binary file modified bun.lockb
Binary file not shown.
5 changes: 3 additions & 2 deletions components/layout/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
<UiBreadcrumbList>
<template v-for="(breadcrumb, index) in breadcrumbs" :key="breadcrumb.title">
<UiBreadcrumbItem>
<UiBreadcrumbLink
<NuxtLink
:href="index === 0 ? undefined : breadcrumb.href"
class="transition-colors hover:text-foreground"
:class="{ 'text-foreground': index === breadcrumbs.length - 1 }"
>
{{ breadcrumb.title }}
</UiBreadcrumbLink>
</NuxtLink>
</UiBreadcrumbItem>
<UiBreadcrumbSeparator v-if="index !== breadcrumbs.length - 1" />
</template>
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,34 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@iconify-json/lucide": "^1.2.20",
"@iconify-json/vscode-icons": "^1.2.7",
"@iconify-json/lucide": "^1.2.22",
"@iconify-json/vscode-icons": "^1.2.9",
"@nuxt/content": "^2.13.4",
"@nuxt/icon": "^1.10.3",
"@nuxt/image": "^1.8.1",
"@nuxt/image": "^1.9.0",
"@nuxtjs/color-mode": "^3.5.2",
"@nuxtjs/tailwindcss": "^6.12.2",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"nuxt": "^3.15.0",
"nuxt": "^3.15.1",
"nuxt-og-image": "^4.0.2",
"radix-vue": "^1.9.12",
"shadcn-nuxt": "^0.11.3",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.7.2",
"typescript": "^5.7.3",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@antfu/eslint-config": "^3.12.2",
"@nuxt/devtools": "^1.7.0",
"@nuxt/kit": "^3.15.0",
"@nuxt/kit": "^3.15.1",
"@vueuse/core": "^12.3.0",
"@vueuse/nuxt": "^12.3.0",
"eslint": "^9.17.0",
"eslint-plugin-tailwindcss": "^3.17.5",
"shiki": "^1.25.1",
"shiki": "^1.26.1",
"vue-tsc": "2.1.10"
}
}

0 comments on commit 31195d3

Please sign in to comment.