Proper talk title display

This commit is contained in:
Ral 2021-12-27 21:58:23 +01:00
parent 316a9d05dd
commit 3b94bb3fc4
7 changed files with 42 additions and 15 deletions

View File

@ -4,7 +4,7 @@
<meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"> <meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>rC3 NOWHERE</title> <title>rC3 NOWHERE</title>
<link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css> <link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css>
<link rel=stylesheet href=https://infobeamer.montage2.de/hashtag.min.2aa7328190003e6cb7a17022ef4963477c4b84a66394cbf036577da543d0edad.css> <link rel=stylesheet href=https://infobeamer.montage2.de/hashtag.min.aba4dc9d7533f7bdf247773a3d7d6f4a14294b3831d7c5cf1ad28abe660fe0b4.css>
<script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script> <script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script>
</head> </head>
<body> <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/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/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/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.1f4bd9e53091d1e9aa0a2e38b82075141dd003a18a08823cf1808a2cb994bbe8.js integrity="sha256-H0vZ5TCR0emqCi44uCB1FB3QA6GKCII88YCKLLmUu+g=" type=module></script> <script src=https://infobeamer.montage2.de/main.26b1d4baa3f43353da48cd43f5172a32be15fd60774274e8daeddc774588a554.js integrity="sha256-JrHUuqP0M1PaSM1D9RcqMr4V/WB3QnTo2u3cd0WIpVQ=" type=module></script>
</body> </body>
</html> </html>

View File

@ -4,7 +4,7 @@
<meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"> <meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>rC3 NOWHERE</title> <title>rC3 NOWHERE</title>
<link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css> <link href=/fork-awesome/css/fork-awesome.min.css rel=stylesheet type=text/css>
<link rel=stylesheet href=https://infobeamer.montage2.de/main.min.b382673c86fa3dbd614dda558d4e4094904d954e4dd4d3d427e2af5f254dc968.css> <link rel=stylesheet href=https://infobeamer.montage2.de/main.min.8c46a60c4117ea24e891ed52e735a7bb23e66937736be164743ff786b2c836b2.css>
<script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script> <script src=https://infobeamer.montage2.de/js/config.0f4d0d28e4cf21f765f0b1911e185b73399aa76b4db102fc085df728a4e0c8fe.js integrity="sha256-D00NKOTPIfdl8LGRHhhbczmap2tNsQL8CF33KKTgyP4="></script>
</head> </head>
<body> <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/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/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/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.1f4bd9e53091d1e9aa0a2e38b82075141dd003a18a08823cf1808a2cb994bbe8.js integrity="sha256-H0vZ5TCR0emqCi44uCB1FB3QA6GKCII88YCKLLmUu+g=" type=module></script> <script src=https://infobeamer.montage2.de/main.26b1d4baa3f43353da48cd43f5172a32be15fd60774274e8daeddc774588a554.js integrity="sha256-JrHUuqP0M1PaSM1D9RcqMr4V/WB3QnTo2u3cd0WIpVQ=" type=module></script>
</body> </body>
</html> </html>

View File

