Places
This commit is contained in:
rodič
2f75b86ee1
revize
0254415b9c
|
@ -45,6 +45,9 @@
|
||||||
{#if col === "union"}
|
{#if col === "union"}
|
||||||
<div class="text-base text-gray-500 my-2"><SvelteMarkdown source={item.description} /></div>
|
<div class="text-base text-gray-500 my-2"><SvelteMarkdown source={item.description} /></div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if col === "place"}
|
||||||
|
<div class="text-xl text-gray-500 my-2">{item.capacity} ppl</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
export const config = {
|
export const config = {
|
||||||
collections: {
|
collections: {
|
||||||
|
places: {
|
||||||
|
title: "Places",
|
||||||
|
model: "place"
|
||||||
|
},
|
||||||
events: {
|
events: {
|
||||||
title: "Events",
|
title: "Events",
|
||||||
model: "event"
|
model: "event"
|
||||||
|
|
|
@ -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">
|
<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} />
|
<CollectionList arr={data.bundle.speakers.filter(s => ['cz', 'sk'].includes(s.country))} entry={entry} />
|
||||||
</div>
|
</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}
|
{#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>
|
<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">
|
<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">
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
|
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
|
||||||
<div class="mx-4 xl:mx-0">
|
<div class="mx-4 xl:mx-0">
|
||||||
<div class="flex gap-8 mb-10">
|
<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>
|
||||||
<div class="flex flex-wrap md:flex-nowrap w-full">
|
<div class="flex flex-wrap md:flex-nowrap w-full">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,14 +6,9 @@
|
||||||
import Footer from '$lib/components/Footer.svelte';
|
import Footer from '$lib/components/Footer.svelte';
|
||||||
import SvelteMarkdown from 'svelte-markdown';
|
import SvelteMarkdown from 'svelte-markdown';
|
||||||
import { formatItemDate, bareDomain, getFlagEmoji } from '$lib/utils.js';
|
import { formatItemDate, bareDomain, getFlagEmoji } from '$lib/utils.js';
|
||||||
|
import { config } from '$lib/pbw';
|
||||||
|
|
||||||
const colsDef = {
|
const colsDef = Object.fromEntries(Object.keys(config.collections).map(col => { return [ config.collections[col].model, col ]}))
|
||||||
union: "unions",
|
|
||||||
event: "events",
|
|
||||||
speaker: "speakers",
|
|
||||||
"media-partner": "media-partners",
|
|
||||||
benefit: "benefits",
|
|
||||||
}
|
|
||||||
|
|
||||||
const speakerLinks = {
|
const speakerLinks = {
|
||||||
twitter: { col: x => x.twitter ? 'https://twitter.com/'+x.twitter : null },
|
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="max-w-7xl mx-auto pt-5 md:pt-10">
|
||||||
<div class="mx-4 xl:mx-0">
|
<div class="mx-4 xl:mx-0">
|
||||||
<div class="flex gap-8 mb-10">
|
<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>
|
||||||
<div class="flex flex-wrap md:flex-nowrap w-full">
|
<div class="flex flex-wrap md:flex-nowrap w-full">
|
||||||
|
|
||||||
|
@ -45,9 +40,9 @@
|
||||||
<img src={item.logo} class="rounded-xl" alt={item.name} />
|
<img src={item.logo} class="rounded-xl" alt={item.name} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if item.photoUrl}
|
{#if item.photoUrl || item.photo}
|
||||||
<div class="w-48 mr-5">
|
<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>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex-grow">
|
<div class="flex-grow">
|
||||||
|
@ -123,6 +118,36 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/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}
|
{#if item.links}
|
||||||
<div class="flex flex-wrap gap-4 mt-4 text-xl">
|
<div class="flex flex-wrap gap-4 mt-4 text-xl">
|
||||||
{#each Object.keys(item.links) as lk}
|
{#each Object.keys(item.links) as lk}
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu