Add another disclaimer

This commit is contained in:
tree 2023-02-02 23:27:00 +01:00
parent 44b9c86fe2
commit def0074795
9 changed files with 110 additions and 52 deletions

View File

@ -37,11 +37,15 @@
</a>
<div>
{#if !event}
<a
href="/{entry}/event/{(segment.event || event).id}"
class="text-pbw-red hover:underline"
>{(segment.event || event)[event && event.shortname ? 'shortname' : 'name']}</a
>
{#if (segment.event || event).hidden}
{(segment.event || event)[event && event.shortname ? 'shortname' : 'name']}*
{:else}
<a
href="/{entry}/event/{(segment.event || event).id}"
class="text-pbw-red hover:underline"
>{(segment.event || event)[event && event.shortname ? 'shortname' : 'name']}</a
>
{/if}
{:else}
<span class="">{event.shortname || event.name}</span>
{/if}

View File

@ -31,16 +31,14 @@
return it;
}
const _url = (col, item) => `/${entry}/${col}/${item.id}`;
const _url = (col, item) => (item.hidden ? '' : `/${entry}/${col}/${item.id}`);
</script>
{#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'}"
class="{size === 'small' ? 'p-0.5 lg:p-1' : 'p-1 lg:p-1.5'} {!item.hidden
? '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'}
@ -50,6 +48,7 @@
</div>
</div>
{/if}
<a href={_url(col, item)}>
<ItemLogo
{item}
@ -62,9 +61,13 @@
</div>
{#if col !== 'media-partner'}
<div class="mt-2">
<h3 class=" text-pbw-red">
<a href={_url(col, item)} class="hover:underline">{item.shortname || item.name}</a>
</h3>
{#if item.hidden}
{item.shortname || item.name}*
{:else}
<h3 class=" text-pbw-red">
<a href={_url(col, item)} class="hover:underline">{item.shortname || item.name}</a>
</h3>
{/if}
{#if col === 'event'}
<div class="text-xl pbw-text-color-secondary my-2">
<span class="font-bold">{formatItemDate(item)}</span>

View File

@ -0,0 +1,4 @@
<div class="mt-10 mb-4 text-lg pbw-text-color-secondary">
*Not a part of #PBW23. The organizers of this event explicitly declined to be presented as part of
#PBW23. Thus, we list them for context only.
</div>

View File

@ -10,6 +10,16 @@
const segmentMinutes = 60;
const bundle = data.bundle;
let popupWidth;
let timelineWidth;
let selectedSegment = null;
$: selectedSegmentEvents = selectedSegment
? selectedSegment.data.events.map((e) => {
return [eventDetail(e[0]), e[1]];
})
: [];
const days = [];
let currentDate = startDate;
while (compareAsc(new Date(currentDate), new Date(endDate)) <= 0) {
@ -86,8 +96,6 @@
it.perc = it.score / (segmentsMax / 100);
}
let selectedSegment = null;
function makeSelected(day, segment, keys) {
const baseDate = new Date(`${day}T${segment}`);
const title =
@ -126,29 +134,40 @@
class="absolute top-[81px] w-[300px] border dark:border-gray-400 bg-white dark:bg-pbw-dark dark:text-gray-200 z-50 py-2 px-4 {selectedSegment
? 'hidden md:block'
: 'hidden'}"
style="left: {selectedSegment.event.layerX}px;"
style="left: {selectedSegment.event.layerX + popupWidth < timelineWidth
? selectedSegment.event.layerX
: selectedSegment.event.layerX - popupWidth}px;"
bind:clientWidth={popupWidth}
>
<div class="uppercase pbw-text-color-secondary text-lg">{selectedSegment.title}</div>
<div class="text-xl mt-4">
{#each selectedSegment.data.events.map((e) => {
return [eventDetail(e[0]), e[1]];
}) as [item, segmentId]}
<div class="flex gap-2 items-center mb-1">
<div class="">
<ItemLogo {item} width="h-8" />
{#if selectedSegmentEvents.length > 0}
<div class="text-xl mt-4">
{#each selectedSegmentEvents as [item, segmentId]}
<div class="flex gap-2 items-center mb-1">
<div class="">
<ItemLogo {item} width="h-8" />
</div>
<div class="">
{item.shortname || item.name}{#if item.hidden}*{/if}
{#if item.segments[segmentId].title}
- {item.segments[segmentId].title}
{/if}
</div>
</div>
<div class="">
{item.shortname || item.name}
{#if item.segments[segmentId].title}
- {item.segments[segmentId].title}
{/if}
</div>
</div>
{/each}
</div>
{/each}
{#if selectedSegmentEvents.find((e) => e[0].hidden)}
<div class="text-base mt-4 pbw-text-color-secondary">*Not a part of #PBW23</div>
{/if}
</div>
{:else}
<div class="text-lg mt-4 pbw-text-color-secondary">No events</div>
{/if}
</div>
{/if}
<div class="flex text-center text-gray-400 text-sm items-end h-10">
<div
class="flex text-center text-gray-400 text-sm items-end h-10"
bind:clientWidth={timelineWidth}
>
{#each days as day}
<div
class="mb-1 uppercase {highlightDay && highlightDay !== day

View File

@ -7,12 +7,12 @@
export let data;
$: entry = $page.params.entry;
$: conferences = data.bundle.events.filter((e) =>
e.types.find((t) => ['conference', 'hackathon'].includes(t))
);
$: otherEvents = data.bundle.events.filter(
(e) => !e.types.find((t) => ['conference', 'hackathon'].includes(t))
);
$: conferences = data.bundle.events.filter((e) => {
return e.types.find((t) => ['conference', 'hackathon'].includes(t)) && !e.hidden;
});
$: otherEvents = data.bundle.events.filter((e) => {
return !e.types.find((t) => ['conference', 'hackathon'].includes(t)) && !e.hidden;
});
const collections = [
{ title: 'Days', value: 10, col: 'schedule' },
@ -68,8 +68,7 @@
<h2 class="text-2xl uppercase font-bold mt-10 pbw-text-color-secondary">
<a href="/{entry}/speakers">Speakers</a> ({data.bundle.speakers.length})
</h2>
<Disclaimer type="speakers" />
<h2 class="text-xl uppercase font-bold mt-10 pbw-text-color-secondary">International 🌎</h2>
<!--h2 class="text-xl uppercase font-bold mt-10 pbw-text-color-secondary">International 🌎</h2>
<div
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
>
@ -81,7 +80,7 @@
</div>
<h2 class="text-xl uppercase font-bold mt-10 pbw-text-color-secondary">
Local - Czech 🇨🇿 & Slovak 🇸🇰
</h2>
</h2-->
<div
class="grid grid-cols-3 sm:grid-cols-3 md:grid-cols-6 xl:grid-cols-8 my-6 text-center text-xl"
>

View File

@ -13,6 +13,7 @@
import TimelineHeatmap from '$lib/components/TimelineHeatmap.svelte';
import ItemLogo from '$lib/components/ItemLogo.svelte';
import Disclaimer from '$lib/components/Disclaimer.svelte';
import DisclaimerHidden from '$lib/components/DisclaimerHidden.svelte';
import { compareAsc, compareDesc, addMinutes } from 'date-fns';
import { writable } from 'svelte/store';
@ -73,9 +74,6 @@
<h2 class="text-2xl uppercase font-bold pbw-text-color-secondary">
{tc.title} ({processedItems.length})
</h2>
{#if ['events', 'speakers'].includes(type)}
<Disclaimer {type} />
{/if}
<div class="text-xl mt-6 pbw-text-color-base">
<table class="w-full table-auto">
<thead>
@ -127,9 +125,14 @@
</td>
<td class="text-lg md:text-2xl flex items-center h-12">
<div class="">
<a href="/{entry}/{tc.model}/{item.id}" class="text-pbw-red hover:underline"
>{item.name}</a
>
{#if item.hidden}
{item.name}*
{:else}
<a
href="/{entry}/{tc.model}/{item.id}"
class="text-pbw-red hover:underline">{item.name}</a
>
{/if}
</div>
<div class="gap-1 items-center ml-4 hidden md:flex">
{#each item.types as type}
@ -251,6 +254,12 @@
</tbody>
</table>
</div>
{#if type === 'events'}
<DisclaimerHidden />
{/if}
{#if ['events', 'speakers'].includes(type)}
<Disclaimer {type} />
{/if}
</div>
</div>
</div>

View File

@ -5,6 +5,7 @@
import CalendarList from '$lib/components/CalendarList.svelte';
import ItemLogo from '$lib/components/ItemLogo.svelte';
import EventTypeBadge from '$lib/components/EventTypeBadge.svelte';
import DisclaimerHidden from '$lib/components/DisclaimerHidden.svelte';
import Footer from '$lib/components/Footer.svelte';
import Header from '$lib/components/Header.svelte';
import SvelteMarkdown from 'svelte-markdown';
@ -430,6 +431,9 @@
img="logo"
/>
</div>
{#if data.bundle.events.filter((e) => e.venues?.includes(item.id)).find((e) => e.hidden)}
<DisclaimerHidden />
{/if}
{/if}
{#if col === 'chain'}
<h2 class="text-2xl uppercase font-bold mt-10 pbw-text-color-secondary">

View File

@ -4,6 +4,8 @@
import CalendarList from '$lib/components/CalendarList.svelte';
import Footer from '$lib/components/Footer.svelte';
import Header from '$lib/components/Header.svelte';
import DisclaimerHidden from '$lib/components/DisclaimerHidden.svelte';
import Disclaimer from '$lib/components/Disclaimer.svelte';
import { format, compareAsc } from 'date-fns';
@ -41,6 +43,15 @@
}
$: segments = makeSegments(data.bundle.events, $page.params.date);
$: haveHiddenEvents = (() => {
for (const s of segments) {
if (s.event && s.event.hidden) {
return true;
}
}
return false;
})();
</script>
<svelte:head>
@ -57,7 +68,7 @@
<h2 class="text-3xl md:text-4xl font-bold pbw-text-color-primary">
{format(new Date($page.params.date), 'MMMM d, yyyy - EEEE')}
</h2>
<div class="mt-10">
<div class="mt-10 mb-12">
<CalendarList
date={$page.params.date}
{segments}
@ -65,8 +76,11 @@
bundle={data.bundle}
/>
</div>
{#if haveHiddenEvents}
<DisclaimerHidden />
{/if}
<Disclaimer type="events" />
</div>
</div>
</div>
<Footer bundle={data.bundle} />

View File

@ -2,6 +2,7 @@
import { page } from '$app/stores';
import TimelineHeatmap from '$lib/components/TimelineHeatmap.svelte';
import Disclaimer from '$lib/components/Disclaimer.svelte';
import DisclaimerHidden from '$lib/components/DisclaimerHidden.svelte';
import CalendarList from '$lib/components/CalendarList.svelte';
import Footer from '$lib/components/Footer.svelte';
import Header from '$lib/components/Header.svelte';
@ -62,7 +63,6 @@
<div class="max-w-7xl mx-auto pt-5 md:pt-10">
<div class="mx-4 xl:mx-0">
<TimelineHeatmap {data} highlightDay={$page.params.date} />
<Disclaimer type="events" />
{#each days as day}
<div class="mb-14">
<h2 class="text-3xl md:text-3xl">
@ -81,6 +81,8 @@
</div>
</div>
{/each}
<DisclaimerHidden />
<Disclaimer type="events" />
</div>
</div>
</div>