2024-03-06 21:33:24 +01:00
|
|
|
<script>
|
|
|
|
|
|
|
|
import core from '../core.json';
|
2024-03-16 19:40:59 +01:00
|
|
|
import genImages from '../gen-images.json';
|
|
|
|
|
2024-03-06 21:33:24 +01:00
|
|
|
import { dateFormat } from '../lib/events.js';
|
|
|
|
import { marked } from 'marked';
|
2024-03-16 06:11:38 +01:00
|
|
|
import { onMount, afterUpdate } from 'svelte';
|
2024-03-06 21:33:24 +01:00
|
|
|
import { writable } from 'svelte/store';
|
|
|
|
|
|
|
|
import Square from './event-formats/square.svelte';
|
|
|
|
import WideSquare from './event-formats/wide-square.svelte';
|
|
|
|
import Wide from './event-formats/wide.svelte';
|
|
|
|
import SquareSpeaker from './event-formats/square-speaker.svelte';
|
|
|
|
import Poster from './event-formats/poster.svelte';
|
|
|
|
import PosterSimple from './event-formats/poster-simple.svelte';
|
|
|
|
|
|
|
|
const topics = [
|
|
|
|
'identity',
|
2024-03-06 23:11:20 +01:00
|
|
|
'network states',
|
|
|
|
'fullstack privacy',
|
2024-03-06 21:33:24 +01:00
|
|
|
'private messaging',
|
|
|
|
'r&d: ZK, MPC, THE',
|
|
|
|
'on-chain privacy',
|
|
|
|
'regulation vs. privacy',
|
|
|
|
'lunarpunk vs. solarpunk',
|
|
|
|
'human rights daos',
|
|
|
|
'privacy activism',
|
|
|
|
]
|
|
|
|
|
2024-03-07 14:39:18 +01:00
|
|
|
/*const events = {
|
2024-03-07 11:41:34 +01:00
|
|
|
s23prg: { image: 'summit01' },
|
2024-03-06 22:28:23 +01:00
|
|
|
m24buc: { image: 'bucharest01' },
|
2024-03-06 21:54:37 +01:00
|
|
|
m24ath: { image: 'athens01' },
|
|
|
|
m24ams: { image: 'amsterdam01' },
|
2024-03-06 21:58:07 +01:00
|
|
|
m24tll: { image: 'tallinn01' },
|
2024-03-06 21:54:37 +01:00
|
|
|
m24opo: { image: 'porto01' },
|
2024-03-06 22:28:23 +01:00
|
|
|
m24ber: { image: 'berlin02' },
|
2024-03-06 23:11:20 +01:00
|
|
|
s24prg: { image: 'summit02' },
|
2024-03-06 22:28:23 +01:00
|
|
|
m24lju: { image: 'ljubljana01' },
|
|
|
|
m24bcn: { image: 'barcelona01' },
|
|
|
|
m24cph: { image: 'copenhagen01' },
|
2024-03-06 21:54:37 +01:00
|
|
|
m24rom: { image: 'rome01' },
|
|
|
|
s24brn: { image: 'brno01' },
|
2024-03-07 14:39:18 +01:00
|
|
|
}*/
|
2024-03-06 21:33:24 +01:00
|
|
|
|
|
|
|
let searchParams = null
|
2024-03-06 21:54:37 +01:00
|
|
|
|
2024-03-06 21:33:24 +01:00
|
|
|
//let eventSelected = core.events[0].id;
|
|
|
|
const eventSelected = writable('');
|
|
|
|
const speakerSelected = writable('alona-shevchenko');
|
2024-03-07 12:31:03 +01:00
|
|
|
const imageSelected = writable('');
|
2024-03-06 21:33:24 +01:00
|
|
|
|
|
|
|
onMount(() => {
|
|
|
|
searchParams = new URL(document.location).searchParams;
|
|
|
|
|
|
|
|
const id = searchParams.get('id');
|
|
|
|
if (id) {
|
|
|
|
eventSelected.set(id);
|
|
|
|
}
|
|
|
|
const speaker = searchParams.get('speaker');
|
|
|
|
if (speaker) {
|
|
|
|
speakerSelected.set(speaker);
|
|
|
|
}
|
2024-03-07 12:31:03 +01:00
|
|
|
const img = searchParams.get('img');
|
|
|
|
if (img) {
|
|
|
|
imageSelected.set(img);
|
2024-03-16 06:51:32 +01:00
|
|
|
updateImages();
|
2024-03-07 12:31:03 +01:00
|
|
|
}
|
2024-03-06 21:33:24 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
eventSelected.subscribe((id, next) => {
|
|
|
|
const event = core.events.find(e => e.id === id);
|
|
|
|
if (!event) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (event.speakers?.length > 0) {
|
|
|
|
speakerSelected.set(event.speakers[0]);
|
|
|
|
}
|
2024-03-07 14:39:18 +01:00
|
|
|
if (event.design?.image) {
|
|
|
|
imageSelected.set(event.design.image);
|
2024-03-07 16:21:30 +01:00
|
|
|
} else {
|
|
|
|
imageSelected.set('');
|
2024-03-07 14:39:18 +01:00
|
|
|
}
|
2024-03-06 21:33:24 +01:00
|
|
|
return next
|
|
|
|
})
|
|
|
|
|
2024-03-07 14:39:18 +01:00
|
|
|
function getImageUrl(img) {
|
|
|
|
return `/gen-img/events/${img}.png`
|
2024-03-06 21:33:24 +01:00
|
|
|
}
|
|
|
|
|
2024-03-07 14:39:18 +01:00
|
|
|
$: image = $imageSelected ? getImageUrl($imageSelected) : '';
|
2024-03-06 21:33:24 +01:00
|
|
|
$: event = core.events.find(e => e.id === $eventSelected);
|
|
|
|
$: speaker = core.people.find(p => p.id === $speakerSelected);
|
2024-03-16 19:40:59 +01:00
|
|
|
$: imgSrc = genImages[$imageSelected];
|
2024-03-06 21:33:24 +01:00
|
|
|
|
|
|
|
const tools = {
|
|
|
|
dateFormat
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-full p-10">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
Event:
|
|
|
|
<select bind:value={$eventSelected} class="text-black">
|
|
|
|
<option value="">---</option>
|
2024-03-07 14:39:18 +01:00
|
|
|
{#each core.events as e}
|
2024-03-06 21:33:24 +01:00
|
|
|
<option value={e.id}>[{e.id}] {e.type} {e.city} - {dateFormat(e.date)}</option>
|
|
|
|
{/each}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<!--div>
|
|
|
|
Image:
|
|
|
|
<select bind:value={imageSelected} class="text-black">
|
|
|
|
{#each Object.keys(images) as image}
|
|
|
|
<option value={image}>{image}</option>
|
|
|
|
{/each}
|
|
|
|
</select>
|
|
|
|
</div-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{#if !$eventSelected}
|
2024-03-07 12:08:01 +01:00
|
|
|
<div class="w-full px-10">
|
2024-03-06 21:33:24 +01:00
|
|
|
Please select event.
|
|
|
|
|
2024-03-07 14:39:18 +01:00
|
|
|
<div class="mt-10 flex flex-wrap gap-4 mb-20">
|
|
|
|
{#each core.events as event}
|
|
|
|
<div>
|
|
|
|
<div class="mb-2 text-[#909090]">{event.id} [{event.design?.image || '-'}]</div>
|
2024-03-16 19:51:44 +01:00
|
|
|
<div class="w-[304px] h-[430px] relative">
|
2024-03-07 16:21:30 +01:00
|
|
|
{#if event.images['poster-simple'] || event.images.poster}
|
|
|
|
<a href="/gen/event?id={event.id}"><img src={event.images['poster-simple'] || event.images.poster} /></a>
|
|
|
|
{:else}
|
2024-03-16 19:51:44 +01:00
|
|
|
<div class="scale-[0.4] absolute -left-[212px] -top-[322px] bg-red-200 {!event.design?.image ? 'opacity-50' : ''}" style="margin-left: -1rem;">
|
|
|
|
<a href="/gen/event?id={event.id}"><PosterSimple {event} image={getImageUrl(event.design?.image)} {tools} imgSrc={genImages[event.design?.image]} /></a>
|
2024-03-07 16:21:30 +01:00
|
|
|
</div>
|
|
|
|
{/if}
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{:else}
|
2024-03-07 16:21:30 +01:00
|
|
|
<div class="px-10 py-0">
|
2024-03-07 12:08:01 +01:00
|
|
|
<a href="/gen/event" class="underline hover:no-underline">Back to events overview</a>
|
2024-03-07 16:21:30 +01:00
|
|
|
<div class="text-2xl mt-6 mb-10"><a href="/event/{event.id}" class="underline hover:no-underline uppercase">[{event.id}] {event.type} {event.city}</a></div>
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
2024-03-07 14:39:18 +01:00
|
|
|
<div class="px-10 py-4">
|
|
|
|
Image:
|
|
|
|
<select bind:value={$imageSelected} class="text-black">
|
|
|
|
<option value="">---</option>
|
2024-03-16 19:40:59 +01:00
|
|
|
{#each Object.keys(genImages) as img}
|
2024-03-07 14:39:18 +01:00
|
|
|
<option value={img}>{img} {#if event.design?.image && event.design.image === img}[fixed]{/if}</option>
|
|
|
|
{/each}
|
|
|
|
</select>
|
|
|
|
</div>
|
2024-03-16 06:11:38 +01:00
|
|
|
|
|
|
|
{#if imgSrc}
|
2024-03-06 21:33:24 +01:00
|
|
|
<div class="w-full flex flex-wrap gap-10 p-10">
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 11:23:15 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Square (1:1)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="w-[400px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<Square {event} {image} {tools} {imgSrc} />
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 11:23:15 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Wide-square (4:3)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="h-[400px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<WideSquare {event} {image} {tools} {imgSrc} />
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 11:23:15 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Wide (16:9)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="h-[400px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<Wide {event} {image} {tools} {imgSrc} />
|
2024-03-07 11:23:15 +01:00
|
|
|
</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 11:23:15 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Square (speaker) (1:1)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
<div class="my-4">
|
|
|
|
Speaker:
|
|
|
|
<select bind:value={$speakerSelected} class="text-black">
|
|
|
|
{#if event.speakers}
|
|
|
|
{#each event.speakers as sp}
|
|
|
|
<option value={sp}>{sp}</option>
|
|
|
|
{/each}
|
|
|
|
{/if}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="w-[400px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<SquareSpeaker {speaker} {event} {image} {tools} {imgSrc} />
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Poster (1:1.414)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="w-[760px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<Poster {topics} {event} {image} {tools} {imgSrc} />
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="mb-4 text-xl text-[#909090]">Poster (simple) (1:1.414)</div>
|
2024-03-06 21:33:24 +01:00
|
|
|
|
2024-03-07 15:24:34 +01:00
|
|
|
<div class="w-[760px]">
|
2024-03-16 06:11:38 +01:00
|
|
|
<PosterSimple {event} {image} {tools} {imgSrc} />
|
2024-03-06 21:33:24 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-16 06:11:38 +01:00
|
|
|
{/if}
|
2024-03-06 21:33:24 +01:00
|
|
|
{/if}
|