diff --git a/docs/css/common.css b/docs/css/common.css index fdd04fa4..669b8329 100644 --- a/docs/css/common.css +++ b/docs/css/common.css @@ -682,6 +682,20 @@ main { margin-block-end: 0; } +.recap-live { + display: flex; + line-height: 1; + color: var(--brand-color); + font-size: clamp(3rem, 6vw, 5rem); + font-weight: 900; + text-align: center; + background-image: linear-gradient(35deg, var(--brand-color), var(--brand-color-alt)); + background-clip: text; + color: transparent; + margin-block: 1rem 2rem; +} + + @media only screen and (min-width: 768px) { .recap-site-header .recap-wrap { flex-direction: row-reverse; diff --git a/docs/css/modules/_agenda.css b/docs/css/modules/_agenda.css index 44da7766..43e28a6f 100644 --- a/docs/css/modules/_agenda.css +++ b/docs/css/modules/_agenda.css @@ -202,6 +202,42 @@ outline: none; } +.recap-agenda-slot-live { + font-weight: 600; + display: block; + margin-block-end: 1rem; + color: var(--brand-color-alt); +} + +.recap-agenda-slot-live { + -webkit-animation: color_change 1s infinite alternate; + -moz-animation: color_change 1s infinite alternate; + -ms-animation: color_change 1s infinite alternate; + -o-animation: color_change 1s infinite alternate; + animation: color_change 1s infinite alternate; +} + +@-webkit-keyframes color_change { + from { color: var(--brand-color-alt); } + to { color: var(--brand-color); } +} +@-moz-keyframes color_change { + from { color: var(--brand-color-alt); } + to { color: var(--brand-color); } +} +@-ms-keyframes color_change { + from { color: var(--brand-color-alt); } + to { color: var(--brand-color); } +} +@-o-keyframes color_change { + from { color: var(--brand-color-alt); } + to { color: var(--brand-color); } +} +@keyframes color_change { + from { color: var(--brand-color-alt); } + to { color: var(--brand-color); } +} + @media only screen and (min-width: 768px) { .recap-agenda-slot-info { gap: 1.5rem; diff --git a/docs/index.html b/docs/index.html index d7c13045..9d0d7198 100644 --- a/docs/index.html +++ b/docs/index.html @@ -50,7 +50,8 @@

Check our agenda, FAQ and app for more details!

-

+

WE ARE LIVE
+

Can't join us in person? No problem! Watch the conference online via our livestreams. Tune in and stay connected from anywhere!

@@ -353,12 +354,15 @@

Agenda

- -
  1. + + LIVE NOW +
    diff --git a/docs/js/main.js b/docs/js/main.js index cd37973b..781dadd9 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -1,5 +1,56 @@ 'use strict'; +var header = new Vue({ + el: "#header", + data() { + return { + showLive: false, + }; + }, + mounted() { + this.updateLiveSession(); + + let interval2; + let timeNow = new Date().toISOString(); + const confStartTime = new Date( + "2024-06-04T00:00:00.000+02:00" + ).toISOString(); + + const confEndTime = new Date("2024-06-04T18:00:00.000+02:00").toISOString(); + + if (timeNow >= confStartTime && timeNow <= confEndTime) { + interval2 = setInterval(() => { + timeNow = new Date().toISOString(); + if (timeNow > confEndTime) { + clearInterval(interval2); + return; + } + this.updateLiveSession(); + }, 30000); + } + + }, + methods: { + updateLiveSession() { + let timeNow = new Date().toISOString(); + + const confStartTime = new Date( + "2024-06-04T09:00:00.000+02:00" + ).toISOString(); + + const confEndTime = new Date( + "2024-06-04T18:00:00.000+02:00" + ).toISOString(); + + if (timeNow > confStartTime && timeNow <= confEndTime) { + this.showLive = true; + } else { + this.showLive = false; + } + }, + }, +}); + var main = new Vue({ el: "#main", data() { @@ -21,6 +72,31 @@ var main = new Vue({ this.lineup = response.data; this.formattedLineup = this.formatLineup(); }); + + this.updateLiveSession(); + + let interval; + + let timeNow = new Date().toISOString(); + + const startCounterTime = new Date( + "2024-06-04T00:00:00.000+02:00" + ).toISOString(); + + const endCounterTime = new Date( + "2024-06-04T18:10:00.000+02:00" + ).toISOString(); + + if (timeNow > startCounterTime && timeNow <= endCounterTime) { + interval = setInterval(() => { + timeNow = new Date().toISOString(); + if (timeNow > endCounterTime) { + clearInterval(interval); + return; + } + this.updateLiveSession(); + }, 30000); + } }, methods: { toggleAnswer(event) { @@ -240,6 +316,19 @@ var main = new Vue({ return "https://bsky.app/profile/" + handle.replace("@", ""); } }, + updateLiveSession() { + return this.formattedLineup.map((session) => { + let timeNow = new Date().toISOString(); + let sessionTimeStart = new Date(session.startTime).toISOString(); + let sessionTimeEnd = new Date(session.endTime).toISOString(); + + if (timeNow >= sessionTimeStart && timeNow < sessionTimeEnd) { + session.liveNow = true; + } else { + session.liveNow = false; + } + }); + }, }, filters: { trimTime: function (value) { @@ -265,7 +354,7 @@ var main = new Vue({ } else if (value.startsWith("w1") || value.startsWith("w2")) { return "Room W1 | W2"; } else if (value.startsWith("w3")) { - return "Room W3" + return "Room W3"; } else { return value; } @@ -279,7 +368,7 @@ var main = new Vue({ return "workshop"; } else if (value.startsWith("yoga")) { return "yoga"; - } else if (value.startsWith("lunch") || value.startsWith("food") ) { + } else if (value.startsWith("lunch") || value.startsWith("food")) { return "dining"; } else { return value;