@ -2,6 +2,7 @@
(() => { (() => {
// ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/services.js // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/services.js
var delay = 3 * 5 * 60 * 1e3; var delay = 3 * 5 * 60 * 1e3;
var hereRoom = "Chaos-West TV";
var postsLimit = 20; var postsLimit = 20;
var postMaxAge = 32 * 24 * 60 * 60 * 1e3; var postMaxAge = 32 * 24 * 60 * 60 * 1e3;
var defaultUrlSet = [ var defaultUrlSet = [
@ -105,7 +106,24 @@
let talksDataSorted = talksData.sort(byDate); let talksDataSorted = talksData.sort(byDate);
return talksDataSorted; return talksDataSorted;
}; };
var is_own_event = (event) => event.room === hereRoom;
var future_events = (schedule, now) => schedule.filter((e) => Date.parse(e.date) >= now - delay); var future_events = (schedule, now) => schedule.filter((e) => Date.parse(e.date) >= now - delay);
var running_event = (schedule, now) => {
const preDelay = 5 * 60 * 1e3;
const postDelay = 3 * 5 * 60 * 1e3;
let talk_duration = (durationString) => {
const timeFormat = "hh:mm";
let dt = moment(durationString, timeFormat);
let minutes = 60 * dt.hours() + dt.minutes();
return minutes * 60 * 1e3;
};
let is_running = (e) => {
let start = Date.parse(e.date);
let end = start + talk_duration(e.duration);
return start - preDelay <= now && now <= end + postDelay === true;
};
return schedule.filter(is_own_event).filter(is_running).slice(0, 1);
};
var same_music_track = (track1, track2) => track1.artist === track2.artist && track1.title === track2.title; var same_music_track = (track1, track2) => track1.artist === track2.artist && track1.title === track2.title;
var is_new_music = (musicA, musicB) => { var is_new_music = (musicA, musicB) => {
let isNewMusic; let isNewMusic;
@ -131,7 +149,7 @@
// ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js
var html = htm.bind(preact.h); var html = htm.bind(preact.h);
var hereRoom = "Chaos-West TV"; var hereRoom2 = "Chaos-West TV";
var number_events_all = 8; var number_events_all = 8;
var musicAge = 5 * 1e3; var musicAge = 5 * 1e3;
var urgent = 5 * 60 * 1e3; var urgent = 5 * 60 * 1e3;
@ -146,7 +164,7 @@
}; };
return lut[talk.day]; return lut[talk.day];
}; };
var is_own_talk = (talk) => talk.room === hereRoom; var is_own_talk = (talk) => talk.room === hereRoom2;
var talk_start_time = (talk) => Date.parse(talk.date); var talk_start_time = (talk) => Date.parse(talk.date);
var is_urgent = (talk, time) => { var is_urgent = (talk, time) => {
let timeDelta = talk_start_time(talk) - time; let timeDelta = talk_start_time(talk) - time;
@ -405,7 +423,14 @@
</div>`; </div>`;
return inner; return inner;
}; };
var hashtag_dom = () => { var hastag_talk_title_dom = (talk) => {
let inner = html`:`;
talk.forEach((t) => {
inner = html`<span><span class="text"> regarding the talk </span><span class="title">«${t.title}»</span>:</span>`;
});
return inner;
};
var hashtag_dom = (talk) => {
let inner = html` let inner = html`
<div class="hashtags short"> <div class="hashtags short">
<div class="box"> <div class="box">
@ -415,19 +440,20 @@
</div> </div>
<div class="hashtags extended from-obs"> <div class="hashtags extended from-obs">
<div class="box"> <div class="box">
<div class="header">For Questions:</div> <div class="header">For Questions${hastag_talk_title_dom(talk)}</div>
<div class="text">Please use the Hashtag <span class="hashtag">#rc3cwtv</span> on Twitter or Mastodon, or join our IRC channel <span class="irc">#rc3-cwtv</span>:irc.hackint.org</div> <div class="text">Please use the Hashtag <span class="hashtag">#rc3cwtv</span> on Twitter or Mastodon, or join our IRC channel <span class="irc">#rc3-cwtv</span>:irc.hackint.org</div>
</div> </div>
</div>`; </div>`;
return inner; return inner;
}; };
function update_main_slide(data, time) { function update_main_slide(data, time) {
let schedule = data.schedule; let schedule = data.futureSchedule;
let runningEvent = data.runningEvent;
let music = data.music; let music = data.music;
let postings = data.posts; let postings = data.posts;
let inner = html` let inner = html`
${schedule_dom(schedule, time)} ${schedule_dom(schedule, time)}
${hashtag_dom()} ${hashtag_dom(runningEvent)}
${music_playing_now_dom(music, time)} ${music_playing_now_dom(music, time)}
${social_container_dom(postings)} ${social_container_dom(postings)}
`; `;
@ -515,7 +541,8 @@
let realTime = new Date(); let realTime = new Date();
let now = Date.now() + fakeTimeDelta; let now = Date.now() + fakeTimeDelta;
update_main_slide({ update_main_slide({
schedule: future_events(scheduleData, now), futureSchedule: future_events(scheduleData, now),
runningEvent: running_event(scheduleData, now),
music: musicData, music: musicData,
posts: social_limiter(twitterData, mastodonData) posts: social_limiter(twitterData, mastodonData)
}, now); }, now);

View File

@ -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/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/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/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.1f4bd9e53091d1e9aa0a2e38b82075141dd003a18a08823cf1808a2cb994bbe8.js integrity="sha256-H0vZ5TCR0emqCi44uCB1FB3QA6GKCII88YCKLLmUu+g=" type=module></script> <script src=https://infobeamer.montage2.de/main.26b1d4baa3f43353da48cd43f5172a32be15fd60774274e8daeddc774588a554.js integrity="sha256-JrHUuqP0M1PaSM1D9RcqMr4V/WB3QnTo2u3cd0WIpVQ=" type=module></script>
</body> </body>
</html> </html>

View File

@ -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/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/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/js/htm/htm.80e39afe20fd61183412eda89efa10532d57945e6364642aceacd50eb2384b4b.js integrity="sha256-gOOa/iD9YRg0Eu2onvoQUy1XlF5jZGQqzqzVDrI4S0s="></script>
<script src=https://infobeamer.montage2.de/main.1f4bd9e53091d1e9aa0a2e38b82075141dd003a18a08823cf1808a2cb994bbe8.js integrity="sha256-H0vZ5TCR0emqCi44uCB1FB3QA6GKCII88YCKLLmUu+g=" type=module></script> <script src=https://infobeamer.montage2.de/main.26b1d4baa3f43353da48cd43f5172a32be15fd60774274e8daeddc774588a554.js integrity="sha256-JrHUuqP0M1PaSM1D9RcqMr4V/WB3QnTo2u3cd0WIpVQ=" type=module></script>
</body> </body>
</html> </html>