summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/help.md2
-rw-r--r--templates/page.tmpl66
-rw-r--r--templates/pagedraft.md5
-rw-r--r--templates/sched.md5
-rw-r--r--templates/time.md1
5 files changed, 63 insertions, 16 deletions
diff --git a/templates/help.md b/templates/help.md
index fc133fcc..749c8ee3 100644
--- a/templates/help.md
+++ b/templates/help.md
@@ -1,4 +1,4 @@
-<details class="help"><summary>Help wanted<TMPL_IF summary>: <TMPL_VAR summary></TMPL_IF summary> <TMPL_IF volunteer>(Volunteered: <TMPL_VAR volunteer>)</TMPL_IF></summary>
+<details class="help"><summary><TMPL_IF volunteer>Work in progress<TMPL_ELSE>Help wanted</TMPL_IF><TMPL_IF summary>: <TMPL_VAR summary></TMPL_IF summary> <TMPL_IF volunteer>(Volunteered: <TMPL_VAR volunteer>)</TMPL_IF></summary>
<TMPL_IF main_captions>
This talk does not have captions yet. Would you like to help [caption this talk](/2021/contribute/#edit-captions)? You may be able to start with these
[auto-generated captions](<TMPL_VAR main_captions>).
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 7cf2eb50..20c3dd31 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -76,9 +76,13 @@
}, 0);
}
- function handleSubtitleClick(event) {
- var video = event.target.attributes['data-video'].value;
- var start = event.target.attributes['data-start'].value
+ function handleSubtitleClick(event) {
+ var video = event.target.getAttribute('data-video');
+ var start = event.target.getAttribute('data-start');
+ let m = video.match(/(mainVideo|qnaVideo)-(.*)/);
+ if (m) {
+ video = m[2] + '-' + m[1];
+ }
var videoElem = document.getElementById(video);
if (videoElem) {
videoElem.currentTime = parseSeconds(start);
@@ -138,10 +142,11 @@
<TMPL_IF HAVE_ACTIONS>
<TMPL_IF HTML5><nav class="actions"><TMPL_ELSE><div class="actions"></TMPL_IF>
<ul>
+<!-- <li><a href="<TMPL_VAR BASEURL>donate/">❤️ Donate</a></li> -->
<TMPL_IF EDITURL>
<li><a href="<TMPL_VAR EDITURL>" rel="nofollow">Edit</a></li>
<TMPL_ELSE>
-<li><a href="/edit/">Edit <span class="muted">(how to)</span></a></li>
+<li><a href="<TMPL_VAR BASEURL>edit/">Edit <span class="muted">(how to)</span></a></li>
</TMPL_IF>
<TMPL_IF RECENTCHANGESURL>
<li><a href="<TMPL_VAR RECENTCHANGESURL>">Recent Changes</a></li>
@@ -295,7 +300,7 @@ Last edited <TMPL_VAR MTIME>
<script>
// @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt txt CC0-1.0
// Copyright (C) 2021, 2022 Sacha Chua
-
+
if (document.querySelector('.times')) {
var dateOptions = {dateStyle: 'short', timeStyle: 'short'};
var localStart = (new Date(document.querySelector('.times').getAttribute('start'))).toLocaleString([], dateOptions);
@@ -307,18 +312,34 @@ Last edited <TMPL_VAR MTIME>
document.querySelector('.times').querySelector('.others').style.display = 'none';
}
}
+ if (document.querySelector('.time-overlay')) {
+ document.querySelectorAll('.time-overlay').forEach(function (o) {
+ if (o.getAttribute('title')) return;
+ var dateOptions = {dateStyle: 'short', timeStyle: 'short'};
+ var localStart, localEnd;
+ if (o.getAttribute('start') && o.getAttribute('end')) {
+ localStart = (new Date(o.getAttribute('start'))).toLocaleString([], dateOptions);
+ localEnd = (new Date(o.getAttribute('end'))).toLocaleString([], dateOptions);
+ o.setAttribute('title', 'Your local time: ~ ' + localStart + ' to ~ ' + localEnd);
+ } else if (o.getAttribute('start')) {
+ localStart = (new Date(o.getAttribute('start'))).toLocaleString([], dateOptions);
+ o.setAttribute('title', 'Your local time: ~ ' + localStart);
+ }
+ });
+ }
+
if (document.querySelector('a[name=transcript]')) {
var transcriptLink = document.createElement('a');
transcriptLink.setAttribute('href', '#transcript');
transcriptLink.textContent = 'View transcript';
-var video = document.querySelector('.mainVideo video');
-if (video) {
- var resources = document.querySelector('.mainVideo video').closest('.vid').querySelector('.resources');
- var transcriptDiv = document.createElement('div');
-transcriptDiv.appendChild(transcriptLink)
- if (resources) { resources.prepend(transcriptDiv); }
- }
-}
+ var video = document.querySelector('.mainVideo video');
+ if (video) {
+ var resources = document.querySelector('.mainVideo video').closest('.vid').querySelector('.resources');
+ var transcriptDiv = document.createElement('div');
+ transcriptDiv.appendChild(transcriptLink)
+ if (resources) { resources.prepend(transcriptDiv); }
+ }
+ }
var chat = document.querySelector('.chat-iframe');
if (chat) {
if (chat.getAttribute('data-track')) {
@@ -409,6 +430,25 @@ if (video) {
}
// @license-end
+ // @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt txt CC0-1.0
+ // Copyright (c) 2023 Sacha Chua - CC0 Public Domain
+ function highlightTalks() {
+ // highlight any talk mentioned in the highlight URL parameter
+ var params = new URLSearchParams(window.location.search);
+ if (!params.get('highlight')) return;
+ var talks = params.get('highlight').split(',').filter(function(o) { return o.match(/^[-a-z0-9]+$/); });
+ var regexp = new RegExp('/talks/(' + talks.join('|') + ')/?$');
+ document.querySelectorAll('a[href]').forEach(function(link) {
+ console.debug(link.getAttribute('href'), link.getAttribute('href').match(regexp));
+ if (link.getAttribute('href').match(regexp)) {
+ console.debug(link);
+ link.classList.add('highlight');
+ }
+ });
+ }
+
+ addEventListener('DOMContentLoaded', highlightTalks);
+ // @license-end
</script>
</body>
</html>
diff --git a/templates/pagedraft.md b/templates/pagedraft.md
new file mode 100644
index 00000000..7fd08768
--- /dev/null
+++ b/templates/pagedraft.md
@@ -0,0 +1,5 @@
+<div class="draft"> THIS IS A DRAFT DOCUMENT. It's not ready for
+sharing yet. We're still working on it! Feel free to update it or
+e-mail
+<a href="mailto:emacsconf-org@gnu.org">emacsconf-org@gnu.org</a>.
+</div>
diff --git a/templates/sched.md b/templates/sched.md
index 65cf4813..cbc94106 100644
--- a/templates/sched.md
+++ b/templates/sched.md
@@ -6,11 +6,12 @@
</span></TMPL_IF start>
<TMPL_IF track> <span class="sched-track <TMPL_VAR track>"><TMPL_IF watch><a href="<TMPL_VAR watch>"></TMPL_IF><TMPL_VAR track><TMPL_IF watch></a></TMPL_IF></span></TMPL_IF track>
<TMPL_IF pad> <span class="sched-pad"><a href="<TMPL_VAR pad>">Etherpad</a></TMPL_IF pad>
-<TMPL_IF q-and-a> <span class="sched-q-and-a">Q&amp;A: <TMPL_VAR q-and-a>;</span> </TMPL_IF q-and-a>
-<TMPL_IF slug> <span class="sched-slug">id:<TMPL_VAR slug></span></TMPL_IF slug>
+<TMPL_IF q-and-a> <span class="sched-q-and-a">Q&amp;A: <TMPL_VAR q-and-a></span> </TMPL_IF q-and-a>
</div>
<div class="sched-title"><a href="<TMPL_VAR url>"><TMPL_VAR title></a></div>
<div class="sched-speakers"><TMPL_VAR speakers> <TMPL_IF note>- <TMPL_VAR note></TMPL_IF note></div>
+<TMPL_IF time><span class="sched-duration><TMPL_VAR time></span> minutes</TMPL_IF time>
+<TMPL_IF slug> <span class="sched-slug">id:<TMPL_VAR slug></span></TMPL_IF slug>
<TMPL_IF resources>
<ul class="resources">
<TMPL_VAR resources>
diff --git a/templates/time.md b/templates/time.md
new file mode 100644
index 00000000..b3f3c90e
--- /dev/null
+++ b/templates/time.md
@@ -0,0 +1 @@
+<span class="time-overlay" data-start="<TMPL_VAR startutc>" data-end="<TMPL_VAR endutc>"><TMPL_VAR time></span>