Commit de436f02 authored by julientaq's avatar julientaq

fix full screen archives

parent d6a71dc8
......@@ -243,18 +243,15 @@
<nav>
<ul>
<li><a href="about.html">About</a></li>
<li><a href="blog.html">News</a></li>
<li><a href="blog.html">News</a></li>
<li><a href="attendees.html">People</a></li>
<li><a href="calendar.html">Calendar</a></li>
<li><a href="archives.html">Archives</a></li>
<!-- <li><a class="proposal" href="participant.html">Sign the guestbook!</a></li> -->
<!-- <li><a class="proposal" href="participant.html">Sign the guestbook!</a></li> -->
<!-- <li><a class="proposal" href="form.html">Propose an event</a></li> -->
</ul>
</nav>
</header>
<h1>Welcome to the archives!</h1>
<label class="lookingFor"><span>Looking for a specific talk?</span>
<input type="text" id="search" onkeyup="searchArchive()" placeholder="Search for anything.."></label>
......@@ -265,6 +262,17 @@
</main> <!-- this page list all the available events -->
<!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
<script src="js/dist-archive.js?v2"></script>
<script>
async function fullscreen(el) {
const frame = el.closest('.content').querySelector('.iframe-container')
frame.classList.add("fullscreen-vid");
const button = document.createElement("button");
button.setAttribute('onclick','this.closest(".iframe-container").classList.remove("fullscreen-vid"); document.querySelectorAll(`.closeVid`).forEach(el => el.remove());');
button.innerHTML = "close";
button.classList.add("closeVid");
frame.insertAdjacentElement(`beforeend`, button);
}
</script>
<script>
var _paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
......
......@@ -649,20 +649,27 @@ async function createArchives(sortedDates, targetDate) {
}
event.setAttribute('style', `--color-tent: var(--${color})`)
event.setAttribute('onclick', `showEl(this)`)
event.classList.add('archive-event');
const div = document.createElement('div');
div.classList.add("content");
div.id = `archive-event-${el.id}`
div.innerHTML += ``
// div.innerHTML += ``
div.innerHTML += `<p class="meta"><span class="date">${moment(el.date).clone().format("LL")}</span> in <span class="tent">${el.tentName}</span></p>`
div.innerHTML += `<h2>${el.title}</h2>`;
div.innerHTML += (el.participant) ? `<p class="participants">${el.participant}</p>` : ``;
div.innerHTML += `<p class="description">${el.description}</p>`;
if(el.archiveLink.indexOf("scalelite") >= 0) {
div.innerHTML += `<button class="fullscreen" onclick="fullscreen(this)">Watch the archive<button>`
div.innerHTML += md.render(`${el.archiveLink}`)
div.classList.add("scalelite");
}
else {
div.innerHTML += md.render(`${el.archiveLink}`)
}
// div.innerHTML += `<p class="description">${el.description}</p>`;
event.insertAdjacentElement('beforeend', div);
event.innerHTML += md.render(`${el.archiveLink}`)
container.insertAdjacentElement('beforeend', event);
}
}
......@@ -671,9 +678,7 @@ async function createArchives(sortedDates, targetDate) {
}
// }
function showEl(el) {
el.classList.toggle('show');
}
function orderByDate(dates) {
......@@ -683,6 +688,7 @@ function orderByDate(dates) {
async function openURL() {
if (window.location.hash) {
if (RegExp('archive-event-').test(window.location.hash)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment