Updated the subnav system to use router state and finished styling

This commit is contained in:
ajdj100
2024-06-07 00:49:51 -04:00
parent 56db379543
commit 21fc11210e

View File

@@ -2,9 +2,8 @@
import { RouterLink } from 'vue-router' import { RouterLink } from 'vue-router'
import { Icon } from '@iconify/vue' import { Icon } from '@iconify/vue'
const iconName = "carbon:tool-kit"
export default { export default {
props: ['link', 'content', 'active'], props: ['link', 'content'],
components: { components: {
RouterLink, RouterLink,
Icon Icon
@@ -20,10 +19,25 @@ export default {
<template> <template>
<RouterLink :to="link"> <RouterLink :to="link">
<p class="text-white h-fit xl:rounded-md my-0 sm:pb-3 p-2 hover:text-blue transition-colors <p class="text-white h-fit xl:rounded-md my-0 sm:pb-3 p-2 hover:text-blue transition-colors
xl:active:ring-1 sm:border-b-2 xl:border-b-0 sm:border-gray-light sm:active:border-blue sm:border-b-2 xl:border-b-0 sm:border-gray-light
xl:active:ring-blue xl:w-64 sm:w-36 sm:text-center xl:text-left" xl:w-64 sm:w-36 sm:text-center xl:text-left">
:class="{ active: active }">
{{ content }} {{ content }}
</p> </p>
</RouterLink> </RouterLink>
</template> </template>
<style scoped>
@media only screen and (min-width: 1375px) {
.router-link-active {
outline: 2px solid var(--accent-primary);
border-radius: 10px;
}
}
@media only screen and (max-width: 1376px) {
.router-link-active {
box-shadow: 0 2px 0 0 var(--accent-primary);
background-color: transparent;
}
}
</style>