This commit is contained in:
tree 2023-01-28 02:44:35 +01:00
rodič 2f75b86ee1
revize 0254415b9c
5 změnil soubory, kde provedl 47 přidání a 11 odebrání

Zobrazit soubor

@ -45,6 +45,9 @@
{#if col === "union"}
<div class="text-base text-gray-500 my-2"><SvelteMarkdown source={item.description} /></div>
{/if}
{#if col === "place"}
<div class="text-xl text-gray-500 my-2">{item.capacity} ppl</div>
{/if}
</div>
{/if}
</div>

Zobrazit soubor

@ -1,5 +1,9 @@
export const config = {
collections: {
places: {
title: "Places",
model: "place"
},
events: {
title: "Events",
model: "event"

Zobrazit soubor

@ -33,6 +33,10 @@
<div class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl">
<CollectionList arr={data.bundle.speakers.filter(s => ['cz', 'sk'].includes(s.country))} entry={entry} />
</div>
<h2 class="text-2xl uppercase font-bold mt-10 text-gray-500"><a href="/{entry}/places">Places</a> ({data.bundle.places.length})</h2>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-6 my-6 text-center text-2xl">
<CollectionList arr={data.bundle.places} col="place" img="photo" entry={entry} />
</div>
{#if data.bundle.benefits}
<h2 class="text-2xl uppercase font-bold text-gray-500"><a href="/{entry}/benefits">Benefits for visitors</a> ({data.bundle.benefits.length})</h2>
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-6 my-6 text-center text-xl mb-8">

Zobrazit soubor

@ -49,7 +49,7 @@
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
<div class="mx-4 xl:mx-0">
<div class="flex gap-8 mb-10">
<h1 class="text-5xl uppercase font-bold text-pbw-red"><a href="/{$page.params.entry}">#PBW23</a></h1>
<h1 class="text-5xl font-bold text-pbw-red"><a href="/{$page.params.entry}">#PBW23</a><span class="text-pbw-yellow">.{$page.params.type}</span></h1>
</div>
<div class="flex flex-wrap md:flex-nowrap w-full">
</div>

Zobrazit soubor

@ -6,14 +6,9 @@
import Footer from '$lib/components/Footer.svelte';
import SvelteMarkdown from 'svelte-markdown';
import { formatItemDate, bareDomain, getFlagEmoji } from '$lib/utils.js';
import { config } from '$lib/pbw';
const colsDef = {
union: "unions",
event: "events",
speaker: "speakers",
"media-partner": "media-partners",
benefit: "benefits",
}
const colsDef = Object.fromEntries(Object.keys(config.collections).map(col => { return [ config.collections[col].model, col ]}))
const speakerLinks = {
twitter: { col: x => x.twitter ? 'https://twitter.com/'+x.twitter : null },
@ -36,7 +31,7 @@
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
<div class="mx-4 xl:mx-0">
<div class="flex gap-8 mb-10">
<h1 class="text-5xl uppercase font-bold text-pbw-red"><a href="/{$page.params.entry}">#PBW23</a></h1>
<h1 class="text-5xl font-bold text-pbw-red"><a href="/{$page.params.entry}">#PBW23</a><span class="text-pbw-yellow">.{$page.params.type}s</span></h1>
</div>
<div class="flex flex-wrap md:flex-nowrap w-full">
@ -45,9 +40,9 @@
<img src={item.logo} class="rounded-xl" alt={item.name} />
</div>
{/if}
{#if item.photoUrl}
{#if item.photoUrl || item.photo}
<div class="w-48 mr-5">
<img src={item.photoUrl} class="rounded-xl" alt={item.name} />
<img src={item.photoUrl || item.photo} class="rounded-xl aspect-square object-cover" alt={item.name} />
</div>
{/if}
<div class="flex-grow">
@ -123,6 +118,36 @@
{/if}
</div>
{/if}
{#if col === 'place'}
<div class="flex flex-wrap gap-6 text-xl mt-4">
{#if item.address}
<div>
<div class="uppercase text-sm opacity-40">Address</div>
<div class="flex gap-2">
{item.address}
</div>
</div>
{/if}
{#if item.capacity}
<div>
<div class="uppercase text-sm opacity-40">Capacity</div>
<div class="flex gap-2">
{item.capacity} ppl
</div>
</div>
{/if}
{#if item.eventTypes && item.eventTypes.length > 0}
<div>
<div class="uppercase text-sm opacity-40">Event Types</div>
<div class="flex gap-2">
{#each item.eventTypes as type}
<div>{type}</div>
{/each}
</div>
</div>
{/if}
</div>
{/if}
{#if item.links}
<div class="flex flex-wrap gap-4 mt-4 text-xl">
{#each Object.keys(item.links) as lk}