Other events collection

This commit is contained in:
tree 2023-02-03 03:23:47 +01:00
parent 578890a72b
commit c9f160a45c
7 changed files with 41 additions and 13 deletions

View File

@ -35,6 +35,10 @@
text-decoration: none;
}
.markdown div > p:not(:last-child) {
padding-bottom: 1em;
}
.external::after {
padding-left: 0.5rem;
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13.5' height='13.5' aria-hidden='true' viewBox='0 0 24 24' class='iconExternalLink_nPIU'%3E%3Cpath fill='currentColor' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'%3E%3C/path%3E%3C/svg%3E");

View File

@ -5,6 +5,7 @@
export let segments;
export let date;
export let col = 'event';
export let entry;
export let bundle;
export let event = null;
@ -32,7 +33,7 @@
</div>
<div class="md:flex gap-2 items-center mb-6 md:mb-0">
<div class="flex gap-2 items-center my-2 md:my-0">
<a href="/{entry}/event/{(segment.event || event).id}">
<a href="/{entry}/{col}/{(segment.event || event).id}">
<ItemLogo item={segment.event || event} width={event ? 'w-8' : 'w-10'} />
</a>
<div>
@ -41,7 +42,7 @@
{(segment.event || event)[event && event.shortname ? 'shortname' : 'name']}*
{:else}
<a
href="/{entry}/event/{(segment.event || event).id}"
href="/{entry}/{col}/{(segment.event || event).id}"
class="text-pbw-red hover:underline"
>{(segment.event || event)[event && event.shortname ? 'shortname' : 'name']}</a
>

View File

@ -30,6 +30,10 @@ export const config = {
chains: {
title: 'Blockchains',
model: 'chain'
},
'other-events': {
title: 'Other events',
model: 'other-event'
}
},
eventTypeColors: {

View File

@ -16,7 +16,7 @@
const collections = [
{ title: 'Days', value: 10, col: 'schedule' },
{ title: 'Events', col: 'events', filter: e => !e.hidden },
{ title: 'Events', col: 'events', filter: (e) => !e.hidden },
{ title: 'Speakers', col: 'speakers' },
{ title: 'Places', col: 'places' },
{ title: 'Media Partners', col: 'media-partners' },
@ -38,7 +38,7 @@
<button
class="border rounded border-pbw-red hover:bg-pbw-red hover:text-white py-2 px-2 text-pbw-red hover:shadow-lg"
>
{cd.value || data.bundle[cd.col]?.filter(cd.filter || (e => e)).length}
{cd.value || data.bundle[cd.col]?.filter(cd.filter || ((e) => e)).length}
{cd.title}
</button>
</a>

View File

@ -72,7 +72,7 @@
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
<div class="mx-4 xl:mx-0">
<h2 class="text-2xl uppercase font-bold pbw-text-color-secondary">
{tc.title} ({processedItems.filter(e => !e.hidden).length})
{tc.title} ({processedItems.filter((e) => !e.hidden).length})
</h2>
<div class="text-xl mt-6 pbw-text-color-base">
<table class="w-full table-auto">

View File

@ -65,7 +65,7 @@
<h1 class="pbw-text-color-primary text-4xl md:text-5xl font-bold mt-4 md:mt-0">
{item.name}
</h1>
{#if col === 'event'}
{#if col === 'event' || col === 'other-event'}
<div class="text-2xl flex gap-4 mt-2 flex-wrap">
<div class="flex gap-1 items-center">
{#each item.types as type}
@ -117,7 +117,7 @@
{/each}
</div>
{/if}
{#if col === 'event'}
{#if col === 'event' || col === 'other-event'}
<div class="flex flex-wrap gap-6 text-xl mt-4">
{#if item.chains && item.chains.length > 0}
<div>
@ -169,10 +169,12 @@
</div>
</div>
{/if}
<div>
<div class="uppercase text-sm opacity-40">Organizator</div>
<div class="markdown"><SvelteMarkdown source={item.org || 'TBD'} /></div>
</div>
{#if col !== 'other-event'}
<div>
<div class="uppercase text-sm opacity-40">Organizator</div>
<div class="markdown"><SvelteMarkdown source={item.org || 'TBD'} /></div>
</div>
{/if}
{#if item.poc}
<div>
<div class="uppercase text-sm opacity-40">Point of contact</div>

View File

@ -43,6 +43,7 @@
}
$: segments = makeSegments(data.bundle.events, $page.params.date);
$: relatedEvents = makeSegments(data.bundle['other-events'], $page.params.date);
$: haveHiddenEvents = (() => {
for (const s of segments) {
@ -76,9 +77,25 @@
bundle={data.bundle}
/>
</div>
{#if haveHiddenEvents}
<DisclaimerHidden />
<div class="sm:ml-6">
{#if haveHiddenEvents}
<DisclaimerHidden />
{/if}
</div>
{#if relatedEvents && relatedEvents.length > 0}
<h2 class="text-2xl uppercase font-bold pbw-text-color-secondary mt-10">Other events</h2>
<div class="mt-4 mb-12">
<CalendarList
date={$page.params.date}
col="other-event"
segments={relatedEvents}
entry={$page.params.entry}
bundle={data.bundle}
/>
</div>
{/if}
<Disclaimer type="events" />
</div>
</div>