Skip to content

Commit 4328f16

Browse files
authored
Merge pull request #84 from Nicolhetti/main
Enhancement: Clickable Tags in Header Component
2 parents 662db4f + 72294f1 commit 4328f16

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

components/blog/Header.vue

+6-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ withDefaults(defineProps<Props>(), {
4343
<div class="flex items-center gap-2 flex-wrap my-5">
4444
<LogoTag />
4545
<template v-for="tag in tags" :key="tag">
46-
<span class="bg-gray-200 dark:bg-slate-900 rounded-md px-2 py-1 font-semibold">{{
47-
tag
48-
}}</span>
46+
<NuxtLink :to="`/categories/${tag.toLocaleLowerCase()}`">
47+
<span
48+
class="bg-gray-200 dark:bg-slate-900 rounded-md px-2 py-1 font-semibold hover:bg-gray-300 dark:hover:bg-slate-800 transition-colors duration-200"
49+
>{{ tag }}</span
50+
>
51+
</NuxtLink>
4952
</template>
5053
</div>
5154
</div>

0 commit comments

Comments
 (0)