ui: Make menu item active according to the visited scenario
This commit is contained in:
parent
4c29f2e53e
commit
d234bbf272
@ -58,7 +58,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
<div class="sticky-top">
|
||||
<Navbar color="dark" dark expand="md">
|
||||
<Navbar color="primary" dark expand="md">
|
||||
<NavbarToggler on:click={() => (isOpen = !isOpen)} />
|
||||
<Collapse {isOpen} navbar expand="md" on:update={handleUpdate}>
|
||||
<Nav navbar>
|
||||
|
@ -8,12 +8,13 @@
|
||||
Icon,
|
||||
} from '@sveltestrap/sveltestrap';
|
||||
|
||||
import { current_exercice } from '$lib/stores/exercices';
|
||||
import { my } from '$lib/stores/my.js';
|
||||
import { max_solved } from '$lib/stores/themes.js';
|
||||
import { current_theme, max_solved } from '$lib/stores/themes.js';
|
||||
import { myThemes, themes } from '$lib/stores/mythemes.js';
|
||||
</script>
|
||||
|
||||
<Dropdown nav inNavbar>
|
||||
<Dropdown nav inNavbar active={$current_theme}>
|
||||
<DropdownToggle nav caret>
|
||||
<Icon name="tv" />
|
||||
Scenarii
|
||||
@ -21,7 +22,7 @@
|
||||
<DropdownMenu class="niceborder">
|
||||
<div>
|
||||
{#each $themes as th, index}
|
||||
<DropdownItem href="{th.urlid}">
|
||||
<DropdownItem href="{th.urlid}" active={$current_theme && $current_theme.id == th.id}>
|
||||
{th.name}
|
||||
{#if $max_solved > 1 && th.solved == $max_solved}
|
||||
<Badge color="danger">
|
||||
|
Loading…
x
Reference in New Issue
Block a user