Merge branch 'main' of https://git.luj0ga.de/franconian/www.franconian.net into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
commit
be8acd709e
|
@ -132,16 +132,20 @@ table {
|
|||
thead th {
|
||||
@include heading;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
thead tr, tr:not(:last-child) {
|
||||
@include hline(10em, 1px, $primary-1, $primary-2, $primary-3)
|
||||
thead tr, {
|
||||
@include hline(10em, 2px, $primary-1, $primary-2, $primary-3)
|
||||
}
|
||||
|
||||
tr:not(:last-child) {
|
||||
border-bottom: 1px solid $primary-3;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 0.2em 0.5em;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ menu:
|
|||
|
||||
{{<video mp4=`/franconia_animated.mp4` webm=`/franconia_animated.webm` alt=`Ein Router in Form des Frankenrechens mit der Aufschrift "franconian.net" und einem "Fenster" in die Welt des rC3. Daran angeschlossen sind die Hackspaces backspace, Hackzogtum und Nerd2Nerd.`>}}
|
||||
|
||||
## cat content/*
|
||||
## Unsere Streams
|
||||
|
||||
{{<image src="https://thiscatdoesnotexist.com/" alt="Diese Katze gibt es nicht wirklich. Das Bild wurde maschinell erzeugt und ist ohne Unterschrift gültig.">}}
|
||||
* {{<external href="https://streaming.media.ccc.de/rc3/franconiannet">}}offizieller franconian.net-Stream via C3VOC{{</external>}}
|
||||
* [franconian.net Lounge]({{<ref "lounge">}}) (eigener Stream für unser nicht-CC Musikprogramm)
|
||||
|
|
|
@ -7,6 +7,7 @@ menu:
|
|||
|
||||
{{<video mp4=`/franconia_animated.mp4` webm=`/franconia_animated.webm` alt=`A router labelled "franconian.net" with a "window" to the world of rC3 and the hackspaces backspace, Hackzogtum, and Nerd2Nerd connected to it.`>}}
|
||||
|
||||
## cat content/*
|
||||
## Watch our streams here
|
||||
|
||||
{{<image src="https://thiscatdoesnotexist.com/" alt="This cat does not actually exist. The picture was created by an android who dreams of electric cats.">}}
|
||||
* {{<external href="https://streaming.media.ccc.de/rc3/franconiannet">}}official franconian.net channel via C3VOC{{</external>}}
|
||||
* [franconian.net Lounge]({{<ref "lounge">}}) (our own stream for non-CC music acts)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: cat content/*
|
||||
---
|
||||
|
||||
{{<image src="https://thiscatdoesnotexist.com/" alt="Diese Katze gibt es nicht wirklich. Das Bild wurde maschinell erzeugt und ist ohne Unterschrift gültig.">}}
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: cat content/*
|
||||
---
|
||||
|
||||
{{<image src="https://thiscatdoesnotexist.com/" alt="This cat does not actually exist. The picture was created by an android who dreams of electric cats.">}}
|
|
@ -1,23 +1,31 @@
|
|||
(() => {
|
||||
const scheduleUrl = 'https://schedule2.broken.equipment/everything.schedule.json';
|
||||
|
||||
let data = null;
|
||||
let textEl;
|
||||
let headline = '¯\\_(ツ)_/¯';
|
||||
let speaker = '';
|
||||
let headline = null;
|
||||
let speaker = null;
|
||||
let isIntro = false;
|
||||
let holdDuration = 4000;
|
||||
let room = null;
|
||||
let time = null;
|
||||
let startDelay = 1000;
|
||||
let gracePeriod = 5;
|
||||
|
||||
async function getCurrentTalkByRoomName(roomName) {
|
||||
let now = Date.now();
|
||||
async function getCurrentTalkByRoomName(roomName, offset) {
|
||||
if (!offset) {
|
||||
offset = 0;
|
||||
}
|
||||
let now = Date.now() + offset;
|
||||
if (time) {
|
||||
now = Date.parse(time)
|
||||
now = Date.parse(time) + offset;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
const response = await fetch(scheduleUrl);
|
||||
data = await response.json();
|
||||
}
|
||||
|
||||
const response = await fetch(scheduleUrl);
|
||||
const data = await response.json();
|
||||
const days = data.schedule.conference.days;
|
||||
const today = days.find(day => {
|
||||
const start = Date.parse(day.day_start);
|
||||
|
@ -85,14 +93,24 @@
|
|||
if (key === 'width') {
|
||||
root.style.setProperty('--width', value);
|
||||
}
|
||||
if (key === 'gracePeriod') {
|
||||
gracePeriod = parseInt(value, 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (room) {
|
||||
const talk = await getCurrentTalkByRoomName(room);
|
||||
let offset = gracePeriod * 60 * 1000;
|
||||
let talk = await getCurrentTalkByRoomName(room);
|
||||
if (!talk) {
|
||||
headline = '¯\\_(ツ)_/¯';
|
||||
speaker = '';
|
||||
talk = await getCurrentTalkByRoomName(room, -offset);
|
||||
}
|
||||
if (!talk) {
|
||||
talk = await getCurrentTalkByRoomName(room, offset);
|
||||
}
|
||||
if (!talk) {
|
||||
headline = null;
|
||||
speaker = null;
|
||||
} else {
|
||||
headline = talk.title;
|
||||
if (talk.persons) {
|
||||
|
@ -101,7 +119,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (speaker) {
|
||||
if (!headline) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (speaker && headline) {
|
||||
headline += ',';
|
||||
}
|
||||
|
||||
|
@ -110,18 +132,22 @@
|
|||
const speakerEl = document.createElement('span');
|
||||
speakerEl.classList.add('speaker');
|
||||
|
||||
Array.from(headline).forEach(letter => {
|
||||
const letterEl = document.createElement('span');
|
||||
letterEl.classList.add('letter');
|
||||
letterEl.innerText = letter;
|
||||
headlineEl.appendChild(letterEl);
|
||||
})
|
||||
Array.from(speaker).forEach(letter => {
|
||||
const letterEl = document.createElement('span');
|
||||
letterEl.classList.add('letter');
|
||||
letterEl.innerText = letter;
|
||||
speakerEl.appendChild(letterEl);
|
||||
})
|
||||
if (headline) {
|
||||
Array.from(headline).forEach(letter => {
|
||||
const letterEl = document.createElement('span');
|
||||
letterEl.classList.add('letter');
|
||||
letterEl.innerText = letter;
|
||||
headlineEl.appendChild(letterEl);
|
||||
})
|
||||
}
|
||||
if (speaker) {
|
||||
Array.from(speaker).forEach(letter => {
|
||||
const letterEl = document.createElement('span');
|
||||
letterEl.classList.add('letter');
|
||||
letterEl.innerText = letter;
|
||||
speakerEl.appendChild(letterEl);
|
||||
})
|
||||
}
|
||||
|
||||
textEl.appendChild(headlineEl);
|
||||
textEl.appendChild(document.createTextNode(' '));
|
||||
|
@ -149,6 +175,8 @@
|
|||
}
|
||||
secondaryTilesEl.appendChild(tile);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async function animate() {
|
||||
|
@ -256,8 +284,9 @@
|
|||
}
|
||||
|
||||
window.addEventListener('load', async () => {
|
||||
await init();
|
||||
await new Promise(r => setTimeout(r, startDelay));
|
||||
await animate();
|
||||
if (await init()) {
|
||||
await new Promise(r => setTimeout(r, startDelay));
|
||||
await animate();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue