initial commit
Base appearance of the website is done, now onto adding features
This commit is contained in:
15
components/ui/header/Link.vue
Normal file
15
components/ui/header/Link.vue
Normal file
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<RouterLink :to="props.path" :class="cssClass">
|
||||
{{ props.name }}
|
||||
</RouterLink>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
path: string;
|
||||
name: string;
|
||||
}>();
|
||||
|
||||
const route = useRoute();
|
||||
const cssClass = computed((): string => (props.path === route.path ? 'bg-background-300' : 'bg-background'));
|
||||
</script>
|
||||
Reference in New Issue
Block a user