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 {
|
thead th {
|
||||||
@include heading;
|
@include heading;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
thead tr, tr:not(:last-child) {
|
thead tr, {
|
||||||
@include hline(10em, 1px, $primary-1, $primary-2, $primary-3)
|
@include hline(10em, 2px, $primary-1, $primary-2, $primary-3)
|
||||||
|
}
|
||||||
|
|
||||||
|
tr:not(:last-child) {
|
||||||
|
border-bottom: 1px solid $primary-3;
|
||||||
}
|
}
|
||||||
|
|
||||||
td, th {
|
td, th {
|
||||||
padding: 0.2em 0.5em;
|
padding: 0.2em 0.5em;
|
||||||
text-align: left;
|
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.`>}}
|
{{<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.`>}}
|
{{<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';
|
const scheduleUrl = 'https://schedule2.broken.equipment/everything.schedule.json';
|
||||||
|
|
||||||
|
let data = null;
|
||||||
let textEl;
|
let textEl;
|
||||||
let headline = '¯\\_(ツ)_/¯';
|
let headline = null;
|
||||||
let speaker = '';
|
let speaker = null;
|
||||||
let isIntro = false;
|
let isIntro = false;
|
||||||
let holdDuration = 4000;
|
let holdDuration = 4000;
|
||||||
let room = null;
|
let room = null;
|
||||||
let time = null;
|
let time = null;
|
||||||
let startDelay = 1000;
|
let startDelay = 1000;
|
||||||
|
let gracePeriod = 5;
|
||||||
|
|
||||||
async function getCurrentTalkByRoomName(roomName) {
|
async function getCurrentTalkByRoomName(roomName, offset) {
|
||||||
let now = Date.now();
|
if (!offset) {
|
||||||
|
offset = 0;
|
||||||
|
}
|
||||||
|
let now = Date.now() + offset;
|
||||||
if (time) {
|
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 days = data.schedule.conference.days;
|
||||||
const today = days.find(day => {
|
const today = days.find(day => {
|
||||||
const start = Date.parse(day.day_start);
|
const start = Date.parse(day.day_start);
|
||||||
|
@ -85,14 +93,24 @@
|
||||||
if (key === 'width') {
|
if (key === 'width') {
|
||||||
root.style.setProperty('--width', value);
|
root.style.setProperty('--width', value);
|
||||||
}
|
}
|
||||||
|
if (key === 'gracePeriod') {
|
||||||
|
gracePeriod = parseInt(value, 10)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (room) {
|
if (room) {
|
||||||
const talk = await getCurrentTalkByRoomName(room);
|
let offset = gracePeriod * 60 * 1000;
|
||||||
|
let talk = await getCurrentTalkByRoomName(room);
|
||||||
if (!talk) {
|
if (!talk) {
|
||||||
headline = '¯\\_(ツ)_/¯';
|
talk = await getCurrentTalkByRoomName(room, -offset);
|
||||||
speaker = '';
|
}
|
||||||
|
if (!talk) {
|
||||||
|
talk = await getCurrentTalkByRoomName(room, offset);
|
||||||
|
}
|
||||||
|
if (!talk) {
|
||||||
|
headline = null;
|
||||||
|
speaker = null;
|
||||||
} else {
|
} else {
|
||||||
headline = talk.title;
|
headline = talk.title;
|
||||||
if (talk.persons) {
|
if (talk.persons) {
|
||||||
|
@ -101,7 +119,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (speaker) {
|
if (!headline) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (speaker && headline) {
|
||||||
headline += ',';
|
headline += ',';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,18 +132,22 @@
|
||||||
const speakerEl = document.createElement('span');
|
const speakerEl = document.createElement('span');
|
||||||
speakerEl.classList.add('speaker');
|
speakerEl.classList.add('speaker');
|
||||||
|
|
||||||
Array.from(headline).forEach(letter => {
|
if (headline) {
|
||||||
const letterEl = document.createElement('span');
|
Array.from(headline).forEach(letter => {
|
||||||
letterEl.classList.add('letter');
|
const letterEl = document.createElement('span');
|
||||||
letterEl.innerText = letter;
|
letterEl.classList.add('letter');
|
||||||
headlineEl.appendChild(letterEl);
|
letterEl.innerText = letter;
|
||||||
})
|
headlineEl.appendChild(letterEl);
|
||||||
Array.from(speaker).forEach(letter => {
|
})
|
||||||
const letterEl = document.createElement('span');
|
}
|
||||||
letterEl.classList.add('letter');
|
if (speaker) {
|
||||||
letterEl.innerText = letter;
|
Array.from(speaker).forEach(letter => {
|
||||||
speakerEl.appendChild(letterEl);
|
const letterEl = document.createElement('span');
|
||||||
})
|
letterEl.classList.add('letter');
|
||||||
|
letterEl.innerText = letter;
|
||||||
|
speakerEl.appendChild(letterEl);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
textEl.appendChild(headlineEl);
|
textEl.appendChild(headlineEl);
|
||||||
textEl.appendChild(document.createTextNode(' '));
|
textEl.appendChild(document.createTextNode(' '));
|
||||||
|
@ -149,6 +175,8 @@
|
||||||
}
|
}
|
||||||
secondaryTilesEl.appendChild(tile);
|
secondaryTilesEl.appendChild(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function animate() {
|
async function animate() {
|
||||||
|
@ -256,8 +284,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('load', async () => {
|
window.addEventListener('load', async () => {
|
||||||
await init();
|
if (await init()) {
|
||||||
await new Promise(r => setTimeout(r, startDelay));
|
await new Promise(r => setTimeout(r, startDelay));
|
||||||
await animate();
|
await animate();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue