diff --git a/src/lib/components/ArticleAside.svelte b/src/lib/components/ArticleAside.svelte index d6d8643..665a96c 100644 --- a/src/lib/components/ArticleAside.svelte +++ b/src/lib/components/ArticleAside.svelte @@ -2,8 +2,25 @@ import { t, dateToLocalizedString } from '$i18n/i18n'; import { MemberLink, Tree } from '$components'; import type { Blog, Event, Resource, Project, Meeting } from '$lib/types'; + import { onMount } from 'svelte'; export let content: Blog | Event | Resource | Project | Meeting; + + onMount(() => { + const dialog = document.querySelector('dialog'); + const button = document.querySelector('button.register'); + + if (dialog && button) { + button.addEventListener('click', () => { + dialog.showModal(); + }); + dialog.addEventListener('click', (e) => { + if (e.target === dialog) { + dialog.close(); + } + }); + } + });
{$t('news.noRegistration')}
@@ -137,6 +156,18 @@ {/if} +{#if content.meta.kind === 'event' && content.meta.recurrent === 'clinique'} + +{/if} +