summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-15 19:23:45 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-15 19:25:00 -0400
commit6824192b6d93b930c8a7e11451ff7ea1b08cf523 (patch)
treec74accfac4277f1163b2efa838d227e2b70119c4 /templates
parent14998c25f5a96e9080e08898a48ce9c66afcbcd8 (diff)
downloademacsconf-wiki-6824192b6d93b930c8a7e11451ff7ea1b08cf523.tar.xz
emacsconf-wiki-6824192b6d93b930c8a7e11451ff7ea1b08cf523.zip
Include schedule details
Diffstat (limited to 'templates')
-rw-r--r--templates/page.tmpl18
1 files changed, 15 insertions, 3 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index 1c31631d..de59944d 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -294,8 +294,19 @@ Last edited <TMPL_VAR MTIME>
<script>
// @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt txt CC0-1.0
- // Copyright (C) 2021 Sacha Chua
- if (document.querySelector('.times')) { document.querySelector('.times').prepend('Your local time: ~ ' + (new Date(document.querySelector('.times').getAttribute('start')).toLocaleString()) + ' to ~ ' + (new Date(document.querySelector('.times').getAttribute('end')).toLocaleString()) + "<br />"); }
+ // 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);
+ var localEnd = (new Date(document.querySelector('.times').getAttribute('end'))).toLocaleString([], dateOptions);
+ var dateElem = document.createElement('div');
+ dateElem.appendChild(document.createTextNode('Your local time: ~ ' + localStart + ' to ~ ' + localEnd));
+ document.querySelector('.times').prepend(dateElem);
+ if (document.querySelector('.times').querySelector('.others')) {
+ document.querySelector('.times').querySelector('.others').style.display = 'none';
+ }
+ }
if (document.querySelector('a[name=transcript]')) {
var transcriptLink = document.createElement('a');
transcriptLink.setAttribute('href', '#transcript');
@@ -310,7 +321,8 @@ transcriptDiv.appendChild(transcriptLink)
}
if (document.querySelector('.chat-iframe')) {
document.querySelector('.chat-iframe').innerHTML = '<iframe src="https://chat.emacsconf.org" height="600" width="100%"></iframe>';
-}
+ }
+
// @license-end
</script>
<script>