Skip to content

Commit

Permalink
fix active sidebar menu item for active event page
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreezag committed Sep 11, 2024
1 parent 0668e0f commit 5a9f342
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/widgets/ui/layout-sidebar/layout-sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ const generateRadialGradient = (input: string) =>
</template>

<template v-for="type in filteredNavOrder" :key="type">
<!-- TODO: add router-link-active to inner routed-->
<RouterLink
:to="{ name: RouteName.EventList, params: { type } }"
:class="{ 'layout-sidebar__link--active': $route.params.type === type }"
:title="PAGES_SETTINGS[type].sidebarTitle"
class="layout-sidebar__link"
>
Expand Down Expand Up @@ -293,17 +293,16 @@ const generateRadialGradient = (input: string) =>
@apply px-1.5 py-2 md:px-2 md:py-3;
@apply text-blue-500 hover:text-white hover:bg-gray-700 hover:opacity-100;
&.router-link-active {
@apply bg-blue-700 text-blue-200;
}
.layout-sidebar__projects & {
@apply p-1.5 md:p-2;
}
}
.layout-sidebar__link--logo,
.layout-sidebar__link--logo.router-link-active {
.layout-sidebar__link--active {
@apply bg-blue-700 text-blue-200;
}
.layout-sidebar__link--logo {
@apply text-blue-600 bg-transparent hover:text-blue-800 hover:bg-transparent;
@apply dark:text-blue-500 dark:bg-transparent hover:dark:text-blue-200 hover:dark:bg-transparent;
}
Expand Down

0 comments on commit 5a9f342

Please sign in to comment.