From 2816077c1942eda9d6ecc869d16a53946968acac Mon Sep 17 00:00:00 2001 From: Jeremy Likness Date: Sat, 23 Nov 2019 12:28:04 -0800 Subject: [PATCH] begin deck building/update title --- js/navigator.js | 2 ++ slides/001-title.html | 2 +- slides/{002-stuff.html => 002-experiment.html} | 0 3 files changed, 3 insertions(+), 1 deletion(-) rename slides/{002-stuff.html => 002-experiment.html} (100%) diff --git a/js/navigator.js b/js/navigator.js index c6bbe68..087dae8 100644 --- a/js/navigator.js +++ b/js/navigator.js @@ -38,6 +38,7 @@ class Navigator extends HTMLElement { slide = parseInt(this._route) - 1; } this.jumpTo(slide); + this._title = document.querySelectorAll("title")[0]; } } } @@ -72,6 +73,7 @@ class Navigator extends HTMLElement { this.appendChild(this.currentSlide.html); this._router.setRoute(slideIdx+1); this._route = this._router.getRoute(); + document.title = `${this.currentIndex+1}/${this.totalSlides}: ${this.currentSlide.title}`; this.dispatchEvent(this.slidesChangedEvent); if (this._animator.animationReady) { this._animator.endAnimation(this.querySelector("div")); diff --git a/slides/001-title.html b/slides/001-title.html index f77793c..e4d50e8 100644 --- a/slides/001-title.html +++ b/slides/001-title.html @@ -2,5 +2,5 @@

Vanilla.js: Modern 1st Party JavaScript

Jeremy Likness

Cloud Advocate, Microsoft

-002-stuff +002-experiment slide-left \ No newline at end of file diff --git a/slides/002-stuff.html b/slides/002-experiment.html similarity index 100% rename from slides/002-stuff.html rename to slides/002-experiment.html