-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6437792
commit 66831f7
Showing
13 changed files
with
294 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script setup lang="ts"> | ||
import type { PropType } from 'vue' | ||
import type { INavItem } from '~~/types/INav' | ||
defineProps({ | ||
nav: { | ||
type: Object as PropType<INavItem>, | ||
required: true, | ||
}, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<NuxtLink v-if="nav.nav" :to="nav.url" class="nav-item" :data-badge="nav?.badge || ''"> | ||
{{ nav.nav }} | ||
</NuxtLink> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.nav-item { | ||
@apply h-full flex items-center text-[15px] border-b-2 border-transparent; | ||
@apply relative opacity-85 whitespace-nowrap; | ||
@apply text-black dark:text-[#e8ecfa]; | ||
} | ||
.nav-item:hover { | ||
@apply border-b-primary; | ||
@apply opacity-100; | ||
} | ||
.nav-item::after { | ||
@apply absolute left-2/3 top-2; | ||
@apply bg-red-500 text-white; | ||
@apply rounded-full px-1.5 py-0.4 whitespace-nowrap; | ||
@apply transform-gpu scale-60 origin-top-left; | ||
content: attr(data-badge); | ||
} | ||
.nav-item[data-badge='']::after { | ||
content: unset; | ||
} | ||
.nav-item.router-link-exact-active { | ||
@apply opacity-100 text-primary; | ||
} | ||
</style> |
Oops, something went wrong.