Infobeamer Update: RC0
This commit is contained in:
parent
ca971c34ad
commit
08a51b5758
|
@ -4,7 +4,7 @@
|
|||
<meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||
<title>rC3 NOWHERE</title>
|
||||
<link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css>
|
||||
<link rel=stylesheet href=https://infobeamer.montage2.de/main.min.d29234bc740f4e4567c76120e28afef36276a6fe9516761ce7cb4317be161113.css>
|
||||
<link rel=stylesheet href=https://infobeamer.montage2.de/main.min.818792ab7049f79cb65101e4c8c34d90986ecabe38b739d82ab5b7be19d1923e.css>
|
||||
<script src=https://infobeamer.montage2.de/js/config.fa1a162e62b8d5f3f40c8812d30b5289c5792ff26c0843426d8c109a00621389.js integrity="sha256-+hoWLmK41fP0DIgS0wtSicV5L/JsCENCbYwQmgBiE4k="></script>
|
||||
</head>
|
||||
<body>
|
||||
|
@ -13,6 +13,6 @@
|
|||
<script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script>
|
||||
<script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script>
|
||||
<script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
|
||||
<script src=https://infobeamer.montage2.de/main.d2de05d8f07febd8a32436fd867b559f405cd7bd633a5a2d52981fc30152512c.js integrity="sha256-0t4F2PB/69ijJDb9hntVn0Bc171jOlotUpgfwwFSUSw=" type=module></script>
|
||||
<script src=https://infobeamer.montage2.de/main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js integrity="sha256-ORKBGvs4uapcmslYdcOdO33zASxQnoNzTi72rTE9KiE=" type=module></script>
|
||||
</body>
|
||||
</html>
|
|
@ -100,16 +100,18 @@
|
|||
}
|
||||
return !isSame;
|
||||
};
|
||||
var music_filter = (musicA, musicB) => {
|
||||
var music_update = (musicA, musicB) => {
|
||||
let isNew = is_new_music(musicA, musicB);
|
||||
console.log("New music? " + isNew);
|
||||
musicB.forEach((m) => m.updated = isNew);
|
||||
if (isNew === true) {
|
||||
musicB.forEach((m) => m.since = Date.now());
|
||||
}
|
||||
return musicB;
|
||||
};
|
||||
|
||||
// ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js
|
||||
var html = htm.bind(preact.h);
|
||||
var here_room = "Chaos-West TV";
|
||||
var musicAge = 5 * 1e3;
|
||||
var urgency = 5 * 60 * 1e3;
|
||||
var is_own_talk = (talk) => talk.room === here_room;
|
||||
var is_urgent = (talk, time) => {
|
||||
|
@ -250,16 +252,17 @@
|
|||
</div>`;
|
||||
return inner;
|
||||
};
|
||||
var changed_music_class = (current) => current.updated ? "changed" : "";
|
||||
var music_playing_now_dom = (music) => {
|
||||
var music_changed = (current, time) => time - current.since <= musicAge;
|
||||
var changed_music_class = (current, time) => music_changed(current, time) ? "changed" : "";
|
||||
var music_playing_now_dom = (music, time) => {
|
||||
let inner = html`
|
||||
<div class="music-box">
|
||||
<div class="music">
|
||||
${music.map((current) => html`
|
||||
<div class="music ${changed_music_class(current, time)}">
|
||||
<div class="line1">
|
||||
<span>
|
||||
<span class="note">
|
||||
<span class="fa fa-music ${changed_music_class(current)}"></span>
|
||||
<span class="fa fa-music glyph"></span>
|
||||
</span>
|
||||
<span class="header">Now playing:</span>
|
||||
</span>
|
||||
|
@ -269,8 +272,8 @@
|
|||
<span class="title">«${current.title}»</span>
|
||||
<span class="by">by</span>
|
||||
<span class="artist">${current.artist}</span>
|
||||
</div>`)}
|
||||
</div>
|
||||
</div>`)}
|
||||
</div>`;
|
||||
return inner;
|
||||
};
|
||||
|
@ -328,7 +331,7 @@
|
|||
let postings = data.posts;
|
||||
let scheduleDom = schedule_dom(schedule, time);
|
||||
let hashtagDom = hashtag_dom();
|
||||
let musicDom = music_playing_now_dom(music);
|
||||
let musicDom = music_playing_now_dom(music, time);
|
||||
let postingsDom = social_container_dom(postings);
|
||||
let inner = html`
|
||||
${scheduleDom}
|
||||
|
@ -380,7 +383,7 @@
|
|||
console.log("Data Message at " + Date());
|
||||
console.log(e.data);
|
||||
let musicDataUpdate = [e.data.json];
|
||||
musicData = music_filter(musicData, musicDataUpdate);
|
||||
musicData = music_update(musicData, musicDataUpdate);
|
||||
update_screen();
|
||||
}
|
||||
};
|
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,6 @@
|
|||
<script src=https://infobeamer.montage2.de/js/moment/moment.min.73de4254959530e4d1d9bec586379184f96b4953dacf9cd5e5e2bdd7bfeceef7.js integrity="sha256-c95CVJWVMOTR2b7FhjeRhPlrSVPaz5zV5eK917/s7vc="></script>
|
||||
<script src=https://infobeamer.montage2.de/js/preact/preact.min.0c204e20934f1e09cfe86fbcf1d069d842f988fc71efe3a923021c08892c71c8.js integrity="sha256-DCBOIJNPHgnP6G+88dBp2EL5iPxx7+OpIwIcCIksccg="></script>
|
||||
<script src=https://infobeamer.montage2.de/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
|
||||
<script src=https://infobeamer.montage2.de/main.d2de05d8f07febd8a32436fd867b559f405cd7bd633a5a2d52981fc30152512c.js integrity="sha256-0t4F2PB/69ijJDb9hntVn0Bc171jOlotUpgfwwFSUSw=" type=module></script>
|
||||
<script src=https://infobeamer.montage2.de/main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js integrity="sha256-ORKBGvs4uapcmslYdcOdO33zASxQnoNzTi72rTE9KiE=" type=module></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue