begin deck building/update title

This commit is contained in:
Jeremy Likness 2019-11-23 12:28:04 -08:00
parent 3a59e39fb0
commit 2816077c19
3 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class Navigator extends HTMLElement {
slide = parseInt(this._route) - 1; slide = parseInt(this._route) - 1;
} }
this.jumpTo(slide); this.jumpTo(slide);
this._title = document.querySelectorAll("title")[0];
} }
} }
} }
@ -72,6 +73,7 @@ class Navigator extends HTMLElement {
this.appendChild(this.currentSlide.html); this.appendChild(this.currentSlide.html);
this._router.setRoute(slideIdx+1); this._router.setRoute(slideIdx+1);
this._route = this._router.getRoute(); this._route = this._router.getRoute();
document.title = `${this.currentIndex+1}/${this.totalSlides}: ${this.currentSlide.title}`;
this.dispatchEvent(this.slidesChangedEvent); this.dispatchEvent(this.slidesChangedEvent);
if (this._animator.animationReady) { if (this._animator.animationReady) {
this._animator.endAnimation(this.querySelector("div")); this._animator.endAnimation(this.querySelector("div"));

View File

@ -2,5 +2,5 @@
<h1>Vanilla.js: Modern 1st Party JavaScript</h1> <h1>Vanilla.js: Modern 1st Party JavaScript</h1>
<h2>Jeremy Likness</h2> <h2>Jeremy Likness</h2>
<h3>Cloud Advocate, Microsoft</h3> <h3>Cloud Advocate, Microsoft</h3>
<nextslide>002-stuff</nextslide> <nextslide>002-experiment</nextslide>
<transition>slide-left</transition> <transition>slide-left</transition>