This commit is contained in:
tree 2023-01-29 13:07:18 +01:00
rodič 2beb3467f8
revize f26d46b84c
2 změnil soubory, kde provedl 17 přidání a 2 odebrání

Zobrazit soubor

@ -10,11 +10,26 @@
export let aspect = "aspect-square";
export let size = "normal";
export let offer = false;
export let bundle;
export let currentItem;
function findObject (it) {
if (col === "speaker" && !it.name) {
let found = null
for (const e of bundle.events) {
if (!e.speakers) continue;
if (currentItem && e.id === currentItem.id) continue;
found = e.speakers.find(s => s.id === it.id)
}
Object.assign(it, found)
}
return it
}
const _url = (col, item) => `/${entry}/${col}/${item.id}`
</script>
{#each arr as item}
{#each arr.map((k) => findObject(k)) as item}
<div class="{size === "small" ? "p-0.5 lg:p-1" : "p-1 lg:p-1.5"} hover:bg-pbw-yellow/20 dark:hover:bg-pbw-white/10 {size==="small" ? "rounded-lg" : "rounded-2xl"}">
<div class="w-full relative">
{#if col === "benefit"}

Zobrazit soubor

@ -262,7 +262,7 @@
{#if item.speakers}
<h2 class="text-2xl uppercase font-bold mt-10 text-gray-500">Speakers ({item.speakers?.length || 0})</h2>
<div class="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 xl:grid-cols-8 mt-4 text-center text-xl">
<CollectionList arr={item.speakers} />
<CollectionList arr={item.speakers} bundle={data.bundle} currentItem={item} />
</div>
{/if}
{#if item.events}