mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-08-01 18:28:48 -04:00
Refactored to use URLs at all times
This commit is contained in:
@@ -59,7 +59,6 @@ import {
|
||||
watchToggle,
|
||||
setToggle,
|
||||
getElements,
|
||||
getLocation,
|
||||
watchMedia,
|
||||
watchDocument,
|
||||
watchLocation,
|
||||
@@ -213,7 +212,7 @@ export function initialize(config: unknown) {
|
||||
const navigation$ = useComponent("navigation")
|
||||
.pipe(
|
||||
mountNavigation({ header$, main$, viewport$, screen$ }),
|
||||
shareReplay(1)
|
||||
shareReplay(1) // shareReplay because there might be late subscribers
|
||||
)
|
||||
|
||||
const toc$ = useComponent("toc")
|
||||
@@ -260,7 +259,8 @@ export function initialize(config: unknown) {
|
||||
|
||||
// Close drawer and search on hash change
|
||||
// put into navigation...
|
||||
hash$.subscribe(x => {
|
||||
// TODO: replace with popstate?
|
||||
hash$.subscribe(() => {
|
||||
useToggle("drawer").subscribe(el => {
|
||||
setToggle(el, false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user