mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed header title not reset on missing headline when using instant loading
This commit is contained in:
parent
48e8b2be30
commit
ff99e19741
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -240,7 +240,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.1ef2e63d.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.4b2c34cd.min.js' | url }}"></script>
|
||||
{% for path in config.extra_javascript %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -115,8 +115,17 @@ export function mountHeaderTitle(
|
||||
): Observable<Component<HeaderTitle>> {
|
||||
return defer(() => {
|
||||
const push$ = new Subject<HeaderTitle>()
|
||||
push$.subscribe(({ active }) => {
|
||||
el.classList.toggle("md-header__title--active", active)
|
||||
push$.subscribe({
|
||||
|
||||
/* Handle emission */
|
||||
next({ active }) {
|
||||
el.classList.toggle("md-header__title--active", active)
|
||||
},
|
||||
|
||||
/* Handle complete */
|
||||
complete() {
|
||||
el.classList.remove("md-header__title--active")
|
||||
}
|
||||
})
|
||||
|
||||
/* Obtain headline, if any */
|
||||
|
Loading…
Reference in New Issue
Block a user