Update
This commit is contained in:
rodič
cdc0fc58cb
revize
c2212dad26
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
<div class="transition-all mb-4 border px-3 py-2 rounded-md shadow {$userData.favoriteEvents.includes(e.id) ? 'bg-yellow-100' : '' }" >
|
<div class="transition-all mb-4 border px-3 py-2 rounded-md shadow {$userData.favoriteEvents.includes(e.id) ? 'bg-yellow-100' : '' }" >
|
||||||
<div class="float-right"><i class="fa-star {$userData.favoriteEvents.includes(e.id) ? 'fa-solid' : 'fa-regular'} cursor-pointer" utxo-event-id="{e.id}" on:click={handleFavorite}></i></div>
|
<div class="float-right"><i class="fa-star {$userData.favoriteEvents.includes(e.id) ? 'fa-solid' : 'fa-regular'} cursor-pointer" utxo-event-id="{e.id}" on:click={handleFavorite}></i></div>
|
||||||
<div class="text-lg font-semibold"><a href="/udalosti?id={e.id}">{e.name}</a></div>
|
<div class="text-lg font-semibold"><a href="/udalosti/{e.id}">{e.name}</a></div>
|
||||||
{#if e.speakers && e.speakers.length > 0}
|
{#if e.speakers && e.speakers.length > 0}
|
||||||
<div class="mt-1 mb-2 flex flex-wrap gap-2">
|
<div class="mt-1 mb-2 flex flex-wrap gap-2">
|
||||||
{#each speakersMap(e.speakers) as s}
|
{#each speakersMap(e.speakers) as s}
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<div class="flex flex-wrap gap-2" cellpadding="5">
|
<div class="flex flex-wrap gap-2" cellpadding="5">
|
||||||
{#each getParents(e) as pe}
|
{#each getParents(e) as pe}
|
||||||
<div class="border rounded py-1.5 px-2.5 bg-gray-100 text-sm">
|
<div class="border rounded py-1.5 px-2.5 bg-gray-100 text-sm">
|
||||||
<div class="font-bold"><a href="/udalosti?id={pe.id}">{pe.name}</a></div>
|
<div class="font-bold"><a href="/udalosti/{pe.id}">{pe.name}</a></div>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
{#if pe.speakers.length === 0}
|
{#if pe.speakers.length === 0}
|
||||||
<div>TBA</div>
|
<div>TBA</div>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import Avatar from '$lib/Avatar.svelte';
|
import Avatar from '$lib/Avatar.svelte';
|
||||||
import Event from '$lib/Event.svelte';
|
import Event from '$lib/Event.svelte';
|
||||||
import { onMount } from 'svelte';
|
import { onMount, beforeUpdate } from 'svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { bundle } from '$lib/stores.js';
|
import { bundle } from '$lib/stores.js';
|
||||||
|
|
||||||
|
@ -18,12 +18,16 @@
|
||||||
$: s = $bundle ? $bundle.spec.speakers.find(s => s.id === id) : null
|
$: s = $bundle ? $bundle.spec.speakers.find(s => s.id === id) : null
|
||||||
$: events = s ? $bundle.spec.events.filter(ev => ev.speakers && ev.speakers.includes(s.id)) : []
|
$: events = s ? $bundle.spec.events.filter(ev => ev.speakers && ev.speakers.includes(s.id)) : []
|
||||||
|
|
||||||
onMount(() => {
|
function loadItem () {
|
||||||
const searchParams = new URLSearchParams($page.url.search)
|
const searchParams = new URLSearchParams($page.url.search)
|
||||||
id = searchParams.get('id')
|
id = searchParams.get('id')
|
||||||
if (!$bundle.spec.speakers.find(s => s.id === id)) {
|
if (!$bundle.spec.speakers.find(s => s.id === id)) {
|
||||||
goto('/')
|
goto('/')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
loadItem()
|
||||||
})
|
})
|
||||||
|
|
||||||
function trackRender (trackId) {
|
function trackRender (trackId) {
|
||||||
|
@ -41,6 +45,10 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>{s ? s.name : ''} | Lidé | {$bundle ? $bundle.name : 'UTXO.22'}</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
||||||
{#if $bundle && s}
|
{#if $bundle && s}
|
||||||
<div class="sm:flex gap-10 mt-4">
|
<div class="sm:flex gap-10 mt-4">
|
||||||
|
|
|
@ -16,12 +16,15 @@
|
||||||
|
|
||||||
$: e = $bundle ? $bundle.spec.events.find(ev => ev.id === id) : null
|
$: e = $bundle ? $bundle.spec.events.find(ev => ev.id === id) : null
|
||||||
|
|
||||||
onMount(() => {
|
function loadItem () {
|
||||||
const searchParams = new URLSearchParams($page.url.search)
|
id = $page.params.id
|
||||||
id = searchParams.get('id')
|
|
||||||
if (!$bundle.spec.events.find(ev => ev.id === id)) {
|
if (!$bundle.spec.events.find(ev => ev.id === id)) {
|
||||||
goto('/program')
|
goto('/program')
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
loadItem()
|
||||||
})
|
})
|
||||||
|
|
||||||
function speakersMap (arr) {
|
function speakersMap (arr) {
|
||||||
|
@ -38,6 +41,10 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>{e ? e.name : ''} | Události | {$bundle ? $bundle.name : 'UTXO.22'}</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
<section class="relative mx-auto py-6 sm:py-10 px-6 max-w-6xl text-blue-web">
|
||||||
{#if $bundle && e}
|
{#if $bundle && e}
|
||||||
<div class="mb-6 flex flex-wrap gap-4">
|
<div class="mb-6 flex flex-wrap gap-4">
|
|
@ -246,7 +246,7 @@
|
||||||
<div class="w-11 h-11 rounded-md" style="background-image: url({makeBlockie(ticket.avatarHash)}); background-size: 100% 100%;"></div>
|
<div class="w-11 h-11 rounded-md" style="background-image: url({makeBlockie(ticket.avatarHash)}); background-size: 100% 100%;"></div>
|
||||||
<div class="w-auto">
|
<div class="w-auto">
|
||||||
<div class="no-flex">
|
<div class="no-flex">
|
||||||
<span class="font-bold px-2 py-1 bg-gray-200 rounded w-auto">#{ticket.id}</span>
|
<span class="px-2 py-1 bg-blue-web text-white rounded w-auto">#{ticket.id}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1.5">Běžná vstupenka</div>
|
<div class="mt-1.5">Běžná vstupenka</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import adapter from '@sveltejs/adapter-static'
|
import adapter from '@sveltejs/adapter-static'
|
||||||
|
|
||||||
|
import bundle from './src/lib/bundle.json' assert {type: "json"}
|
||||||
|
const entries = []
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
kit: {
|
kit: {
|
||||||
|
@ -8,6 +11,13 @@ const config = {
|
||||||
// Override http methods in the Todo forms
|
// Override http methods in the Todo forms
|
||||||
methodOverride: {
|
methodOverride: {
|
||||||
allowed: ['PATCH', 'DELETE']
|
allowed: ['PATCH', 'DELETE']
|
||||||
|
},
|
||||||
|
prerender: {
|
||||||
|
crawl: true,
|
||||||
|
entries: [
|
||||||
|
'*',
|
||||||
|
...entries
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Načítá se…
Odkázat v novém úkolu