From e2f6bfb51d0743e3853e55135bc9f19c0f9fd9c9 Mon Sep 17 00:00:00 2001 From: Ral Date: Mon, 27 Dec 2021 16:11:53 +0100 Subject: [PATCH] New endpoints Available info endpoints: * / * /music/ * /hashtag/ * /music-and-posts/ --- ...7a9355010d66bbc4838dd06742d900708e6b1a.css | 1 + public/hashtag/index.html | 18 ++++++++++++++++ public/index.html | 2 +- public/js/generic_fetch_worker.js | 2 +- ...76aec3fd6761cf9309df4a74f2216e541cbed6.js} | 21 ++++++------------- public/music-and-posts/index.html | 18 ++++++++++++++++ ...20376fe1a7c32c8860803fb522145e46617d0.css} | 0 public/music/index.html | 4 ++-- ...c265dc2cec4620c03d3cdaa9242a6db1710099.css | 1 + 9 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 public/hashtag.min.f51cff1ba38414d9536af60c407a9355010d66bbc4838dd06742d900708e6b1a.css create mode 100644 public/hashtag/index.html rename public/{main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js => main.ec4847eb1a7e9db3e0ba4d4ccd76aec3fd6761cf9309df4a74f2216e541cbed6.js} (95%) create mode 100644 public/music-and-posts/index.html rename public/{main.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css => music.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css} (100%) create mode 100644 public/music_and_posts.min.20d57941e9d02defd0fe76dd43c265dc2cec4620c03d3cdaa9242a6db1710099.css diff --git a/public/hashtag.min.f51cff1ba38414d9536af60c407a9355010d66bbc4838dd06742d900708e6b1a.css b/public/hashtag.min.f51cff1ba38414d9536af60c407a9355010d66bbc4838dd06742d900708e6b1a.css new file mode 100644 index 0000000..de7a235 --- /dev/null +++ b/public/hashtag.min.f51cff1ba38414d9536af60c407a9355010d66bbc4838dd06742d900708e6b1a.css @@ -0,0 +1 @@ +@font-face{font-family:ibm plex mono;font-style:normal;font-weight:400;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-regular.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-regular.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:italic;font-weight:400;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-italic.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-italic.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:normal;font-weight:700;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:italic;font-weight:700;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700italic.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:100;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:100;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:200;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:200;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:300;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:300;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:400;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-regular.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-regular.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:400;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:500;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:500;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:600;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:600;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:700;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:700;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700italic.woff)format("woff")}*{box-sizing:border-box}body{color:#fff;background:#646464}#main{position:absolute;top:0;left:0}.slide{width:1920px;height:1080px;overflow:hidden}.hashtags{position:absolute;left:60px;bottom:195px;width:900px;height:140px;padding:20px 30px}.hashtags .box{padding-left:10px;background:linear-gradient(110deg,rgba(95,124,125,.6) 0%,rgba(33,106,99,.2) 85%,rgba(77,120,18,0) 100%);border-left:6px solid #98adb0;text-shadow:0 0 6px #000;padding-top:10px;font-family:ibm plex sans;font-weight:300;font-size:25px;white-space:nowrap}.hashtags .box .text{padding-bottom:5px;margin:0}.hashtags .box .text .hashtag,.hashtags .box .text .irc{font-weight:500}.hashtags .box .header{font-weight:600}.schedule{display:none}.bottom-bar{display:none}.music-box{display:none}.hashtags{position:absolute;left:60px;bottom:42px;width:900px;height:100px;padding:5px;background-color:rgba(0,0,0,.3);box-shadow:0 0 8px 8px rgba(0,0,0,.3)} \ No newline at end of file diff --git a/public/hashtag/index.html b/public/hashtag/index.html new file mode 100644 index 0000000..53764ca --- /dev/null +++ b/public/hashtag/index.html @@ -0,0 +1,18 @@ + + + + +rC3 NOWHERE + + + + + +
+
+ + + + + + \ No newline at end of file diff --git a/public/index.html b/public/index.html index ad334d3..2000fd4 100644 --- a/public/index.html +++ b/public/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/public/js/generic_fetch_worker.js b/public/js/generic_fetch_worker.js index 6db3eff..94874aa 100644 --- a/public/js/generic_fetch_worker.js +++ b/public/js/generic_fetch_worker.js @@ -6,7 +6,7 @@ let fetchURL; onmessage = function(e) { let msgType = e.data.msgType; - console.log("Configuration Message:"); + // console.log("Configuration Message:"); console.log(e.data); fetchType = e.data.fetchType; diff --git a/public/main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js b/public/main.ec4847eb1a7e9db3e0ba4d4ccd76aec3fd6761cf9309df4a74f2216e541cbed6.js similarity index 95% rename from public/main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js rename to public/main.ec4847eb1a7e9db3e0ba4d4ccd76aec3fd6761cf9309df4a74f2216e541cbed6.js index 1fce71e..4a3e513 100644 --- a/public/main.8966886766c73e23bb53a40fa0239b6ddb4f4acb8c9c08d717a644f4a82a2b8f.js +++ b/public/main.ec4847eb1a7e9db3e0ba4d4ccd76aec3fd6761cf9309df4a74f2216e541cbed6.js @@ -15,7 +15,6 @@ let recentPosts = posts.filter(maxAge); let byDate = (fst, snd) => Date.parse(fst.time) - Date.parse(snd.time); let postsSorted = recentPosts.sort(byDate); - console.log("Number distinct social posts in loop: " + postsSorted.length); if (postsSorted.length > 0) { while (postsSorted.length < postsLimit) { postsSorted = postsSorted.concat(postsSorted); @@ -333,6 +332,9 @@ }; var music_changed = (current, time) => time - current.since <= musicAge; var changed_music_class = (current, time) => music_changed(current, time) ? "changed" : ""; + var music_license_dom = (current) => current.license !== void 0 ? html`(${current.license})` : html``; + var music_title_dom = (current) => current.license !== void 0 ? html`«${current.title}»` : html``; + var music_artist_dom = (current) => current.license !== void 0 ? html`by${current.artist}` : html``; var music_playing_now_dom = (music, time) => { return html`
@@ -345,12 +347,11 @@ Now playing: - (${current.license}) + ${music_license_dom(current)}
- «${current.title}» - by - ${current.artist} + ${music_title_dom(current)} + ${music_artist_dom(current)}
`)} `; @@ -437,8 +438,6 @@ }); scheduleWorker.onmessage = function(e) { if (e.data.msgType === scheduleType) { - console.log("Data Message at " + Date()); - console.log(e.data); scheduleData = schedule_filter(e.data.json); update_screen(); } @@ -454,8 +453,6 @@ }); musicWorker.onmessage = function(e) { if (e.data.msgType === musicType) { - console.log("Data Message at " + Date()); - console.log(e.data); let musicDataUpdate = [e.data.json]; musicData = music_update(musicData, musicDataUpdate); update_screen(); @@ -472,8 +469,6 @@ }); twitterWorker.onmessage = function(e) { if (e.data.msgType === twitterType) { - console.log("Data Message at " + Date()); - console.log(e.data); twitterData = [e.data.json]; twitterData = twitter_filter(twitterData); update_screen(); @@ -490,8 +485,6 @@ }); mastodonWorker.onmessage = function(e) { if (e.data.msgType === mastodonType) { - console.log("Data Message at " + Date()); - console.log(e.data); mastodonData = [e.data.json]; mastodonData = mastodon_filter(mastodonData); update_screen(); @@ -503,9 +496,7 @@ var fakeTimeDelta = 0; function update_screen() { let realTime = new Date(); - console.log("Updating screen at at: " + realTime); let now = Date.now() + fakeTimeDelta; - console.log("Using 'now': " + now); update_main_slide({ schedule: future_events(scheduleData, now), music: musicData, diff --git a/public/music-and-posts/index.html b/public/music-and-posts/index.html new file mode 100644 index 0000000..1848a3a --- /dev/null +++ b/public/music-and-posts/index.html @@ -0,0 +1,18 @@ + + + + +rC3 NOWHERE + + + + + +
+
+ + + + + + \ No newline at end of file diff --git a/public/main.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css b/public/music.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css similarity index 100% rename from public/main.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css rename to public/music.min.87d29aa288b144e1e3f6a8fdd8a20376fe1a7c32c8860803fb522145e46617d0.css diff --git a/public/music/index.html b/public/music/index.html index cda1251..7f83f81 100644 --- a/public/music/index.html +++ b/public/music/index.html @@ -4,7 +4,7 @@ rC3 NOWHERE - + @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/public/music_and_posts.min.20d57941e9d02defd0fe76dd43c265dc2cec4620c03d3cdaa9242a6db1710099.css b/public/music_and_posts.min.20d57941e9d02defd0fe76dd43c265dc2cec4620c03d3cdaa9242a6db1710099.css new file mode 100644 index 0000000..d2492d2 --- /dev/null +++ b/public/music_and_posts.min.20d57941e9d02defd0fe76dd43c265dc2cec4620c03d3cdaa9242a6db1710099.css @@ -0,0 +1 @@ +@font-face{font-family:ibm plex mono;font-style:normal;font-weight:400;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-regular.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-regular.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:italic;font-weight:400;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-italic.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-italic.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:normal;font-weight:700;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700.woff)format("woff")}@font-face{font-family:ibm plex mono;font-style:italic;font-weight:700;src:url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700italic.woff2)format("woff2"),url(./fonts/ibm-plex-mono-v7-latin-ext_latin-700italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:100;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:100;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-100italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:200;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:200;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-200italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:300;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:300;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-300italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:400;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-regular.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-regular.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:400;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:500;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:500;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-500italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:600;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:600;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-600italic.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:normal;font-weight:700;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700.woff)format("woff")}@font-face{font-family:ibm plex sans;font-style:italic;font-weight:700;src:url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700italic.woff2)format("woff2"),url(./fonts/ibm-plex-sans-v9-latin-ext_latin-700italic.woff)format("woff")}*{box-sizing:border-box}body{color:#fff;background:#646464}#main{position:absolute;top:0;left:0}.slide{width:1920px;height:1080px;overflow:hidden}.music-box{position:absolute;bottom:140px;left:60px;width:860px;margin-left:20px;padding-left:10px;padding-top:5px;padding-right:10px;padding-bottom:5px;font-family:ibm plex sans;font-weight:300;font-size:25px;color:#eee}.music{padding-left:10px;background:linear-gradient(110deg,rgba(95,124,125,.6) 0%,rgba(33,106,99,.2) 85%,rgba(77,120,18,0) 100%);border-left:6px solid;animation-name:border-color-anim;animation-duration:6s;animation-direction:alternate;animation-iteration-count:infinite;animation-timing-function:ease-in-out;text-shadow:0 0 6px #000;white-space:nowrap;overflow:hidden}.note{animation-name:color-anim;animation-duration:6s;animation-direction:alternate;animation-iteration-count:infinite;animation-timing-function:ease-in-out}.music .line1{display:flex;justify-content:space-between}.music .line2{overflow:hidden;text-overflow:ellipsis;padding-bottom:5px}.music .header{font-weight:600;white-space:normal;margin-left:.5rem}.music .title{margin-left:20px}.music .artist{font-style:italic}.music .by{margin-left:15px;margin-right:12px;font-style:italic}.music .license{font-size:20px;color:#ccc}.music.changed .glyph{animation-name:wiggle-anim;animation-duration:.1s;animation-iteration-count:50;animation-direction:alternate;animation-timing-function:linear}.music.changed .license{animation-name:opacity-anim;animation-duration:3s;animation-iteration-count:1;animation-timing-function:easy-out}.music.changed .line2{animation-name:slidein-anim;animation-duration:3s;animation-iteration-count:1;animation-timing-function:easy-out}@keyframes color-anim{0%{color:#ccd7d8}50%{color:#98adb0}100%{color:#80bec8}}@keyframes border-color-anim{0%{border-color:#ccd7d8}50%{border-color:#98adb0}100%{border-color:#80bec8}}@keyframes wiggle-anim{0%{transform:rotate(10deg)}100%{transform:rotate(-10deg)}}@keyframes slidein-anim{0%{transform:translateX(800px);opacity:0}40%{opacity:.6}100%{transform:translateX(0);opacity:1}}@keyframes opacity-anim{0%{opacity:0}100%{opacity:1}}.bottom-bar{position:absolute;bottom:0;margin-bottom:8px;width:100%;height:90px;overflow:hidden;z-index:100}.ticker-wrap{width:100%;overflow:hidden}@keyframes switch-anim{0%{transform:translate3d(0%,0,0)}100%{transform:translate3d(-100%,0,0)}}@keyframes slide-anim{0%{transform:translate3d(0,100%,0)}10%{transform:translate3d(0,0%,0)}90%{transform:translate3d(0,0%,0)}100%{transform:translate3d(0,-100%,0)}}@keyframes fadeout-anim{0%{opacity:1}90%{opacity:1}100%{opacity:0}}.switcher{display:inline-block;white-space:nowrap;overflow:hidden;animation-name:switch-anim;animation-duration:200s;animation-iteration-count:infinite;animation-timing-function:steps(20)}.slider{display:inline-block;white-space:nowrap;animation-name:slide-anim,fadeout-anim;animation-duration:10s;animation-iteration-count:infinite;animation-timing-function:linear}.post{width:1920px;padding-left:90px;padding-right:60px;display:inline-block;white-space:nowrap;color:#fff;text-shadow:0 0 6px #000;font-family:ibm plex sans}.post .container{background:linear-gradient(5deg,rgba(95,124,125,.5) 0%,rgba(33,106,99,.4) 42%,rgba(77,120,18,0) 65%,rgba(77,120,18,0) 100%);white-space:nowrap;display:flex}.post .profile-image{height:72px;width:72px;margin-right:18px;vertical-align:middle}.post .meta{height:30px;padding-top:3px;font-size:18px;line-height:1.1}.post .source{padding-right:5px}.post .username{vertical-align:top;font-weight:500}.post .time{padding-left:35px;vertical-align:top}.post .text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-width:1680px;font-size:24px;vertical-align:bottom;padding-bottom:3px;line-height:1.2;word-break:break-word;line-break:normal;overflow:hidden;text-overflow:ellipsis;white-space:normal}.schedule{display:none}.hashtags{display:none}.music-box{background-color:rgba(0,0,0,.8);box-shadow:2px 2px 8px 8px rgba(0,0,0,.8)} \ No newline at end of file