Skip to content

Commit b87ff29

Browse files
authored
feat: schedule 2025 (#723)
1 parent 97c0988 commit b87ff29

File tree

4 files changed

+286
-14
lines changed

4 files changed

+286
-14
lines changed

index.html

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,276 @@
186186
</noscript>
187187
<div id="root"></div>
188188
<script type="module" src="/src/index.tsx"></script>
189+
<script>
190+
191+
//<![CDATA[
192+
"use strict";
193+
194+
function _toConsumableArray(n) {
195+
if (Array.isArray(n)) {
196+
for (var t = 0, i = Array(n.length); t < n.length; t++) i[t] = n[t];
197+
return i;
198+
}
199+
return Array.from(n);
200+
}
201+
202+
let _slicedToArray = function () {
203+
function n(n, t) {
204+
let r = [], u = !0, f = !1, e = undefined, i, o;
205+
try {
206+
for (i = n[Symbol.iterator](); !(u = (o = i.next()).done); u = !0) if (r.push(o.value), t && r.length === t) break;
207+
} catch (s) {
208+
f = !0;
209+
e = s;
210+
} finally {
211+
try {
212+
!u && i["return"] && i["return"]();
213+
} finally {
214+
if (f) throw e;
215+
}
216+
}
217+
return r;
218+
}
219+
220+
return function (t, i) {
221+
if (Array.isArray(t)) return t;
222+
if (Symbol.iterator in Object(t)) return n(t, i);
223+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
224+
};
225+
}(), sessionize;
226+
typeof sessionize == "undefined" && (sessionize = {});
227+
sessionize.showModal = function (n, t, i) {
228+
const r = document.getElementById("sz-modal-container"),
229+
u = new XMLHttpRequest;
230+
return r.innerHTML = "<div class=\"sz-modal-overlay\"><div class=\"sz-spinner\"><\/div><\/div>", r.classList.remove("is-hidden"), u.onreadystatechange = function () {
231+
let t, n;
232+
if (this.readyState === 4 && this.status === 200) {
233+
for (r.innerHTML = this.responseText, r.classList.remove("is-hidden"), t = document.getElementsByClassName("sz-modal__close-on-click"), n = 0; n < t.length; n++) t[n].onclick = function () {
234+
document.getElementById("sz-modal-container").classList.add("is-hidden");
235+
};
236+
sessionize.getLocalTimes();
237+
sessionize.manageActive();
238+
} else (this.status === 404 || this.status === 500) && r.classList.add("is-hidden");
239+
}, u.open("POST", "https://sessionize.com/api/v2/" + n + "/" + t + "?id=" + i, !0), u.send(), !1;
240+
};
241+
sessionize.initTabs = function () {
242+
let i = document.getElementsByClassName("sz-tab-container"), t, r, n;
243+
if (i.length > 1) {
244+
for (n = 0; n < i.length; n++) i[n].classList.remove("sz-tab-container--active");
245+
for (t = document.getElementsByClassName("sz-tabs__item"), t.length > 0 && (r = document.getElementsByClassName("sz-tabs__item--default"), r.length > 0 ? r[0].classList.add("sz-tabs__item--active") : t[0].classList.add("sz-tabs__item--active")), sessionize.tabChanged(), n = 0; n < t.length; n++) t[n].children[0].onclick = sessionize.tabChange;
246+
}
247+
};
248+
sessionize.tabChange = function (n) {
249+
for (var t, r, u = document.getElementsByClassName("sz-tabs__item"), i = 0; i < u.length; i++) u[i].classList.remove("sz-tabs__item--active");
250+
if (t = undefined, n instanceof Event) t = n.target.parentElement; else if (n && n.indexOf("#") === 0) {
251+
if (r = document.querySelector(".sz-tabs__link[href=\"" + n + "\"]"), !r) return console.error("Hash " + n + " is invalid. Run \"sessionize.help()\" in the console to get the list of valid hashes."), !1;
252+
t = r.parentElement;
253+
}
254+
return t.classList.add("sz-tabs__item--active"), sessionize.tabChanged(), !1;
255+
};
256+
sessionize.tabChanged = function () {
257+
let i = document.getElementsByClassName("sz-tabs__item--active"), t, n,
258+
r;
259+
if (i.length > 0) {
260+
for (t = document.getElementsByClassName("sz-tab-container"), n = 0; n < t.length; n++) t[n].classList.remove("sz-tab-container--active");
261+
r = i[0].children[0].href.split("#")[1];
262+
document.getElementById(r).classList.add("sz-tab-container--active");
263+
}
264+
};
265+
sessionize.help = function () {
266+
let i;
267+
let r;
268+
let n = [], e, y, t, d, u, it, f, et;
269+
n.push("---------------------");
270+
n.push("SESSIONIZE EMBED HELP");
271+
n.push("---------------------");
272+
n.push("");
273+
e = Array.prototype.slice.call(document.querySelectorAll(".sz-tabs__link[href]"));
274+
y = e.map(function (n) {
275+
return " " + n.hash + " = " + n.innerText;
276+
}).join("\n");
277+
n.push("DEFAULT GROUP SELECTION ON LOAD");
278+
n.push("Add hash to URL and preselect a tab:");
279+
e.length === 0 ? n.push(" (none available)") : n.push(y);
280+
n.push("");
281+
n.push("OPEN SESSION/SPEAKER MODAL ON LOAD (if modals are enabled)");
282+
n.push("Add hash to URL:");
283+
n.push(" #sz-session-<session_id> (e.g. #sz-session-12345)");
284+
n.push(" #sz-speaker-<speaker_guid> (e.g. #sz-speaker-00000000-1111-2222-3333-444444444444)");
285+
n.push("");
286+
const st = Array.prototype.slice.call(document.querySelectorAll(".sz-session__room")),
287+
p = st.map(function (n) {
288+
const t = "sz-room--" + n.dataset.roomid,
289+
i = document.querySelectorAll(".sz-room." + t).length > 0;
290+
return {tag: n.textContent, "class": t, hasHeader: i};
291+
}), ht = p.filter(function (n) {
292+
return n.hasHeader;
293+
}),
294+
ct = Array.prototype.slice.call(document.querySelectorAll(".sz-tag")),
295+
w = ct.map(function (n) {
296+
let t = "";
297+
return n.classList.forEach(function (n) {
298+
n !== "sz-tag" && n.lastIndexOf("sz-tag_", 0) === 0 && (t = n);
299+
}), {tag: n.textContent, "class": t};
300+
}),
301+
lt = [].concat(_toConsumableArray(new Set([].concat(_toConsumableArray(p), _toConsumableArray(w))))),
302+
o = {},
303+
s = {}, h = {};
304+
lt.sort(function (n, t) {
305+
return n["class"] > t["class"] ? 1 : -1;
306+
}).forEach(function (n) {
307+
o[n["class"]] = n.tag;
308+
});
309+
ht.sort(function (n, t) {
310+
return n["class"] > t["class"] ? 1 : -1;
311+
}).forEach(function (n) {
312+
s[n["class"]] = n.tag;
313+
});
314+
w.sort(function (n, t) {
315+
return n["class"] > t["class"] ? 1 : -1;
316+
}).forEach(function (n) {
317+
h[n["class"]] = n.tag;
318+
});
319+
n.push("SESSION STYLING");
320+
n.push("Style CSS classes to highlight sessions:");
321+
let c = !0, b = !1, k = undefined;
322+
try {
323+
for (t = Object.entries(o)[Symbol.iterator](); !(c = (d = t.next()).done); c = !0) {
324+
let g = _slicedToArray(d.value, 2);
325+
i = g[0];
326+
r = g[1];
327+
n.push(" #sessionize .sz-session." + i + " { /* style for " + r + " */ }");
328+
n.push(" #sessionize .sz-session." + i + " .sz-session__card { /* style for " + r + " for SMART GRID VIEW */ }");
329+
}
330+
} catch (l) {
331+
b = !0;
332+
k = l;
333+
} finally {
334+
try {
335+
!c && t["return"] && t["return"]();
336+
} finally {
337+
if (b) throw k;
338+
}
339+
}
340+
Object.keys(o).length === 0 && n.push(" (none available)");
341+
n.push("");
342+
n.push("ROOM HEADER STYLING");
343+
n.push("Style CSS classes to highlight room headers:");
344+
let a = !0, nt = !1, tt = undefined;
345+
try {
346+
for (u = Object.entries(s)[Symbol.iterator](); !(a = (it = u.next()).done); a = !0) {
347+
const rt = _slicedToArray(it.value, 2);
348+
i = rt[0];
349+
r = rt[1];
350+
n.push(" #sessionize .sz-cssgrid .sz-room." + i + " { /* style for " + r + " */ }");
351+
}
352+
} catch (l) {
353+
nt = !0;
354+
tt = l;
355+
} finally {
356+
try {
357+
!a && u["return"] && u["return"]();
358+
} finally {
359+
if (nt) throw tt;
360+
}
361+
}
362+
Object.keys(s).length === 0 && n.push(" (none available)");
363+
n.push("");
364+
n.push("CATEGORY STYLING");
365+
n.push("Style CSS classes to highlight categories:");
366+
let v = !0, ut = !1, ft = undefined;
367+
try {
368+
for (f = Object.entries(h)[Symbol.iterator](); !(v = (et = f.next()).done); v = !0) {
369+
var ot = _slicedToArray(et.value, 2);
370+
i = ot[0];
371+
r = ot[1];
372+
n.push(" #sessionize .sz-tag." + i + " { /* style for " + r + " */ }");
373+
}
374+
} catch (l) {
375+
ut = !0;
376+
ft = l;
377+
} finally {
378+
try {
379+
!v && f["return"] && f["return"]();
380+
} finally {
381+
if (ut) throw ft;
382+
}
383+
}
384+
Object.keys(h).length === 0 && n.push(" (none available)");
385+
n.push("");
386+
console.log(n.join("\n"));
387+
};
388+
sessionize.timeMode = "local";
389+
sessionize.getLocalTimes = function () {
390+
var u, f, n, t, i, r;
391+
try {
392+
u = Intl.DateTimeFormat().resolvedOptions().timeZone;
393+
sessionize.localCityName = u.split("/")[1].replace(new RegExp("_", "g"), " ");
394+
sessionize.localCityName === "Kiev" && (sessionize.localCityName = "Kyiv");
395+
} catch (e) {
396+
sessionize.showLocalTimezone = !1;
397+
}
398+
(f = document.getElementsByClassName("sz-timezone"), f.length > 1 && (console.error("Invalid number of .sz-timezone elements"), sessionize.showLocalTimezone = !1), sessionize.showLocalTimezone) && (n = document.querySelectorAll("[data-sztz]"), t = [], n.forEach(function (n) {
399+
t.includes(n.dataset.sztz) || t.push(n.dataset.sztz);
400+
n.style.opacity = 0;
401+
}), i = new XMLHttpRequest, r = new FormData, r.append("timezone", u), r.append("values", t), i.onreadystatechange = function () {
402+
if (this.readyState === 4 && this.status === 200) {
403+
var t = JSON.parse(this.responseText);
404+
sessionize.localTimezone = t.localTimezone;
405+
sessionize.hasDifferentTimes = !1;
406+
n.forEach(function (n) {
407+
n.dataset.sztzE = n.innerText;
408+
n.dataset.sztzL = t.values[n.dataset.sztz];
409+
n.style.opacity = 1;
410+
n.removeAttribute("data-sztz");
411+
n.dataset.sztzE !== n.dataset.sztzL && (sessionize.hasDifferentTimes = !0);
412+
});
413+
sessionize.hasDifferentTimes && (sessionize.showTimes(sessionize.timeMode), sessionize.eventCityName && sessionize.localCityName && document.querySelector(".sz-timezone") && (document.querySelector(".sz-timezone .sz-timezone__radio--local .sz-timezone__name").innerHTML = sessionize.localCityName, document.querySelector(".sz-timezone .sz-timezone__radio--local .sz-timezone__tooltip").innerHTML = sessionize.localTimezone, document.querySelector(".sz-timezone .sz-timezone__radio--local input[type=\"radio\"]").onchange = function () {
414+
sessionize.showTimes("local");
415+
}, document.querySelector(".sz-timezone .sz-timezone__radio--event .sz-timezone__name").innerHTML = sessionize.eventCityName, document.querySelector(".sz-timezone .sz-timezone__radio--event .sz-timezone__tooltip").innerHTML = sessionize.eventTimezone, document.querySelector(".sz-timezone .sz-timezone__radio--event input[type=\"radio\"]").onchange = function () {
416+
sessionize.showTimes("event");
417+
}, document.querySelector(".sz-timezone").style.display = ""));
418+
} else (this.status === 404 || this.status === 500) && n.forEach(function (n) {
419+
n.style.opacity = 1;
420+
});
421+
}, i.open("POST", "https://sessionize.com/api/v2/sztz", !0), i.send(r));
422+
};
423+
sessionize.showTimes = function (n) {
424+
var t;
425+
sessionize.timeMode = n;
426+
n === "event" ? (t = document.querySelectorAll("[data-sztz-e]"), t.forEach(function (n) {
427+
return n.innerText = n.dataset.sztzE;
428+
})) : n === "local" && (t = document.querySelectorAll("[data-sztz-l]"), t.forEach(function (n) {
429+
return n.innerText = n.dataset.sztzL;
430+
}));
431+
};
432+
sessionize.manageActive = function () {
433+
var n = document.querySelectorAll("[data-szactive]");
434+
n.forEach(function (n) {
435+
var t = n.dataset.szactive.split("|"), r = new Date(t[0]),
436+
u = new Date(t[1]), i = new Date;
437+
r <= i && i <= u ? n.classList.remove("is-disabled") : n.classList.add("is-disabled");
438+
});
439+
window.setTimeout(sessionize.manageActive, 2e4);
440+
};
441+
sessionize.onLoad = function () {
442+
var n;
443+
sessionize.initTabs();
444+
sessionize.getLocalTimes();
445+
sessionize.manageActive();
446+
window.location.hash && window.location.hash.lastIndexOf("#sz-tab-", 0) === 0 ? sessionize.tabChange(window.location.hash) : window.location.hash && window.location.hash.lastIndexOf("#sz-speaker-", 0) === 0 ? (n = window.location.hash.substr(12), sessionize.showModal("a2sw0wks", "speaker", n)) : window.location.hash && window.location.hash.lastIndexOf("#sz-session-", 0) === 0 && (n = window.location.hash.substr(12), sessionize.showModal("a2sw0wks", "session", n));
447+
sessionize.event && window.dispatchEvent(sessionize.event);
448+
};
449+
typeof Event == "function" && (sessionize.event = new Event("sessionize.onload"));
450+
typeof sessionize.loader == "undefined" && (window.onload = sessionize.onLoad);
451+
452+
sessionize.eventTimezone = "UTC+02";
453+
sessionize.eventCityName = "L&#39;Hospitalet de Llobregat";
454+
sessionize.showLocalTimezone = false;
455+
sessionize.todayId = 45068;
456+
457+
//]]>
458+
459+
</script>
189460
</body>
190461
</html>

src/components/Navigation/NavigationData.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
ROUTE_CODE_OF_CONDUCT,
55
ROUTE_HOME,
66
ROUTE_JOB_OFFERS,
7+
ROUTE_SCHEDULE,
78
ROUTE_SPEAKERS,
89
ROUTE_SPONSORSHIP,
910
ROUTE_TALKS,
@@ -20,7 +21,7 @@ export const navigationItems2025: NavigationItem[] = [
2021
{ id: "Home", link: ROUTE_HOME },
2122
{ id: "Code of Conduct", link: ROUTE_CODE_OF_CONDUCT },
2223
{ id: "Sponsors", link: "/#sponsors" },
23-
//{ id: "SCHEDULE", link: ROUTE_SCHEDULE },
24+
{ id: "SCHEDULE", link: ROUTE_SCHEDULE },
2425
{ id: "Talks", link: ROUTE_TALKS },
2526
{ id: "Workshops", link: ROUTE_WORKSHOPS },
2627
{ id: "JOB OFFERS", link: ROUTE_JOB_OFFERS },

src/data/2025.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"linkedin": "https://www.linkedin.com/company/devbcn",
2424
"schedule": {
25-
"enabled": false
25+
"enabled": true
2626
},
2727
"sessionizeUrl": "https://sessionize.com/api/v2/xhudniix",
2828
"showCountdown": true,

src/views/Schedule/Schedule.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
import { MOBILE_BREAKPOINT } from "../../constants/BreakPoints";
2-
import { Color } from "../../styles/colors";
1+
import { MOBILE_BREAKPOINT } from "@constants/BreakPoints";
2+
import { Color } from "@styles/colors";
33
import React, { FC } from "react";
4-
import LessThanBlueWhiteIcon from "../../assets/images/MoreThanBlueWhiteIcon.svg";
5-
import MoreThanBlueWhiteIcon from "../../assets/images/LessThanBlueWhiteIcon.svg";
6-
import SectionWrapper from "../../components/SectionWrapper/SectionWrapper";
7-
import TitleSection from "../../components/SectionTitle/TitleSection";
4+
import LessThanBlueWhiteIcon from "@assets/images/MoreThanBlueWhiteIcon.svg";
5+
import MoreThanBlueWhiteIcon from "@assets/images/LessThanBlueWhiteIcon.svg";
6+
import SectionWrapper from "@components/SectionWrapper/SectionWrapper";
7+
import TitleSection from "@components/SectionTitle/TitleSection";
88
import { useWindowSize } from "react-use";
9-
import data from "../../data/2024.json";
9+
import data from "@data/2025.json";
1010

1111
import * as Sentry from "@sentry/react";
1212
import { Link } from "react-router";
1313
import {
1414
StyledLessIcon,
1515
StyledMoreIcon,
1616
StyledScheduleSection,
17-
} from "../../styles/Schedule/Schedule.style";
18-
import { useDocumentTitleUpdater } from "../../hooks/useDocumentTitleUpdate";
17+
} from "@styles/Schedule/Schedule.style";
18+
import { useDocumentTitleUpdater } from "@hooks/useDocumentTitleUpdate";
1919

2020
const Schedule: FC<React.PropsWithChildren<unknown>> = () => {
2121
const { width } = useWindowSize();
2222

2323
React.useEffect(() => {
24-
fetch("https://sessionize.com/api/v2/w8mdb9k5/view/GridSmart")
24+
fetch("https://sessionize.com/api/v2/kdiixcgx/view/GridSmart")
2525
.then((value) => value.text())
2626
.then((value) => {
27-
const sched = document.getElementById("#schedule");
27+
const sched = document.getElementById("schedule");
2828
if (sched !== null) {
2929
sched.innerHTML = value;
3030
}
@@ -63,7 +63,7 @@ const Schedule: FC<React.PropsWithChildren<unknown>> = () => {
6363
>
6464
📅 See Live schedule
6565
</Link>
66-
<div style={{ width: "100%", margin: "0 auto" }} id="#schedule">
66+
<div style={{ width: "100%", margin: "0 auto" }} id="schedule">
6767
&nbsp;
6868
</div>
6969
</>

0 commit comments

Comments
 (0)