summaryrefslogtreecommitdiffstats
path: root/templates
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
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')
-rw-r--r--templates/page.tmpl21
-rw-r--r--templates/vid.md2
2 files changed, 20 insertions, 3 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>
diff --git a/templates/vid.md b/templates/vid.md
index 37af8bf5..3d48a0bb 100644
--- a/templates/vid.md
+++ b/templates/vid.md
@@ -1,5 +1,5 @@
<div class="vid">
-<video controls preload="metadata" id="<TMPL_VAR vidid>" onload="var mainVideo = document.getElementById(<TMPL_VAR vidid>)">
+<video controls preload="metadata" id="<TMPL_VAR vidid>">
<source src="<TMPL_VAR src>" type="<TMPL_VAR type>" />
<TMPL_IF subtitles>
<track label="English" kind="subtitles" srclang="en" src="<TMPL_VAR subtitles>" default />