File tree 2 files changed +3
-11
lines changed
2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 1
1
<script >
2
2
import CrossfadeProvider from ' $lib/components/generic/crossfade/CrossfadeProvider.svelte' ;
3
3
import { createEventDispatcher , getContext } from ' svelte' ;
4
+ import { base } from ' $app/paths' ;
4
5
5
6
const page = getContext (' navbar' );
6
7
const dispatch = createEventDispatcher ();
7
8
8
9
export let href;
9
- export let isActive = (path ) => path === href;
10
+ export let isActive = (path ) => ` ${ base }${ path} ` === href;
10
11
11
12
const click = (evt ) => dispatch (' click' , evt);
12
13
Original file line number Diff line number Diff line change 16
16
{ href: ` ${ base} /docs/examples` , text: ' Examples' },
17
17
{
18
18
href: ` ${ base} /docs/theme-editor/light` ,
19
- isActive : (p ) => p .startsWith (` ${ base } /docs/theme-editor` ),
19
+ isActive : (p ) => p .startsWith (` /docs/theme-editor` ),
20
20
text: ' Theme Editor'
21
21
}
22
22
];
57
57
</NavBar >
58
58
<div class =" route-wrapper" >
59
59
<slot />
60
- <!-- Can consider re-adding this but would want to avoid transition between theme pages -->
61
- <!-- <Swappable
62
- magnitude={0.06}
63
- vertical={true}
64
- value={$page.path}
65
- getId={(path) => links.findIndex(({ href }) => path === href)}
66
- >
67
- <slot />
68
- </Swappable> -->
69
60
</div >
70
61
</div >
71
62
</div >
You can’t perform that action at this time.
0 commit comments