summaryrefslogtreecommitdiffstats
path: root/templates/page.tmpl
diff options
context:
space:
mode:
authorGrant Shangreaux <grant@unabridgedsoftware.com>2020-12-29 11:50:05 -0600
committerGrant Shangreaux <grant@unabridgedsoftware.com>2020-12-29 11:50:05 -0600
commit6980ed89cbbe372138167cf1263f154fff67a201 (patch)
tree60d38a9d095d6b93a39cde4781d2f5e0aa7e9541 /templates/page.tmpl
parent9be9a10f2622086bf086af0ce82a0febed155c7a (diff)
downloademacsconf-wiki-6980ed89cbbe372138167cf1263f154fff67a201.tar.xz
emacsconf-wiki-6980ed89cbbe372138167cf1263f154fff67a201.zip
Add: timestamp seek script to main template page, test talk05 links
Diffstat (limited to 'templates/page.tmpl')
-rw-r--r--templates/page.tmpl21
1 files changed, 19 insertions, 2 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 28d650ad..3e94e1ae 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -37,6 +37,24 @@
</TMPL_LOOP>
</TMPL_UNLESS>
+<script>
+ var mainVideo;
+ var timestamps;
+
+ window.onload = function initScript() {
+ console.log("initializing seek to time script");
+ mainVideo = document.getElementById("mainVideo");
+ timestamps = document.getElementsByClassName("time-link");
+ len = timestamps.length;
+ for (i = 0; i < len; i++) {
+ seconds = parseFloat(timestamps[i].dataset["timestamp"]);
+
+ timestamps[i].onclick = function () {
+ mainVideo.currentTime = seconds;
+ }
+ }
+ }
+</script>
</head>
<body>
@@ -48,7 +66,7 @@
<span>
<span class="parentlinks">
<TMPL_LOOP PARENTLINKS>
-<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/
+<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/
</TMPL_LOOP>
</span>
<span class="title">
@@ -221,6 +239,5 @@ Last edited <TMPL_VAR MTIME>
<TMPL_IF HTML5></footer><TMPL_ELSE></div></TMPL_IF>
<TMPL_IF HTML5></article><TMPL_ELSE></div></TMPL_IF>
-
</body>
</html>