prettier
This commit is contained in:
rodič
39f485e594
revize
5c03eb02cc
|
@ -115,7 +115,11 @@
|
|||
|
||||
{#if size === "small"}
|
||||
<div class="w-16 h-16 text-center">
|
||||
<img src={currentImg} class="w-16 h-16 rounded-full m-auto" alt={speaker.name} />
|
||||
<img
|
||||
src={currentImg}
|
||||
class="w-16 h-16 rounded-full m-auto"
|
||||
alt={speaker.name}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import Tooltip from "$lib/Tooltip.svelte";
|
||||
import SvelteMarkdown from "svelte-markdown";
|
||||
import EventTypeLabel from "$lib/EventTypeLabel.svelte";
|
||||
import EventSchedule from '$lib/EventSchedule.svelte';
|
||||
import EventSchedule from "$lib/EventSchedule.svelte";
|
||||
import { bundle, userData } from "$lib/stores.js";
|
||||
import { calcDuration, addFavorite } from "$lib/events.js";
|
||||
|
||||
|
@ -15,7 +15,9 @@
|
|||
$: e = event;
|
||||
$: duration = calcDuration(e, $bundle);
|
||||
$: spoiler = makeSpoiler(e);
|
||||
$: schedule = $bundle ? $bundle.spec.schedule.find(s => s.event === e.id) : null
|
||||
$: schedule = $bundle
|
||||
? $bundle.spec.schedule.find((s) => s.event === e.id)
|
||||
: null;
|
||||
|
||||
function makeSpoiler(_e) {
|
||||
if (!_e.description) {
|
||||
|
|
|
@ -6,9 +6,14 @@
|
|||
export let e;
|
||||
export let bundle;
|
||||
|
||||
$: stage = bundle ? bundle.spec.stages.find(s => s.id === item.stage) : null
|
||||
const start = new Date(item.period.start)
|
||||
const end = new Date(item.period.end)
|
||||
$: stage = bundle
|
||||
? bundle.spec.stages.find((s) => s.id === item.stage)
|
||||
: null;
|
||||
const start = new Date(item.period.start);
|
||||
const end = new Date(item.period.end);
|
||||
</script>
|
||||
|
||||
<div class="font-semibold">{format(start, 'yyyy-MM-dd') === '2022-06-04' ? 'SO' : 'NE'} {format(start, 'HH:mm')}-{format(end, 'HH:mm')} ({stage ? stage.name : 'n/a'})</div>
|
||||
<div class="font-semibold">
|
||||
{format(start, "yyyy-MM-dd") === "2022-06-04" ? "SO" : "NE"}
|
||||
{format(start, "HH:mm")}-{format(end, "HH:mm")} ({stage ? stage.name : "n/a"})
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
export let size = null;
|
||||
export let black = false;
|
||||
|
||||
const textColor = black ? 'text-black' : 'text-white'
|
||||
const textColor = black ? "text-black" : "text-white";
|
||||
|
||||
const config = {
|
||||
panel: { title: "Panelová debata", style: "bg-orange-400" },
|
||||
|
@ -21,7 +21,11 @@
|
|||
$: current = config[event.type];
|
||||
</script>
|
||||
|
||||
<div class="inline-block {size === 'big' ? 'h-6 text-sm' : 'h-5 text-xs'} font-normal">
|
||||
<div
|
||||
class="inline-block {size === 'big'
|
||||
? 'h-6 text-sm'
|
||||
: 'h-5 text-xs'} font-normal"
|
||||
>
|
||||
<div
|
||||
class="{size === 'big'
|
||||
? 'px-2 py-0.5'
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import YoutubePlayer from 'youtube-player';
|
||||
import { onMount } from "svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import YoutubePlayer from "youtube-player";
|
||||
|
||||
export { className as class }; // HTML class names for container element (optional)
|
||||
export let id = undefined; // HTML element ID for player (optional)
|
||||
|
@ -38,11 +38,11 @@
|
|||
player = YoutubePlayer(playerElem, options);
|
||||
|
||||
// Register event handlers
|
||||
player.on('ready', onPlayerReady);
|
||||
player.on('error', onPlayerError);
|
||||
player.on('stateChange', onPlayerStateChange);
|
||||
player.on('playbackRateChange', onPlayerPlaybackRateChange);
|
||||
player.on('playbackQualityChange', onPlayerPlaybackQualityChange);
|
||||
player.on("ready", onPlayerReady);
|
||||
player.on("error", onPlayerError);
|
||||
player.on("stateChange", onPlayerStateChange);
|
||||
player.on("playbackRateChange", onPlayerPlaybackRateChange);
|
||||
player.on("playbackQualityChange", onPlayerPlaybackQualityChange);
|
||||
|
||||
// Tear down player when done
|
||||
return () => player.destroy();
|
||||
|
@ -73,7 +73,7 @@
|
|||
* @param {Object} target - player object
|
||||
*/
|
||||
function onPlayerReady(event) {
|
||||
dispatch('ready', event);
|
||||
dispatch("ready", event);
|
||||
|
||||
// Start playing
|
||||
play(videoId);
|
||||
|
@ -87,7 +87,7 @@
|
|||
* @param {Object} target - player object
|
||||
*/
|
||||
function onPlayerError(event) {
|
||||
dispatch('error', event);
|
||||
dispatch("error", event);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,19 +98,19 @@
|
|||
* @param {Object} target - actual YT player
|
||||
*/
|
||||
function onPlayerStateChange(event) {
|
||||
dispatch('stateChange', event)
|
||||
dispatch("stateChange", event);
|
||||
|
||||
switch (event.data) {
|
||||
case PlayerState.ENDED:
|
||||
dispatch('end', event);
|
||||
dispatch("end", event);
|
||||
break;
|
||||
|
||||
case PlayerState.PLAYING:
|
||||
dispatch('play', event);
|
||||
dispatch("play", event);
|
||||
break;
|
||||
|
||||
case PlayerState.PAUSED:
|
||||
dispatch('pause', event);
|
||||
dispatch("pause", event);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -125,7 +125,7 @@
|
|||
* @param {Object} target - actual YT player
|
||||
*/
|
||||
function onPlayerPlaybackRateChange(event) {
|
||||
dispatch('playbackRateChange', event);
|
||||
dispatch("playbackRateChange", event);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,10 +136,10 @@
|
|||
* @param {Object} target - actual YT player
|
||||
*/
|
||||
function onPlayerPlaybackQualityChange(event) {
|
||||
dispatch('playbackQualityChange', event);
|
||||
dispatch("playbackQualityChange", event);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class={className}>
|
||||
<div id={id} bind:this={playerElem}></div>
|
||||
<div {id} bind:this={playerElem} />
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
</script>
|
||||
|
||||
<header
|
||||
class="relative bg-center bg-cover {$page.url.pathname !== '/tv' ? "bg-[url('/img/bg-header.jpg')]" : ''} bg-no-repeat bg-blue-web-bg print:hidden"
|
||||
class="relative bg-center bg-cover {$page.url.pathname !== '/tv'
|
||||
? "bg-[url('/img/bg-header.jpg')]"
|
||||
: ''} bg-no-repeat bg-blue-web-bg print:hidden"
|
||||
>
|
||||
<!-- <li class:active={$page.url.pathname === '/'}><a sveltekit:prefetch href="/">Home</a></li> -->
|
||||
<div>
|
||||
|
@ -36,7 +38,7 @@
|
|||
>
|
||||
</div>
|
||||
</div>
|
||||
{:else if $page.url.pathname === '/tv'}
|
||||
{:else if $page.url.pathname === "/tv"}
|
||||
<div
|
||||
class="block justify-start lg:flex-1 my-auto text-center pb-3 lg:pb-0 pt-3 lg:pt-0"
|
||||
>
|
||||
|
@ -56,7 +58,7 @@
|
|||
<div
|
||||
class="flex lg:space-x-10 uppercase text-sm font-bold text-white flex-wrap gap-3"
|
||||
>
|
||||
{#if $page.url.pathname === '/tv'}
|
||||
{#if $page.url.pathname === "/tv"}
|
||||
<a
|
||||
sveltekit:prefetch
|
||||
href="/"
|
||||
|
@ -71,7 +73,7 @@
|
|||
class:text-blue-400={$page.url.pathname === "/"}>Úvod</a
|
||||
>
|
||||
{/if}
|
||||
{#if $page.url.pathname !== '/tv'}
|
||||
{#if $page.url.pathname !== "/tv"}
|
||||
<!--a
|
||||
sveltekit:prefetch
|
||||
href="/tv"
|
||||
|
@ -85,7 +87,7 @@
|
|||
class="m-auto hover:text-[#E16A61]"
|
||||
class:text-blue-400={$page.url.pathname === "/program"}>Program</a
|
||||
>
|
||||
{#if $page.url.pathname !== '/tv'}
|
||||
{#if $page.url.pathname !== "/tv"}
|
||||
<!--a
|
||||
sveltekit:prefetch
|
||||
href="/mapa"
|
||||
|
@ -112,7 +114,7 @@
|
|||
>
|
||||
{/if}
|
||||
</div>
|
||||
{#if $page.url.pathname === '/'}
|
||||
{#if $page.url.pathname === "/"}
|
||||
<div
|
||||
class="hidden lg:block my-auto lg:flex-1 lg:pt-0 pt-4 lg:justify-end justify-center"
|
||||
>
|
||||
|
@ -128,7 +130,9 @@
|
|||
class="relative mx-auto lg:px-6 px-4 pt-4 sm:pt-6 sm:pb-6 pb-2 max-w-6xl text-left text-white"
|
||||
>
|
||||
<div class="pl-2 sm:pl-6 lg:pl-10">
|
||||
<div class="uppercase font-semibold text-md lg:text-lg lg:w-1/3 text-white/70">
|
||||
<div
|
||||
class="uppercase font-semibold text-md lg:text-lg lg:w-1/3 text-white/70"
|
||||
>
|
||||
Otevřená komunitní kryptoměnová konference
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
|
|
|
@ -135,11 +135,14 @@
|
|||
}
|
||||
|
||||
function activeStages(bundle, stages, day, pl) {
|
||||
return stages.filter(stage => {
|
||||
const dt = format(new Date(day), 'yyyy-MM-dd')
|
||||
return Boolean(pl.schedule.filter(i => i.stage === stage.id).find(i => i.date === dt)
|
||||
)
|
||||
})
|
||||
return stages.filter((stage) => {
|
||||
const dt = format(new Date(day), "yyyy-MM-dd");
|
||||
return Boolean(
|
||||
pl.schedule
|
||||
.filter((i) => i.stage === stage.id)
|
||||
.find((i) => i.date === dt)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function findEvent(bundle, eventId) {
|
||||
|
@ -188,7 +191,12 @@
|
|||
>
|
||||
{#each $bundle.spec["schedule-candidates"] as p, i}
|
||||
<option value={i}
|
||||
>#{i} [{["score", "thc:themeCrossing", "tgc:tagsCrossing", "exd:exclusivityDev"]
|
||||
>#{i} [{[
|
||||
"score",
|
||||
"thc:themeCrossing",
|
||||
"tgc:tagsCrossing",
|
||||
"exd:exclusivityDev",
|
||||
]
|
||||
.map((key) => {
|
||||
const [title, rkey] = key.split(":");
|
||||
return `${title}:${
|
||||
|
@ -281,8 +289,13 @@
|
|||
<th class="xl:w-16" />
|
||||
{#each activeStages($bundle, $bundle.spec.stages, st.date, plan) as stage}
|
||||
{#if $schedulePref && $schedulePref.stages.includes(stage.id)}
|
||||
<th class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom">
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">{stage.capacity.seat} <i class="fa-solid fa-chair"></i> + {stage.capacity.stand} <i class="fa-solid fa-person"></div>
|
||||
<th
|
||||
class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom"
|
||||
>
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">
|
||||
{stage.capacity.seat} <i class="fa-solid fa-chair" /> + {stage
|
||||
.capacity.stand} <i class="fa-solid fa-person" />
|
||||
</div>
|
||||
<div>{stage.name}</div>
|
||||
</th>
|
||||
{/if}
|
||||
|
@ -317,7 +330,8 @@
|
|||
{format(
|
||||
new Date(si.period.start),
|
||||
"HH:mm"
|
||||
)}-{format(new Date(si.period.end), "HH:mm")} <span class="opacity-70">@{si.id}</span>
|
||||
)}-{format(new Date(si.period.end), "HH:mm")}
|
||||
<span class="opacity-70">@{si.id}</span>
|
||||
{#if event.track}[{#each [$bundle.spec.tracks.find((t) => t.id === event.track)] as track}{track.shortname ||
|
||||
track.name}{/each}]{/if}
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,5 @@
|
|||
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
||||
<h1 class="uppercase text-2xl font-bold">Mapa</h1>
|
||||
|
||||
<div class="mt-6">
|
||||
TBA
|
||||
</div>
|
||||
<div class="mt-6">TBA</div>
|
||||
</section>
|
||||
|
|
|
@ -18,9 +18,13 @@
|
|||
<h1 class="uppercase text-2xl font-bold">Praktické informace</h1>
|
||||
|
||||
{#if bundle}
|
||||
{#each $bundle.spec['practical-info'] as item}
|
||||
{#each $bundle.spec["practical-info"] as item}
|
||||
<div class="mt-8">
|
||||
<div><a id={item.id} href="#{item.id}"><h2 class="text-xl uppercase font-bold">{item.name}</h2></div>
|
||||
<div>
|
||||
<a id={item.id} href="#{item.id}"
|
||||
><h2 class="text-xl uppercase font-bold">{item.name}</h2></a
|
||||
>
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<SvelteMarkdown source={item.text} {renderers} />
|
||||
</div>
|
||||
|
|
|
@ -9,90 +9,98 @@
|
|||
import { format, compareAsc, compareDesc } from "date-fns";
|
||||
import { bundle, userData, loadInfo, schedulePref } from "$lib/stores.js";
|
||||
import { cs } from "date-fns/locale/index.js";
|
||||
import { parsePeriod } from '$lib/periods.js';
|
||||
import { parsePeriod } from "$lib/periods.js";
|
||||
import SvelteMarkdown from "svelte-markdown";
|
||||
const renderers = { link: Link };
|
||||
import Link from "$lib/Link.svelte";
|
||||
|
||||
let scheduleTimesArr = null
|
||||
let stagesArr = null
|
||||
let scheduleTimesArr = null;
|
||||
let stagesArr = null;
|
||||
|
||||
let planNumber = 0;
|
||||
$: plan = $bundle ? $bundle.spec["schedule-candidates"][planNumber] : null;
|
||||
|
||||
const params = {
|
||||
time: { key: 'time' },
|
||||
stage: { key: 'stage' },
|
||||
desc: { key: 'showDescriptions', type: 'boolean' }
|
||||
}
|
||||
time: { key: "time" },
|
||||
stage: { key: "stage" },
|
||||
desc: { key: "showDescriptions", type: "boolean" },
|
||||
};
|
||||
|
||||
let subs = [];
|
||||
|
||||
let subs = []
|
||||
|
||||
subs.push(page.subscribe(() => {
|
||||
|
||||
schedulePref.update(sp => {
|
||||
subs.push(
|
||||
page.subscribe(() => {
|
||||
schedulePref.update((sp) => {
|
||||
for (const upk of Object.keys(params)) {
|
||||
const up = params[upk]
|
||||
const _sp = $page.url.searchParams.get(upk)
|
||||
if (up.type === 'boolean') {
|
||||
const up = params[upk];
|
||||
const _sp = $page.url.searchParams.get(upk);
|
||||
if (up.type === "boolean") {
|
||||
if (_sp !== undefined) {
|
||||
sp[up.key] = Boolean(_sp)
|
||||
sp[up.key] = Boolean(_sp);
|
||||
}
|
||||
} else {
|
||||
sp[up.key] = _sp ? _sp : 'all'
|
||||
sp[up.key] = _sp ? _sp : "all";
|
||||
}
|
||||
}
|
||||
return sp
|
||||
return sp;
|
||||
});
|
||||
})
|
||||
}))
|
||||
);
|
||||
|
||||
onMount(async () => {
|
||||
|
||||
const bsub = bundle.subscribe((bundle) => {
|
||||
|
||||
scheduleTimesArr = scheduleTimes(bundle)
|
||||
stagesArr = bundle.spec.stages
|
||||
scheduleTimesArr = scheduleTimes(bundle);
|
||||
stagesArr = bundle.spec.stages;
|
||||
const pref = {};
|
||||
//pref.stages = bundle.spec.stages.map((s) => s.id);
|
||||
//pref.tracks = bundle.spec.tracks.map((s) => s.id);
|
||||
//pref.times = scheduleTimesArr.map((s) => s.id);
|
||||
//schedulePref.set(pref);
|
||||
});
|
||||
subs.push(bsub)
|
||||
subs.push(bsub);
|
||||
|
||||
const pref = {}
|
||||
let schedulePrefInicialized = null
|
||||
const pref = {};
|
||||
let schedulePrefInicialized = null;
|
||||
|
||||
const spsub = schedulePref.subscribe((sp) => {
|
||||
const updates = []
|
||||
updates.push([ 'time', sp.time === 'all' ? undefined : sp.time ])
|
||||
updates.push([ 'stage', sp.stage === 'all' ? undefined : sp.stage ])
|
||||
updates.push([ 'desc', sp.showDescriptions === null || sp.showDescriptions === false || sp.showDescriptions === undefined ? undefined : true ])
|
||||
const updates = [];
|
||||
updates.push(["time", sp.time === "all" ? undefined : sp.time]);
|
||||
updates.push(["stage", sp.stage === "all" ? undefined : sp.stage]);
|
||||
updates.push([
|
||||
"desc",
|
||||
sp.showDescriptions === null ||
|
||||
sp.showDescriptions === false ||
|
||||
sp.showDescriptions === undefined
|
||||
? undefined
|
||||
: true,
|
||||
]);
|
||||
|
||||
let target = '?'
|
||||
let target = "?";
|
||||
if (updates.length > 0) {
|
||||
for (const up of updates) {
|
||||
if (up[1] === undefined && $page.url.searchParams.get(up[0]) !== undefined) {
|
||||
$page.url.searchParams.delete(up[0])
|
||||
if (
|
||||
up[1] === undefined &&
|
||||
$page.url.searchParams.get(up[0]) !== undefined
|
||||
) {
|
||||
$page.url.searchParams.delete(up[0]);
|
||||
} else {
|
||||
$page.url.searchParams.set(up[0], up[1])
|
||||
$page.url.searchParams.set(up[0], up[1]);
|
||||
}
|
||||
}
|
||||
target = `?${$page.url.searchParams.toString()}`
|
||||
target = `?${$page.url.searchParams.toString()}`;
|
||||
}
|
||||
goto(target);
|
||||
|
||||
return false
|
||||
})
|
||||
subs.push(spsub)
|
||||
return false;
|
||||
});
|
||||
subs.push(spsub);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
for (const unsub of subs) {
|
||||
unsub()
|
||||
unsub();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function filterDateStage(arr, date, stageId) {
|
||||
return arr
|
||||
|
@ -129,7 +137,11 @@
|
|||
rowspans[stage.id]--;
|
||||
continue;
|
||||
}
|
||||
if (schedulePref && (schedulePref.stage !== stage.id && schedulePref.stage !== 'all')) {
|
||||
if (
|
||||
schedulePref &&
|
||||
schedulePref.stage !== stage.id &&
|
||||
schedulePref.stage !== "all"
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
let si = pl.schedule.find(
|
||||
|
@ -185,15 +197,15 @@
|
|||
function scheduleTimes(bundle, filter = false) {
|
||||
let arr = bundle.scheduleTimes.map((item, i) => {
|
||||
const out = parsePeriod(bundle, item);
|
||||
out.id = String(i)
|
||||
return out
|
||||
out.id = String(i);
|
||||
return out;
|
||||
});
|
||||
|
||||
if (filter) {
|
||||
arr = arr.filter(st => st.id === filter || filter === 'all')
|
||||
arr = arr.filter((st) => st.id === filter || filter === "all");
|
||||
}
|
||||
|
||||
return arr
|
||||
return arr;
|
||||
}
|
||||
|
||||
function eventTrackClasses(bundle, ev, selectedTracks) {
|
||||
|
@ -204,34 +216,31 @@
|
|||
}
|
||||
|
||||
function isPeriodOverlap(x, y) {
|
||||
const xstart = new Date(x.start)
|
||||
const xend = new Date(x.end)
|
||||
const ystart = new Date(y.start)
|
||||
const yend = new Date(y.end)
|
||||
return (xstart.getTime() < yend.getTime() &&
|
||||
xend.getTime() > ystart.getTime());
|
||||
const xstart = new Date(x.start);
|
||||
const xend = new Date(x.end);
|
||||
const ystart = new Date(y.start);
|
||||
const yend = new Date(y.end);
|
||||
return (
|
||||
xstart.getTime() < yend.getTime() && xend.getTime() > ystart.getTime()
|
||||
);
|
||||
}
|
||||
|
||||
function activeStages(bundle, stages, st, pl) {
|
||||
return stages.filter(stage => {
|
||||
return Boolean(pl.schedule.filter(i => i.stage === stage.id).find(i => isPeriodOverlap(st.period, i.period))
|
||||
|
||||
)
|
||||
})
|
||||
return stages.filter((stage) => {
|
||||
return Boolean(
|
||||
pl.schedule
|
||||
.filter((i) => i.stage === stage.id)
|
||||
.find((i) => isPeriodOverlap(st.period, i.period))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function allScheduleTimes(bundle) {
|
||||
return [
|
||||
{ id: 'all', name: 'Všechny dny' },
|
||||
...scheduleTimes(bundle)
|
||||
]
|
||||
return [{ id: "all", name: "Všechny dny" }, ...scheduleTimes(bundle)];
|
||||
}
|
||||
|
||||
function allStages(bundle) {
|
||||
return [
|
||||
{ id: 'all', name: 'Všechny sály' },
|
||||
...bundle.spec.stages
|
||||
]
|
||||
return [{ id: "all", name: "Všechny sály" }, ...bundle.spec.stages];
|
||||
}
|
||||
|
||||
function makeSpoiler(_e) {
|
||||
|
@ -292,7 +301,12 @@
|
|||
>
|
||||
{#each $bundle.spec["schedule-candidates"] as p, i}
|
||||
<option value={i}
|
||||
>#{i} | {p.hash.substring(0,8)} [{["score", "thc:themeCrossing", "tgc:tagsCrossing", "exd:exclusivityDev"]
|
||||
>#{i} | {p.hash.substring(0, 8)} [{[
|
||||
"score",
|
||||
"thc:themeCrossing",
|
||||
"tgc:tagsCrossing",
|
||||
"exd:exclusivityDev",
|
||||
]
|
||||
.map((key) => {
|
||||
const [title, rkey] = key.split(":");
|
||||
return `${title}:${
|
||||
|
@ -308,7 +322,9 @@
|
|||
</div>
|
||||
<h1 class="uppercase text-2xl font-bold mb-2">Program</h1>
|
||||
<div class="mb-4">
|
||||
<a href="/seznam-udalosti" class="underline hover:no-underline">Seznam všech událostí</a>
|
||||
<a href="/seznam-udalosti" class="underline hover:no-underline"
|
||||
>Seznam všech událostí</a
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
{#if $bundle}
|
||||
|
@ -316,9 +332,12 @@
|
|||
<div class="flex gap-1 flex-wrap">
|
||||
<div class="font-semibold uppercase my-auto mx-3">Den</div>
|
||||
{#each allScheduleTimes($bundle) as st}
|
||||
<button class="{($schedulePref.time === st.id) ? 'bg-utxo-gradient text-white' : 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-bold py-2 px-4 rounded-full"
|
||||
on:click={() => $schedulePref.time = st.id}
|
||||
>{st.name}</button>
|
||||
<button
|
||||
class="{$schedulePref.time === st.id
|
||||
? 'bg-utxo-gradient text-white'
|
||||
: 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-bold py-2 px-4 rounded-full"
|
||||
on:click={() => ($schedulePref.time = st.id)}>{st.name}</button
|
||||
>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -326,9 +345,12 @@
|
|||
<div class="flex gap-1 flex-wrap">
|
||||
<div class="font-semibold uppercase my-auto mx-3">Sál</div>
|
||||
{#each allStages($bundle) as et}
|
||||
<button class="{($schedulePref.stage === et.id) ? 'bg-utxo-gradient text-white' : 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-bold py-1.5 px-3 rounded-full text-sm"
|
||||
on:click={() => $schedulePref.stage = et.id}
|
||||
>{et.name}</button>
|
||||
<button
|
||||
class="{$schedulePref.stage === et.id
|
||||
? 'bg-utxo-gradient text-white'
|
||||
: 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-bold py-1.5 px-3 rounded-full text-sm"
|
||||
on:click={() => ($schedulePref.stage = et.id)}>{et.name}</button
|
||||
>
|
||||
<!--div class="u-choose-div m-0.5">
|
||||
<label class="cursor-pointer"
|
||||
><input
|
||||
|
@ -347,7 +369,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label><input type="checkbox" bind:checked={$schedulePref.showDescriptions} /> Zobrazit popisy</label>
|
||||
<label
|
||||
><input
|
||||
type="checkbox"
|
||||
bind:checked={$schedulePref.showDescriptions}
|
||||
/> Zobrazit popisy</label
|
||||
>
|
||||
</div>
|
||||
|
||||
<!--div class="mb-4">
|
||||
|
@ -383,7 +410,6 @@
|
|||
</div-->
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section class="relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web">
|
||||
{#if $bundle}
|
||||
|
@ -402,11 +428,20 @@
|
|||
<table width="100%" class="table table-auto xl:table-fixed relative">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue">{format(new Date(st.date), "iiiiii", { locale: cs })}<br />{format(new Date(st.date), "d.M.")}</th>
|
||||
<th
|
||||
class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue"
|
||||
>{format(new Date(st.date), "iiiiii", { locale: cs })}<br
|
||||
/>{format(new Date(st.date), "d.M.")}</th
|
||||
>
|
||||
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === 'all')}
|
||||
<th class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom">
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">{stage.capacity.seat} <i class="fa-solid fa-chair"></i> + {stage.capacity.stand} <i class="fa-solid fa-person"></div>
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === "all")}
|
||||
<th
|
||||
class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom"
|
||||
>
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">
|
||||
{stage.capacity.seat} <i class="fa-solid fa-chair" /> + {stage
|
||||
.capacity.stand} <i class="fa-solid fa-person" />
|
||||
</div>
|
||||
<div>{stage.name}</div>
|
||||
</th>
|
||||
{/if}
|
||||
|
@ -422,7 +457,7 @@
|
|||
height="60">{ds.title}</th
|
||||
>
|
||||
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === 'all')}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === "all")}
|
||||
{#if ds.stages[stage.id] === undefined}
|
||||
<td />
|
||||
{:else if ds.stages[stage.id] !== null}
|
||||
|
@ -441,13 +476,15 @@
|
|||
{format(
|
||||
new Date(si.period.start),
|
||||
"HH:mm"
|
||||
)}-{format(new Date(si.period.end), "HH:mm")} <span class="text-blue-web/80">@{si.id}</span>
|
||||
)}-{format(new Date(si.period.end), "HH:mm")}
|
||||
<span class="text-blue-web/80">@{si.id}</span>
|
||||
{#if event.track}[{#each [$bundle.spec.tracks.find((t) => t.id === event.track)] as track}{track.shortname ||
|
||||
track.name}{/each}]{/if}
|
||||
</div>
|
||||
<div class="font-semibold mt-1">
|
||||
<a href="/udalosti?id={event.id}" class="hover:underline"
|
||||
>{event.name}</a
|
||||
<a
|
||||
href="/udalosti?id={event.id}"
|
||||
class="hover:underline">{event.name}</a
|
||||
>
|
||||
</div>
|
||||
<div class="text-xs mt-1">
|
||||
|
@ -458,11 +495,18 @@
|
|||
</div>
|
||||
{#if event.description && $schedulePref.showDescriptions}
|
||||
{#each [makeSpoiler(event)] as spoiler}
|
||||
<div class="mt-2 overflow-hidden text-sm text-blue-web/90">
|
||||
<SvelteMarkdown source={spoiler.md} {renderers} />
|
||||
<div
|
||||
class="mt-2 overflow-hidden text-sm text-blue-web/90"
|
||||
>
|
||||
<SvelteMarkdown
|
||||
source={spoiler.md}
|
||||
{renderers}
|
||||
/>
|
||||
{#if spoiler.stripped}
|
||||
<div class="text-xs text-blue-web/60">
|
||||
(<a href="/udalosti?id={event.id}">Zobrazit celý popis</a>)
|
||||
(<a href="/udalosti?id={event.id}"
|
||||
>Zobrazit celý popis</a
|
||||
>)
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -9,90 +9,99 @@
|
|||
import { format, compareAsc, compareDesc } from "date-fns";
|
||||
import { bundle, userData, loadInfo, schedulePref } from "$lib/stores.js";
|
||||
import { cs } from "date-fns/locale/index.js";
|
||||
import { parsePeriod } from '$lib/periods.js';
|
||||
import { parsePeriod } from "$lib/periods.js";
|
||||
import SvelteMarkdown from "svelte-markdown";
|
||||
import SvelteTooltip from "$lib/SvelteTooltip.svelte";
|
||||
const renderers = { link: Link };
|
||||
import Link from "$lib/Link.svelte";
|
||||
|
||||
let scheduleTimesArr = null
|
||||
let stagesArr = null
|
||||
let scheduleTimesArr = null;
|
||||
let stagesArr = null;
|
||||
|
||||
let planNumber = 0;
|
||||
$: plan = $bundle ? $bundle.spec.schedule : null;
|
||||
|
||||
const params = {
|
||||
time: { key: 'time' },
|
||||
stage: { key: 'stage' },
|
||||
desc: { key: 'showDescriptions', type: 'boolean' }
|
||||
}
|
||||
time: { key: "time" },
|
||||
stage: { key: "stage" },
|
||||
desc: { key: "showDescriptions", type: "boolean" },
|
||||
};
|
||||
|
||||
let subs = [];
|
||||
|
||||
let subs = []
|
||||
|
||||
subs.push(page.subscribe(() => {
|
||||
|
||||
schedulePref.update(sp => {
|
||||
subs.push(
|
||||
page.subscribe(() => {
|
||||
schedulePref.update((sp) => {
|
||||
for (const upk of Object.keys(params)) {
|
||||
const up = params[upk]
|
||||
const _sp = $page.url.searchParams.get(upk)
|
||||
if (up.type === 'boolean') {
|
||||
const up = params[upk];
|
||||
const _sp = $page.url.searchParams.get(upk);
|
||||
if (up.type === "boolean") {
|
||||
if (_sp !== undefined) {
|
||||
sp[up.key] = Boolean(_sp)
|
||||
sp[up.key] = Boolean(_sp);
|
||||
}
|
||||
} else {
|
||||
sp[up.key] = _sp ? _sp : 'all'
|
||||
sp[up.key] = _sp ? _sp : "all";
|
||||
}
|
||||
}
|
||||
return sp
|
||||
return sp;
|
||||
});
|
||||
})
|
||||
}))
|
||||
);
|
||||
|
||||
onMount(async () => {
|
||||
|
||||
const bsub = bundle.subscribe((bundle) => {
|
||||
|
||||
scheduleTimesArr = scheduleTimes(bundle)
|
||||
stagesArr = bundle.spec.stages
|
||||
scheduleTimesArr = scheduleTimes(bundle);
|
||||
stagesArr = bundle.spec.stages;
|
||||
const pref = {};
|
||||
//pref.stages = bundle.spec.stages.map((s) => s.id);
|
||||
//pref.tracks = bundle.spec.tracks.map((s) => s.id);
|
||||
//pref.times = scheduleTimesArr.map((s) => s.id);
|
||||
//schedulePref.set(pref);
|
||||
});
|
||||
subs.push(bsub)
|
||||
subs.push(bsub);
|
||||
|
||||
const pref = {}
|
||||
let schedulePrefInicialized = null
|
||||
const pref = {};
|
||||
let schedulePrefInicialized = null;
|
||||
|
||||
const spsub = schedulePref.subscribe((sp) => {
|
||||
const updates = []
|
||||
updates.push([ 'time', sp.time === 'all' ? undefined : sp.time ])
|
||||
updates.push([ 'stage', sp.stage === 'all' ? undefined : sp.stage ])
|
||||
updates.push([ 'desc', sp.showDescriptions === null || sp.showDescriptions === false || sp.showDescriptions === undefined ? undefined : true ])
|
||||
const updates = [];
|
||||
updates.push(["time", sp.time === "all" ? undefined : sp.time]);
|
||||
updates.push(["stage", sp.stage === "all" ? undefined : sp.stage]);
|
||||
updates.push([
|
||||
"desc",
|
||||
sp.showDescriptions === null ||
|
||||
sp.showDescriptions === false ||
|
||||
sp.showDescriptions === undefined
|
||||
? undefined
|
||||
: true,
|
||||
]);
|
||||
|
||||
let target = '?'
|
||||
let target = "?";
|
||||
if (updates.length > 0) {
|
||||
for (const up of updates) {
|
||||
if (up[1] === undefined && $page.url.searchParams.get(up[0]) !== undefined) {
|
||||
$page.url.searchParams.delete(up[0])
|
||||
if (
|
||||
up[1] === undefined &&
|
||||
$page.url.searchParams.get(up[0]) !== undefined
|
||||
) {
|
||||
$page.url.searchParams.delete(up[0]);
|
||||
} else {
|
||||
$page.url.searchParams.set(up[0], up[1])
|
||||
$page.url.searchParams.set(up[0], up[1]);
|
||||
}
|
||||
}
|
||||
target = `?${$page.url.searchParams.toString()}`
|
||||
target = `?${$page.url.searchParams.toString()}`;
|
||||
}
|
||||
goto(target);
|
||||
|
||||
return false
|
||||
})
|
||||
subs.push(spsub)
|
||||
return false;
|
||||
});
|
||||
subs.push(spsub);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
for (const unsub of subs) {
|
||||
unsub()
|
||||
unsub();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function filterDateStage(arr, date, stageId) {
|
||||
return arr
|
||||
|
@ -129,7 +138,11 @@
|
|||
rowspans[stage.id]--;
|
||||
continue;
|
||||
}
|
||||
if (schedulePref && (schedulePref.stage !== stage.id && schedulePref.stage !== 'all')) {
|
||||
if (
|
||||
schedulePref &&
|
||||
schedulePref.stage !== stage.id &&
|
||||
schedulePref.stage !== "all"
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
let si = pl.find(
|
||||
|
@ -185,26 +198,26 @@
|
|||
function scheduleTimes(bundle, filter = false) {
|
||||
let arr = bundle.scheduleTimes.map((item, i) => {
|
||||
const out = parsePeriod(bundle, item);
|
||||
out.id = String(i)
|
||||
out.id = String(i);
|
||||
switch (i) {
|
||||
case 0:
|
||||
out.code = 'sobota';
|
||||
break
|
||||
out.code = "sobota";
|
||||
break;
|
||||
case 1:
|
||||
out.code = 'sobota-party';
|
||||
break
|
||||
out.code = "sobota-party";
|
||||
break;
|
||||
case 2:
|
||||
out.code = 'nedele';
|
||||
break
|
||||
out.code = "nedele";
|
||||
break;
|
||||
}
|
||||
return out
|
||||
return out;
|
||||
});
|
||||
|
||||
if (filter) {
|
||||
arr = arr.filter(st => st.id === filter || filter === 'all')
|
||||
arr = arr.filter((st) => st.id === filter || filter === "all");
|
||||
}
|
||||
|
||||
return arr
|
||||
return arr;
|
||||
}
|
||||
|
||||
function eventTrackClasses(bundle, ev, selectedTracks) {
|
||||
|
@ -215,34 +228,31 @@
|
|||
}
|
||||
|
||||
function isPeriodOverlap(x, y) {
|
||||
const xstart = new Date(x.start)
|
||||
const xend = new Date(x.end)
|
||||
const ystart = new Date(y.start)
|
||||
const yend = new Date(y.end)
|
||||
return (xstart.getTime() < yend.getTime() &&
|
||||
xend.getTime() > ystart.getTime());
|
||||
const xstart = new Date(x.start);
|
||||
const xend = new Date(x.end);
|
||||
const ystart = new Date(y.start);
|
||||
const yend = new Date(y.end);
|
||||
return (
|
||||
xstart.getTime() < yend.getTime() && xend.getTime() > ystart.getTime()
|
||||
);
|
||||
}
|
||||
|
||||
function activeStages(bundle, stages, st, pl) {
|
||||
return stages.filter(stage => {
|
||||
return Boolean(pl.filter(i => i.stage === stage.id).find(i => isPeriodOverlap(st.period, i.period))
|
||||
|
||||
)
|
||||
})
|
||||
return stages.filter((stage) => {
|
||||
return Boolean(
|
||||
pl
|
||||
.filter((i) => i.stage === stage.id)
|
||||
.find((i) => isPeriodOverlap(st.period, i.period))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
function allScheduleTimes(bundle) {
|
||||
return [
|
||||
{ id: 'all', name: 'Všechny dny' },
|
||||
...scheduleTimes(bundle)
|
||||
]
|
||||
return [{ id: "all", name: "Všechny dny" }, ...scheduleTimes(bundle)];
|
||||
}
|
||||
|
||||
function allStages(bundle) {
|
||||
return [
|
||||
{ id: 'all', name: 'Všechny sály' },
|
||||
...bundle.spec.stages
|
||||
]
|
||||
return [{ id: "all", name: "Všechny sály" }, ...bundle.spec.stages];
|
||||
}
|
||||
|
||||
function makeSpoiler(_e) {
|
||||
|
@ -295,7 +305,12 @@
|
|||
>
|
||||
<h1 class="uppercase text-2xl font-bold mb-2">Program</h1>
|
||||
<div class="mb-4 utxo-program-head">
|
||||
<a href="/seznam-udalosti">Seznam všech událostí</a>, PDF: <a href="https://pub.utxo.cz/22/pdf/sobota.pdf" target="_blank">sobota</a>, <a href="https://pub.utxo.cz/22/pdf/sobota-party.pdf" target="_blank">sobota (party)</a>, <a href="https://pub.utxo.cz/22/pdf/nedele.pdf" target="_blank">neděle</a>
|
||||
<a href="/seznam-udalosti">Seznam všech událostí</a>, PDF:
|
||||
<a href="https://pub.utxo.cz/22/pdf/sobota.pdf" target="_blank">sobota</a>,
|
||||
<a href="https://pub.utxo.cz/22/pdf/sobota-party.pdf" target="_blank"
|
||||
>sobota (party)</a
|
||||
>,
|
||||
<a href="https://pub.utxo.cz/22/pdf/nedele.pdf" target="_blank">neděle</a>
|
||||
</div>
|
||||
<div>
|
||||
{#if $bundle}
|
||||
|
@ -303,9 +318,12 @@
|
|||
<div class="flex gap-1 flex-wrap">
|
||||
<div class="font-semibold uppercase my-auto mx-3">Den</div>
|
||||
{#each allScheduleTimes($bundle) as st}
|
||||
<button class="{($schedulePref.time === st.id) ? 'bg-utxo-gradient text-white' : 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full"
|
||||
on:click={() => $schedulePref.time = st.id}
|
||||
>{st.name}</button>
|
||||
<button
|
||||
class="{$schedulePref.time === st.id
|
||||
? 'bg-utxo-gradient text-white'
|
||||
: 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full"
|
||||
on:click={() => ($schedulePref.time = st.id)}>{st.name}</button
|
||||
>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -313,9 +331,12 @@
|
|||
<div class="flex gap-1 flex-wrap">
|
||||
<div class="font-semibold uppercase my-auto mx-3">Sál</div>
|
||||
{#each allStages($bundle) as et}
|
||||
<button class="{($schedulePref.stage === et.id) ? 'bg-utxo-gradient text-white' : 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-semibold py-1 px-2 rounded-full text-sm"
|
||||
on:click={() => $schedulePref.stage = et.id}
|
||||
>{et.name}</button>
|
||||
<button
|
||||
class="{$schedulePref.stage === et.id
|
||||
? 'bg-utxo-gradient text-white'
|
||||
: 'text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20'} font-semibold py-1 px-2 rounded-full text-sm"
|
||||
on:click={() => ($schedulePref.stage = et.id)}>{et.name}</button
|
||||
>
|
||||
<!--div class="u-choose-div m-0.5">
|
||||
<label class="cursor-pointer"
|
||||
><input
|
||||
|
@ -334,7 +355,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label><input type="checkbox" bind:checked={$schedulePref.showDescriptions} /> Zobrazit popisy</label>
|
||||
<label
|
||||
><input
|
||||
type="checkbox"
|
||||
bind:checked={$schedulePref.showDescriptions}
|
||||
/> Zobrazit popisy</label
|
||||
>
|
||||
</div>
|
||||
|
||||
<!--div class="mb-4">
|
||||
|
@ -370,12 +396,13 @@
|
|||
</div-->
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
<section class="relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web">
|
||||
{#if $bundle}
|
||||
{#each scheduleTimes($bundle, $schedulePref.time) as st}
|
||||
<div class="max-w-6xl mx-auto px-6 mb-4 print:max-w-full break-before-page flex gap-3">
|
||||
<div
|
||||
class="max-w-6xl mx-auto px-6 mb-4 print:max-w-full break-before-page flex gap-3"
|
||||
>
|
||||
<h2 class="uppercase text-xl font-bold">
|
||||
{#if st.name}
|
||||
{st.name}
|
||||
|
@ -383,20 +410,53 @@
|
|||
{format(new Date(st.date), "iiii d.M.y", { locale: cs })}
|
||||
{/if}
|
||||
</h2>
|
||||
<div class="inline-block ml-2 text-sm font-normal my-auto print:hidden"><a href="https://pub.utxo.cz/22/pdf/{st.code}.pdf" target="_blank" class=""><i class="fa-regular fa-file-pdf"></i> PDF</a></div>
|
||||
<div class="flex-1 text-right hidden sm:block float-right text-blue-web/50">Zdrojová data: {format(new Date($bundle.time), 'd.M.y H:mm')}</div>
|
||||
<div class="inline-block ml-2 text-sm font-normal my-auto print:hidden">
|
||||
<a
|
||||
href="https://pub.utxo.cz/22/pdf/{st.code}.pdf"
|
||||
target="_blank"
|
||||
class=""><i class="fa-regular fa-file-pdf" /> PDF</a
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="flex-1 text-right hidden sm:block float-right text-blue-web/50"
|
||||
>
|
||||
Zdrojová data: {format(new Date($bundle.time), "d.M.y H:mm")}
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative">
|
||||
<div class="mt-4 mb-10 h-screen sm:h-auto overflow-scroll sm:overflow-clip">
|
||||
<div
|
||||
class="mt-4 mb-10 h-screen sm:h-auto overflow-scroll sm:overflow-clip"
|
||||
>
|
||||
<table width="100%" class="table table-auto xl:table-fixed relative">
|
||||
<thead class="">
|
||||
<tr>
|
||||
<th class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue">{format(new Date(st.date), "iiiiii", { locale: cs })}<br />{format(new Date(st.date), "d.M.")}</th>
|
||||
<th
|
||||
class="xl:w-16 top-0 sticky bg-white uppercase text-sm px-0.5 text-custom-blue"
|
||||
>{format(new Date(st.date), "iiiiii", { locale: cs })}<br
|
||||
/>{format(new Date(st.date), "d.M.")}</th
|
||||
>
|
||||
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === 'all')}
|
||||
<th class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom">
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">{stage.capacity.seat} <i class="fa-solid fa-chair"></i> + {stage.capacity.stand} <i class="fa-solid fa-person"></div>
|
||||
<div>{stage.name}</div>
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === "all")}
|
||||
<th
|
||||
class="text-md py-1.5 px-1 sticky top-0 bg-white align-bottom"
|
||||
>
|
||||
<div class="text-xs font-normal text-blue-web/60 mb-2.5">
|
||||
{#if stage.livestream}<SvelteTooltip
|
||||
tip={"Sál je náhrávaný a livestreamovaný."}
|
||||
bottom="true"
|
||||
><div class="inline-block mr-2 text-sm cursor-help">
|
||||
<i class="fa-solid fa-video" />
|
||||
</div></SvelteTooltip
|
||||
>{/if}
|
||||
{stage.capacity.seat} <i class="fa-solid fa-chair" /> + {stage
|
||||
.capacity.stand} <i class="fa-solid fa-person" />
|
||||
</div>
|
||||
<div>
|
||||
<a
|
||||
href="/program?stage={stage.id}&time={$schedulePref.time}"
|
||||
>{stage.name}</a
|
||||
>
|
||||
</div>
|
||||
</th>
|
||||
{/if}
|
||||
{/each}
|
||||
|
@ -411,7 +471,7 @@
|
|||
height="60">{ds.title}</th
|
||||
>
|
||||
{#each activeStages($bundle, $bundle.spec.stages, st, plan) as stage}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === 'all')}
|
||||
{#if $schedulePref && ($schedulePref.stage === stage.id || $schedulePref.stage === "all")}
|
||||
{#if ds.stages[stage.id] === undefined}
|
||||
<td />
|
||||
{:else if ds.stages[stage.id] !== null}
|
||||
|
@ -430,13 +490,15 @@
|
|||
{format(
|
||||
new Date(si.period.start),
|
||||
"HH:mm"
|
||||
)}-{format(new Date(si.period.end), "HH:mm")} <span class="text-blue-web/80">@{si.id}</span>
|
||||
)}-{format(new Date(si.period.end), "HH:mm")}
|
||||
<span class="text-blue-web/80">@{si.id}</span>
|
||||
{#if event.track}[{#each [$bundle.spec.tracks.find((t) => t.id === event.track)] as track}{track.shortname ||
|
||||
track.name}{/each}]{/if}
|
||||
</div>
|
||||
<div class="font-bold mt-1">
|
||||
<a href="/udalosti?id={event.id}" class="hover:underline"
|
||||
>{event.name}</a
|
||||
<a
|
||||
href="/udalosti?id={event.id}"
|
||||
class="hover:underline">{event.name}</a
|
||||
>
|
||||
</div>
|
||||
<div class="text-xs mt-1">
|
||||
|
@ -447,11 +509,18 @@
|
|||
</div>
|
||||
{#if event.description && $schedulePref.showDescriptions}
|
||||
{#each [makeSpoiler(event)] as spoiler}
|
||||
<div class="mt-2 overflow-hidden text-sm text-blue-web/90">
|
||||
<SvelteMarkdown source={spoiler.md} {renderers} />
|
||||
<div
|
||||
class="mt-2 overflow-hidden text-sm text-blue-web/90"
|
||||
>
|
||||
<SvelteMarkdown
|
||||
source={spoiler.md}
|
||||
{renderers}
|
||||
/>
|
||||
{#if spoiler.stripped}
|
||||
<div class="text-xs text-blue-web/60">
|
||||
(<a href="/udalosti?id={event.id}">Zobrazit celý popis</a>)
|
||||
(<a href="/udalosti?id={event.id}"
|
||||
>Zobrazit celý popis</a
|
||||
>)
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -160,10 +160,14 @@
|
|||
</svelte:head>
|
||||
|
||||
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
||||
<h1 class="uppercase text-2xl font-bold"><a href="/program">Program</a> → Seznam událostí</h1>
|
||||
<h1 class="uppercase text-2xl font-bold">
|
||||
<a href="/program">Program</a> → Seznam událostí
|
||||
</h1>
|
||||
<div class="mt-2">
|
||||
<p>
|
||||
<a href="/program" class="underline hover:no-underline">Časový rozpis (program)</a>
|
||||
<a href="/program" class="underline hover:no-underline"
|
||||
>Časový rozpis (program)</a
|
||||
>
|
||||
| <a href="/changelog" class="underline hover:no-underline">Changelog</a>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -6,135 +6,146 @@
|
|||
import { onMount, onDestroy } from "svelte";
|
||||
import { bundle, userData } from "$lib/stores.js";
|
||||
import { format, formatDistanceToNow } from "date-fns";
|
||||
import { parsePeriod } from '$lib/periods.js';
|
||||
import { parsePeriod } from "$lib/periods.js";
|
||||
import EventTypeLabel from "$lib/EventTypeLabel.svelte";
|
||||
import Avatar from "$lib/Avatar.svelte";
|
||||
import YouTube from '$lib/YouTube.svelte';
|
||||
import YouTube from "$lib/YouTube.svelte";
|
||||
import SvelteMarkdown from "svelte-markdown";
|
||||
import Link from "$lib/Link.svelte";
|
||||
import { scrollTo, scrollRef, scrollTop } from 'svelte-scrolling';
|
||||
import { scrollTo, scrollRef, scrollTop } from "svelte-scrolling";
|
||||
const renderers = { link: Link };
|
||||
|
||||
const YToptions = {
|
||||
playerVars: {
|
||||
autoplay: 0
|
||||
}
|
||||
}
|
||||
const stageStatus = {}
|
||||
const stagePlayers = {}
|
||||
let events = []
|
||||
let cachedBundle = []
|
||||
autoplay: 0,
|
||||
},
|
||||
};
|
||||
const stageStatus = {};
|
||||
const stagePlayers = {};
|
||||
let events = [];
|
||||
let cachedBundle = [];
|
||||
|
||||
function typeColor(type) {
|
||||
let color = null
|
||||
let color = null;
|
||||
switch (type) {
|
||||
case 'talk':
|
||||
color = 'bg-custom-green/70'
|
||||
break
|
||||
case 'panel':
|
||||
color = 'bg-orange-400/70'
|
||||
break
|
||||
case 'lightning-series':
|
||||
color = 'bg-yellow-400/70'
|
||||
break
|
||||
case 'other':
|
||||
color = 'bg-rose-400/70'
|
||||
break
|
||||
case "talk":
|
||||
color = "bg-custom-green/70";
|
||||
break;
|
||||
case "panel":
|
||||
color = "bg-orange-400/70";
|
||||
break;
|
||||
case "lightning-series":
|
||||
color = "bg-yellow-400/70";
|
||||
break;
|
||||
case "other":
|
||||
color = "bg-rose-400/70";
|
||||
break;
|
||||
}
|
||||
return color
|
||||
return color;
|
||||
}
|
||||
|
||||
bundle.subscribe(_bundle => {
|
||||
events = _bundle.spec.schedule
|
||||
cachedBundle = _bundle
|
||||
genStatus(cachedBundle)
|
||||
})
|
||||
bundle.subscribe((_bundle) => {
|
||||
events = _bundle.spec.schedule;
|
||||
cachedBundle = _bundle;
|
||||
genStatus(cachedBundle);
|
||||
});
|
||||
|
||||
let interval = null
|
||||
let interval = null;
|
||||
onMount(() => {
|
||||
|
||||
interval = setInterval(() => {
|
||||
genStatus(cachedBundle)
|
||||
}, 5000)
|
||||
})
|
||||
genStatus(cachedBundle);
|
||||
}, 5000);
|
||||
});
|
||||
onDestroy(() => {
|
||||
clearInterval(interval)
|
||||
})
|
||||
clearInterval(interval);
|
||||
});
|
||||
|
||||
function startStream(stageId) {
|
||||
const player = stagePlayers[stageId]
|
||||
const player = stagePlayers[stageId];
|
||||
if (!player) {
|
||||
return null
|
||||
return null;
|
||||
}
|
||||
player.playVideo()
|
||||
player.playVideo();
|
||||
}
|
||||
|
||||
function youtubePlayed(stageId) {
|
||||
for (const pi of Object.keys(stagePlayers)) {
|
||||
if (pi !== stageId) {
|
||||
console.log(`stopping player: ${pi}`)
|
||||
stagePlayers[pi].stopVideo()
|
||||
console.log(`stopping player: ${pi}`);
|
||||
stagePlayers[pi].stopVideo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function findSpeaker(sp, _bundle) {
|
||||
return _bundle.spec.speakers.find(s => s.id === sp)
|
||||
return _bundle.spec.speakers.find((s) => s.id === sp);
|
||||
}
|
||||
|
||||
function extendEvents(arr, _bundle) {
|
||||
for (const ev of arr) {
|
||||
ev._event = _bundle.spec.events.find(e => e.id === ev.event)
|
||||
ev._event = _bundle.spec.events.find((e) => e.id === ev.event);
|
||||
}
|
||||
return arr
|
||||
return arr;
|
||||
}
|
||||
|
||||
function genStatus(_bundle) {
|
||||
const now = new Date(`2022-06-04T${format(new Date(), 'HH:mm:ss')}`)
|
||||
const now = new Date(`2022-06-04T${format(new Date(), "HH:mm:ss")}`);
|
||||
//const now = new Date()
|
||||
//const now = new Date(`2022-06-04T13:25`)
|
||||
|
||||
let globalNextEvents = events.filter(ev => {
|
||||
return new Date(ev.period.end).getTime() > now.getTime()
|
||||
})
|
||||
let globalNextEvents = events.filter((ev) => {
|
||||
return new Date(ev.period.end).getTime() > now.getTime();
|
||||
});
|
||||
|
||||
const stages = _bundle.spec.stages
|
||||
for (const stage of stages.filter(s => s.livestream)) {
|
||||
let nextEvents = [...globalNextEvents.filter(e => e.stage === stage.id)]
|
||||
let current = null
|
||||
if (nextEvents.length > 0 && new Date(nextEvents[0].period.start).getTime() <= now.getTime()) {
|
||||
current = nextEvents[0]
|
||||
nextEvents = nextEvents.slice(1)
|
||||
const stages = _bundle.spec.stages;
|
||||
for (const stage of stages.filter((s) => s.livestream)) {
|
||||
let nextEvents = [
|
||||
...globalNextEvents.filter((e) => e.stage === stage.id),
|
||||
];
|
||||
let current = null;
|
||||
if (
|
||||
nextEvents.length > 0 &&
|
||||
new Date(nextEvents[0].period.start).getTime() <= now.getTime()
|
||||
) {
|
||||
current = nextEvents[0];
|
||||
nextEvents = nextEvents.slice(1);
|
||||
}
|
||||
|
||||
const allStreams = stage.streams.map(st => parsePeriod(_bundle, st))
|
||||
const nextStreams = allStreams.filter(s => s.period.end.getTime() >= now.getTime())
|
||||
const allStreams = stage.streams.map((st) => parsePeriod(_bundle, st));
|
||||
const nextStreams = allStreams.filter(
|
||||
(s) => s.period.end.getTime() >= now.getTime()
|
||||
);
|
||||
if (nextStreams.length === 0) {
|
||||
nextStreams.push(allStreams[allStreams.length-1])
|
||||
nextStreams.push(allStreams[allStreams.length - 1]);
|
||||
}
|
||||
let currentPercentage = null
|
||||
let currentPercentage = null;
|
||||
if (current) {
|
||||
let duration = (new Date(current.period.end).getTime() - new Date(current.period.start).getTime()) / 1000
|
||||
let elapsed = Math.floor((now.getTime() - new Date(current.period.start).getTime()) / 1000)
|
||||
currentPercentage = elapsed/(duration/100)
|
||||
let duration =
|
||||
(new Date(current.period.end).getTime() -
|
||||
new Date(current.period.start).getTime()) /
|
||||
1000;
|
||||
let elapsed = Math.floor(
|
||||
(now.getTime() - new Date(current.period.start).getTime()) / 1000
|
||||
);
|
||||
currentPercentage = elapsed / (duration / 100);
|
||||
}
|
||||
|
||||
const day = format(new Date(nextStreams[0].period.start), 'yyyy-MM-dd')
|
||||
let ctime = 0
|
||||
if (day === '2022-06-05') {
|
||||
ctime = 2
|
||||
const day = format(new Date(nextStreams[0].period.start), "yyyy-MM-dd");
|
||||
let ctime = 0;
|
||||
if (day === "2022-06-05") {
|
||||
ctime = 2;
|
||||
}
|
||||
const scheduleLink = `/program?time=${ctime}&stage=${stage.id}&desc=true`
|
||||
const scheduleLink = `/program?time=${ctime}&stage=${stage.id}&desc=true`;
|
||||
|
||||
stageStatus[stage.id] = {
|
||||
current: current ? extendEvents([current], _bundle)[0] : null,
|
||||
currentPercentage,
|
||||
next: extendEvents(nextEvents.slice(0, 2), _bundle),
|
||||
stream: nextStreams[0],
|
||||
scheduleLink
|
||||
scheduleLink,
|
||||
};
|
||||
}
|
||||
}
|
||||
console.log(stageStatus)
|
||||
console.log(stageStatus);
|
||||
}
|
||||
|
||||
function makeSpoiler(_e) {
|
||||
|
@ -157,20 +168,55 @@
|
|||
<div class="w-full h-full bg-blue-web-bg/90">
|
||||
{#if $bundle}
|
||||
<div class="px-16 py-4">
|
||||
<div class="flex w-full justify-center lg:pt-6 text-white gap-4 flex-wrap lg:flex-nowrap">
|
||||
{#each $bundle.spec.stages.filter(s => s.livestream) as stage, i}
|
||||
<div class="w-full md:w-1/3 lg:w-1/4 px-6 py-4 bg-blue-web-bg/70 hover:bg-blue-web-bg rounded-2xl text-center cursor-pointer transition-all shadow-xl" use:scrollTo={stage.id} on:click={() => startStream(stage.id)}>
|
||||
<div class="uppercase font-semibold text-white text-lg">#{i+1} {stage.name}</div>
|
||||
<div
|
||||
class="flex w-full justify-center lg:pt-6 text-white gap-4 flex-wrap lg:flex-nowrap"
|
||||
>
|
||||
{#each $bundle.spec.stages.filter((s) => s.livestream) as stage, i}
|
||||
<div
|
||||
class="w-full md:w-1/3 lg:w-1/4 px-6 py-4 bg-blue-web-bg/70 hover:bg-blue-web-bg rounded-2xl text-center cursor-pointer transition-all shadow-xl"
|
||||
use:scrollTo={stage.id}
|
||||
on:click={() => startStream(stage.id)}
|
||||
>
|
||||
<div class="uppercase font-semibold text-white text-lg">
|
||||
#{i + 1}
|
||||
{stage.name}
|
||||
</div>
|
||||
<div class="mt-2 text-sm">
|
||||
{#each [stageStatus[stage.id]] as ss}
|
||||
{#if ss.current}
|
||||
<div class="text-center mb-2"><span class="uppercase text-xs mr-2 text-white/70"></span> <EventTypeLabel event={ss.current._event} black={true} /></div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2 dark:bg-gray-700 mt-4 mb-2 transition-all">
|
||||
<div class="{typeColor(ss.current._event.type)} h-2 rounded-full" style="width: {ss.currentPercentage}%"></div>
|
||||
<div class="text-center mb-2">
|
||||
<span class="uppercase text-xs mr-2 text-white/70" />
|
||||
<EventTypeLabel event={ss.current._event} black={true} />
|
||||
</div>
|
||||
<div
|
||||
class="w-full bg-gray-200 rounded-full h-2 dark:bg-gray-700 mt-4 mb-2 transition-all"
|
||||
>
|
||||
<div
|
||||
class="{typeColor(
|
||||
ss.current._event.type
|
||||
)} h-2 rounded-full"
|
||||
style="width: {ss.currentPercentage}%"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-white/70"
|
||||
>{format(
|
||||
new Date(ss.current.period.start),
|
||||
"HH:mm"
|
||||
)}-{format(
|
||||
new Date(ss.current.period.end),
|
||||
"HH:mm"
|
||||
)}</span
|
||||
>
|
||||
{ss.current._event.name}
|
||||
</div>
|
||||
<div><span class="text-white/70">{format(new Date(ss.current.period.start), 'HH:mm')}-{format(new Date(ss.current.period.end), 'HH:mm')}</span> {ss.current._event.name}</div>
|
||||
{:else}
|
||||
<span class="italic">☕ Přestávka {#if ss.next[0]}do {format(new Date(ss.next[0].period.start), 'HH:mm')}{/if}</span>
|
||||
<span class="italic"
|
||||
>☕ Přestávka {#if ss.next[0]}do {format(
|
||||
new Date(ss.next[0].period.start),
|
||||
"HH:mm"
|
||||
)}{/if}</span
|
||||
>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
@ -179,31 +225,92 @@
|
|||
</div>
|
||||
</div>
|
||||
<section class="relative mx-auto lg:py-6 px-6 text-white">
|
||||
{#each $bundle.spec.stages.filter(s => s.livestream) as stage, i}
|
||||
<div use:scrollRef={stage.id} id="{stage.id}" class="mb-8 bg-blue-web-bg/90 p-4 rounded-lg shadow-xl">
|
||||
{#each $bundle.spec.stages.filter((s) => s.livestream) as stage, i}
|
||||
<div
|
||||
use:scrollRef={stage.id}
|
||||
id={stage.id}
|
||||
class="mb-8 bg-blue-web-bg/90 p-4 rounded-lg shadow-xl"
|
||||
>
|
||||
<div class="md:flex gap-4">
|
||||
<h1 class="uppercase text-2xl font-bold"><a use:scrollTo={stage.id} on:click={() => startStream(stage.id) }>Stream #{i+1} - {stage.name}</a></h1>
|
||||
<div class="my-auto mt-2 md:mt-0 text-sm flex-1 md:text-right"><a href={stageStatus[stage.id].scheduleLink} class="hover:underline" target="_blank">Program tohoto sálu ({stage.name})</a></div>
|
||||
<h1 class="uppercase text-2xl font-bold">
|
||||
<a use:scrollTo={stage.id} on:click={() => startStream(stage.id)}
|
||||
>Stream #{i + 1} - {stage.name}</a
|
||||
>
|
||||
</h1>
|
||||
<div class="my-auto mt-2 md:mt-0 text-sm flex-1 md:text-right">
|
||||
<a
|
||||
href={stageStatus[stage.id].scheduleLink}
|
||||
class="hover:underline"
|
||||
target="_blank">Program tohoto sálu ({stage.name})</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-6 mt-4 flex-wrap xl:flex-nowrap">
|
||||
<div>
|
||||
<YouTube videoId={stageStatus[stage.id].stream.name} class="bg-blue-web-bg/60" id="player-{stage.id}" options={Object.assign({}, YToptions)} bind:player={stagePlayers[stage.id]} on:play={() => youtubePlayed(stage.id)} />
|
||||
<YouTube
|
||||
videoId={stageStatus[stage.id].stream.name}
|
||||
class="bg-blue-web-bg/60"
|
||||
id="player-{stage.id}"
|
||||
options={Object.assign({}, YToptions)}
|
||||
bind:player={stagePlayers[stage.id]}
|
||||
on:play={() => youtubePlayed(stage.id)}
|
||||
/>
|
||||
</div>
|
||||
<div class="pr-2 w-full">
|
||||
{#each [stageStatus[stage.id]] as ss}
|
||||
<div>
|
||||
{#if ss.current}
|
||||
<div class="uppercase text-xs mb-2 font-semibold flex flex-wrap gap-2">
|
||||
<div
|
||||
class="uppercase text-xs mb-2 font-semibold flex flex-wrap gap-2"
|
||||
>
|
||||
<div class="my-auto whitespace-nowrap">Právě probíhá</div>
|
||||
<div class="my-auto"><EventTypeLabel event={ss.current._event} black={true} /></div>
|
||||
<div class="my-auto">
|
||||
<EventTypeLabel
|
||||
event={ss.current._event}
|
||||
black={true}
|
||||
/>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-3 dark:bg-gray-700 mb-3 mt-3">
|
||||
<div class="{typeColor(ss.current._event.type)} h-3 rounded-full transition-all" style="width: {ss.currentPercentage}%"></div>
|
||||
</div>
|
||||
<div class="text-xl"><span class="text-white/70">{format(new Date(ss.current.period.start), 'HH:mm')}-{format(new Date(ss.current.period.end), 'HH:mm')}</span> <a href="/udalosti?id={ss.current.event}" class="hover:underline" target="_blank">{ss.current._event.name}</a></div>
|
||||
<div
|
||||
class="w-full bg-gray-200 rounded-full h-3 dark:bg-gray-700 mb-3 mt-3"
|
||||
>
|
||||
<div
|
||||
class="{typeColor(
|
||||
ss.current._event.type
|
||||
)} h-3 rounded-full transition-all"
|
||||
style="width: {ss.currentPercentage}%"
|
||||
/>
|
||||
</div>
|
||||
<div class="text-xl">
|
||||
<span class="text-white/70"
|
||||
>{format(
|
||||
new Date(ss.current.period.start),
|
||||
"HH:mm"
|
||||
)}-{format(
|
||||
new Date(ss.current.period.end),
|
||||
"HH:mm"
|
||||
)}</span
|
||||
>
|
||||
<a
|
||||
href="/udalosti?id={ss.current.event}"
|
||||
class="hover:underline"
|
||||
target="_blank">{ss.current._event.name}</a
|
||||
>
|
||||
</div>
|
||||
<div class="flex flex-wrap mt-2 gap-3">
|
||||
{#each ss.current._event.speakers.map(sp => findSpeaker(sp, $bundle)) as speaker}
|
||||
<div class="flex gap-2"><Avatar speaker={speaker} size="extra-small" /><div><a href="/lide?id={speaker.id}" target="_blank" class="hover:underline">{speaker.name} {#if speaker.nickname}({speaker.nickname}){/if}</a></div></div>
|
||||
{#each ss.current._event.speakers.map( (sp) => findSpeaker(sp, $bundle) ) as speaker}
|
||||
<div class="flex gap-2">
|
||||
<Avatar {speaker} size="extra-small" />
|
||||
<div>
|
||||
<a
|
||||
href="/lide?id={speaker.id}"
|
||||
target="_blank"
|
||||
class="hover:underline"
|
||||
>{speaker.name}
|
||||
{#if speaker.nickname}({speaker.nickname}){/if}</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if ss.current._event.description}
|
||||
|
@ -212,26 +319,62 @@
|
|||
<SvelteMarkdown source={spoiler.md} {renderers} />
|
||||
{#if spoiler.stripped}
|
||||
<div class="text-sm text-white/30">
|
||||
(<a href="/udalosti?id={ss.current.event}" target="_blank">Zobrazit celý popis</a>)
|
||||
(<a
|
||||
href="/udalosti?id={ss.current.event}"
|
||||
target="_blank">Zobrazit celý popis</a
|
||||
>)
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
{/if}
|
||||
<div class="text-sm mt-3 text-white/50">{@html ss.current._event.tags.map(t => `<a href="/seznam-udalosti?tag=${t}" target="_blank" class="hover:underline">#${t}</a>`).join(' ')}</div>
|
||||
|
||||
<div class="text-sm mt-3 text-white/50">
|
||||
{@html ss.current._event.tags
|
||||
.map(
|
||||
(t) =>
|
||||
`<a href="/seznam-udalosti?tag=${t}" target="_blank" class="hover:underline">#${t}</a>`
|
||||
)
|
||||
.join(" ")}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="text-xl italic">☕ Přestávka {#if ss.next[0]}do {format(new Date(ss.next[0].period.start), 'HH:mm')}{/if}</div>
|
||||
<div class="text-xl italic">
|
||||
☕ Přestávka {#if ss.next[0]}do {format(
|
||||
new Date(ss.next[0].period.start),
|
||||
"HH:mm"
|
||||
)}{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
<div class="uppercase text-xs mb-2 font-semibold mt-6"><a href="{stageStatus[stage.id].scheduleLink}" target="_blank">Následuje</div>
|
||||
<div class="uppercase text-xs mb-2 font-semibold mt-6">
|
||||
<a href={stageStatus[stage.id].scheduleLink} target="_blank"
|
||||
>Následuje</a
|
||||
>
|
||||
</div>
|
||||
<div class="text-sm 2xl:text-base">
|
||||
{#each stageStatus[stage.id].next as ne}
|
||||
<div><span class="text-white/70">{format(new Date(ne.period.start), 'HH:mm')}-{format(new Date(ne.period.end), 'HH:mm')}</span> <a href="/udalosti?id={ne.event}" target="_blank" class="hover:underline">{ne._event.name}</a></div>
|
||||
<div>
|
||||
<span class="text-white/70"
|
||||
>{format(new Date(ne.period.start), "HH:mm")}-{format(
|
||||
new Date(ne.period.end),
|
||||
"HH:mm"
|
||||
)}</span
|
||||
>
|
||||
<a
|
||||
href="/udalosti?id={ne.event}"
|
||||
target="_blank"
|
||||
class="hover:underline">{ne._event.name}</a
|
||||
>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<div class="mt-2 text-xs"><a href="{stageStatus[stage.id].scheduleLink}" class="hover:underline" target="_blank">Zobrazit následující program v tomto sále</a></div>
|
||||
<div class="mt-2 text-xs">
|
||||
<a
|
||||
href={stageStatus[stage.id].scheduleLink}
|
||||
class="hover:underline"
|
||||
target="_blank">Zobrazit následující program v tomto sále</a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,16 +15,18 @@
|
|||
import SvelteMarkdown from "svelte-markdown";
|
||||
import Link from "$lib/Link.svelte";
|
||||
import Paragraph from "$lib/Paragraph.svelte";
|
||||
import EventSchedule from '$lib/EventSchedule.svelte';
|
||||
import EventSchedule from "$lib/EventSchedule.svelte";
|
||||
|
||||
const renderers = { link: Link, paragraph: Paragraph };
|
||||
|
||||
$: id = getId($page.url.search);
|
||||
$: e = $bundle ? $bundle.spec.events.find((ev) => ev.id === id) : null;
|
||||
$: duration = e ? calcDuration(e, $bundle) : null;
|
||||
$: childrens = e ? $bundle.spec.events.filter((i) => i.parent === e.id) : []
|
||||
$: childrens = e ? $bundle.spec.events.filter((i) => i.parent === e.id) : [];
|
||||
|
||||
$: schedule = $bundle ? $bundle.spec.schedule.find(s => s.event === id) : null
|
||||
$: schedule = $bundle
|
||||
? $bundle.spec.schedule.find((s) => s.event === id)
|
||||
: null;
|
||||
|
||||
function getId(search) {
|
||||
const searchParams = new URLSearchParams(search);
|
||||
|
|
|
@ -637,9 +637,11 @@
|
|||
Platební metoda: <span class="font-bold"
|
||||
>{$apiStatus.config.paymentMethods.find(
|
||||
(pm) => pm.id === order.paymentMethod
|
||||
) ? $apiStatus.config.paymentMethods.find(
|
||||
)
|
||||
? $apiStatus.config.paymentMethods.find(
|
||||
(pm) => pm.id === order.paymentMethod
|
||||
).shortname : 'null (?)'}</span
|
||||
).shortname
|
||||
: "null (?)"}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -949,8 +951,11 @@
|
|||
<div class="mt-8">
|
||||
<div class="uppercase text-sm font-bold">Platební metoda</div>
|
||||
<div class="mt-2">
|
||||
{#if $apiStatus.config.paymentMethods.find(pm => pm.id === 'btcpay') && ($apiStatus.config.paymentMethods.find(pm => pm.id === 'btcpay').hidden = true)}
|
||||
<div class="mb-4 text-sm">Platba pomocí BTC není dočasně k dispozici, zkuste to prosím později. Omlouváme se :(</div>
|
||||
{#if $apiStatus.config.paymentMethods.find((pm) => pm.id === "btcpay") && ($apiStatus.config.paymentMethods.find((pm) => pm.id === "btcpay").hidden = true)}
|
||||
<div class="mb-4 text-sm">
|
||||
Platba pomocí BTC není dočasně k dispozici, zkuste to
|
||||
prosím později. Omlouváme se :(
|
||||
</div>
|
||||
{/if}
|
||||
{#each $apiStatus.config.paymentMethods as pm}
|
||||
{#if !pm.hidden}
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
},
|
||||
partner: { title: "Partner", hostTitle: "Host partnera", col: "partners" },
|
||||
host: { title: "Host" },
|
||||
team: { title: "Team", hostTitle: "Host organizátora" }
|
||||
team: { title: "Team", hostTitle: "Host organizátora" },
|
||||
};
|
||||
|
||||
function makeTicketTypeInfo(c) {
|
||||
|
|
Načítá se…
Odkázat v novém úkolu