ui: Make others menu items active when on respective page
This commit is contained in:
parent
5981240280
commit
0669f74395
@ -1,5 +1,6 @@
|
||||
<script>
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
import {
|
||||
Badge,
|
||||
@ -62,7 +63,7 @@
|
||||
<NavbarToggler on:click={() => (isOpen = !isOpen)} />
|
||||
<Collapse {isOpen} navbar expand="md" on:update={handleUpdate}>
|
||||
<Nav navbar>
|
||||
<NavItem>
|
||||
<NavItem active={$page.route && $page.route.id === "/"}>
|
||||
<NavLink href=".">
|
||||
<Icon name="house" />
|
||||
Accueil
|
||||
@ -71,7 +72,7 @@
|
||||
<NavThemes />
|
||||
<NavTags />
|
||||
{#if $settings && $settings.end - $settings.start > 0 && $teams && Object.keys($teams).length}
|
||||
<NavItem>
|
||||
<NavItem active={$page.route && $page.route.id === "/rank"}>
|
||||
<NavLink href="rank">
|
||||
<Icon name="sort-down" />
|
||||
Classement
|
||||
@ -79,7 +80,7 @@
|
||||
</NavItem>
|
||||
{/if}
|
||||
<HeaderIssues />
|
||||
<NavItem>
|
||||
<NavItem active={$page.route && $page.route.id === "/rules"}>
|
||||
<NavLink href="rules">
|
||||
<Icon name="signpost-split" />
|
||||
Aide
|
||||
|
@ -1,4 +1,6 @@
|
||||
<script>
|
||||
import { page } from '$app/stores';
|
||||
|
||||
import {
|
||||
Badge,
|
||||
Icon,
|
||||
@ -24,7 +26,7 @@
|
||||
</script>
|
||||
|
||||
{#if $issues.length}
|
||||
<NavItem>
|
||||
<NavItem active={$page.route && $page.route.id === "/issues"}>
|
||||
<NavLink href="issues">
|
||||
<Icon name="bug" />
|
||||
Problèmes
|
||||
|
Loading…
Reference in New Issue
Block a user