mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Formatting
This commit is contained in:
parent
de46c4153b
commit
c7bde2d3ff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.cee5e008.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.553b3b51.min.js' | url }}"></script>
|
||||||
{% for script in config.extra_javascript %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -168,7 +168,7 @@ function resolve(document: Document): Observable<Document> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a map of head elements for lookup and replacement
|
* Inject the contents of a document into the current one
|
||||||
*
|
*
|
||||||
* @param next - Next document
|
* @param next - Next document
|
||||||
*
|
*
|
||||||
@ -327,8 +327,8 @@ export function setupInstantNavigation(
|
|||||||
// that are not needed anymore, e.g., when the user clicks multiple links in
|
// that are not needed anymore, e.g., when the user clicks multiple links in
|
||||||
// quick succession or on slow connections. If the request fails for some
|
// quick succession or on slow connections. If the request fails for some
|
||||||
// reason, we fall back and use regular navigation, forcing a reload.
|
// reason, we fall back and use regular navigation, forcing a reload.
|
||||||
const document$ = location$
|
const document$ =
|
||||||
.pipe(
|
location$.pipe(
|
||||||
distinctUntilKeyChanged("pathname"),
|
distinctUntilKeyChanged("pathname"),
|
||||||
switchMap(url => requestHTML(url, { progress$ })
|
switchMap(url => requestHTML(url, { progress$ })
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -421,15 +421,14 @@ export function setupInstantNavigation(
|
|||||||
// and forth between pages. Note that this must be debounced and cannot be
|
// and forth between pages. Note that this must be debounced and cannot be
|
||||||
// done in popstate, as popstate has already removed the entry from the
|
// done in popstate, as popstate has already removed the entry from the
|
||||||
// history, which means it is too late.
|
// history, which means it is too late.
|
||||||
viewport$
|
viewport$.pipe(
|
||||||
.pipe(
|
distinctUntilKeyChanged("offset"),
|
||||||
distinctUntilKeyChanged("offset"),
|
debounceTime(100)
|
||||||
debounceTime(100)
|
)
|
||||||
)
|
.subscribe(({ offset }) => {
|
||||||
.subscribe(({ offset }) => {
|
history.replaceState(offset, "")
|
||||||
history.replaceState(offset, "")
|
})
|
||||||
})
|
|
||||||
|
|
||||||
// Return document
|
// Return document observable
|
||||||
return document$
|
return document$
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user