This commit is contained in:
tree🌴 2024-03-06 20:14:55 +01:00
parent 4351c23c58
commit 23d5556688

View file

@ -19,17 +19,21 @@ const topics = [
'privacy activism', 'privacy activism',
] ]
const images = { const images = {
meetup01: {}, meetup01: {},
meetup02: {}, meetup02: {},
summit01: {} summit01: {}
} }
const events = {
m24buc: { image: 'meetup02' },
m24ams: { image: 'meetup01' },
}
let searchParams = null let searchParams = null
let imageSelected = Object.keys(images)[0]; let imageSelected = Object.keys(images)[0];
//let eventSelected = core.events[0].id; //let eventSelected = core.events[0].id;
const eventSelected = writable(core.events[0].id) const eventSelected = writable(Object.keys(events)[0]);
const speakerSelected = writable('alona-shevchenko'); const speakerSelected = writable('alona-shevchenko');
onMount(() => { onMount(() => {
@ -50,7 +54,7 @@ eventSelected.subscribe((id, next) => {
return next return next
}) })
$: image = `/gen-img/events/${imageSelected}.png`; $: image = `/gen-img/events/${events[$eventSelected]?.image}.png`;
$: event = core.events.find(e => e.id === $eventSelected); $: event = core.events.find(e => e.id === $eventSelected);
$: speaker = core.people.find(p => p.id === $speakerSelected); $: speaker = core.people.find(p => p.id === $speakerSelected);
@ -62,19 +66,19 @@ $: speaker = core.people.find(p => p.id === $speakerSelected);
<div> <div>
Event: Event:
<select bind:value={$eventSelected} class="text-black"> <select bind:value={$eventSelected} class="text-black">
{#each core.events as e} {#each Object.keys(events).map(eId => core.events.find(e => e.id === eId)) as e}
<option value={e.id}>[{e.id}] {e.type} {e.city} - {dateFormat(event.date)}</option> <option value={e.id}>[{e.id}] {e.type} {e.city} - {dateFormat(event.date)}</option>
{/each} {/each}
</select> </select>
</div> </div>
<div> <!--div>
Image: Image:
<select bind:value={imageSelected} class="text-black"> <select bind:value={imageSelected} class="text-black">
{#each Object.keys(images) as image} {#each Object.keys(images) as image}
<option value={image}>{image}</option> <option value={image}>{image}</option>
{/each} {/each}
</select> </select>
</div> </div-->
</div> </div>
</div> </div>
<div class="w-full flex flex-wrap gap-10 p-10"> <div class="w-full flex flex-wrap gap-10 p-10">