Bug 33381: Fix sidemenu active and hover styling

Change router link active class match rule. This makes it so that the route erm/agreements/1 will also match the router-link /erm/agreements instead of the previous exact match rule, thus adding the 'current' class
Update styling router-links to not apply 'current' styling when
.disabled

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 92e3793eb8)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
This commit is contained in:
Pedro Amorim 2023-04-01 17:38:33 +00:00 committed by Jacob O'Mara
parent cff59f18d5
commit cb7496a37c
2 changed files with 6 additions and 8 deletions

View file

@ -215,9 +215,6 @@ export default {
</script>
<style>
#navmenulist a.router-link-active {
font-weight: 700;
}
#menu ul ul,
#navmenulist ul ul {
padding-left: 2em;
@ -241,13 +238,14 @@ textarea {
.flatpickr-input {
width: 30%;
}
#navmenulist ul li a.current.disabled {
background-color: inherit;
border-left: 5px solid #e6e6e6;
color: #000;
}
#navmenulist ul li a.disabled {
color: #666;
pointer-events: none;
font-weight: 700;
}
#navmenulist ul li a.disabled.router-link-active {
color: #000;
}
</style>

View file

@ -21,7 +21,7 @@ import { routes } from "../routes/erm";
const router = createRouter({
history: createWebHistory(),
linkExactActiveClass: "current",
linkActiveClass: "current",
routes,
});