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
material
src/assets/javascripts/components/header/title
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>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% 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 %}
|
{% for path in config.extra_javascript %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -115,8 +115,17 @@ export function mountHeaderTitle(
|
|||||||
): Observable<Component<HeaderTitle>> {
|
): Observable<Component<HeaderTitle>> {
|
||||||
return defer(() => {
|
return defer(() => {
|
||||||
const push$ = new Subject<HeaderTitle>()
|
const push$ = new Subject<HeaderTitle>()
|
||||||
push$.subscribe(({ active }) => {
|
push$.subscribe({
|
||||||
|
|
||||||
|
/* Handle emission */
|
||||||
|
next({ active }) {
|
||||||
el.classList.toggle("md-header__title--active", active)
|
el.classList.toggle("md-header__title--active", active)
|
||||||
|
},
|
||||||
|
|
||||||
|
/* Handle complete */
|
||||||
|
complete() {
|
||||||
|
el.classList.remove("md-header__title--active")
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/* Obtain headline, if any */
|
/* Obtain headline, if any */
|
||||||
|
Loading…
Reference in New Issue
Block a user