diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-10 19:16:54 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2016-04-10 19:16:54 +0200 |
| commit | 2159191a465d0c78081f7fc6002362a0d964e4cb (patch) | |
| tree | 8ca956d4d7bbea6f02d79769243952cc9b989a92 /index.html | |
| parent | 5b7e6591f088a3e8466b1072adbc5b2832330697 (diff) | |
| download | vortrag-knn-2159191a465d0c78081f7fc6002362a0d964e4cb.tar.gz vortrag-knn-2159191a465d0c78081f7fc6002362a0d964e4cb.zip | |
add progress bars
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -31,7 +31,8 @@ MathJax.Hub.Config({ SVG: { scale: 150 - } + }, + messageStyle: "none" }); emojione.imageType = 'svg'; @@ -60,6 +61,15 @@ sizeSlides(); }, false); + var stepIds = []; + document.addEventListener("impress:init", function(event) { + for (c=0; c<event.detail.steps.length; c++) stepIds[c+1] = event.detail.steps[c].id; + }); + function progressBar(slide) { + d3.select("#progressBar div").style("width", (100 / (stepIds.length-1) * stepIds.indexOf(slide)).toFixed(2) + "%"); + } + document.addEventListener("impress:stepenter", function(e) { progressBar(e.target.id); }); + /* responsive deck */ function sizeSlides() { d3.selectAll(".slide") @@ -100,11 +110,23 @@ }); </script> + <div class="bar" id="progressBar"><div></div></div> + <div class="bar" id="timeBar"><div></div></div> <div id="impress" data-width="800" data-height="600"> - <!-- TODO Fortschrittsbalken unten? --> <div id="title" class="step slide" data-x="0" data-y="0" data-z="1000"> <h1>Künstliche neuronale Netze</h1> <h2>38 Gewichte in 19 Minuten</h2> + <script type="text/javascript"> + document.currentScript.parentElement.addEventListener("impress:stepleave", function(e) { + d3.select("#timeBar div") + .interrupt() + .style("width", "0%") + .transition() + .duration(19*60*1000) + .ease("linear") + .style("width", "100%"); + }); + </script> </div> <!-- TODO Inhaltsübersicht --> |
