From a4681e6601a2c4e9e602d37b94d995dab2adba79 Mon Sep 17 00:00:00 2001 From: samipe Date: Sun, 5 May 2024 18:56:31 +0300 Subject: [PATCH] bug fixes --- src/components/Calendar.vue | 7 +++++-- src/components/News.vue | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Calendar.vue b/src/components/Calendar.vue index f6bc98f0..22c97780 100644 --- a/src/components/Calendar.vue +++ b/src/components/Calendar.vue @@ -71,7 +71,7 @@ {{ getDateString(new Date(event.date), new Date(event.dateEnd)) }} -
+
{{ event.location }}
@@ -152,6 +152,9 @@ export default { } }, async mounted() { + this.$refs.container.addEventListener('click', () => { + window.plausible('Interact', { props: { section: 'Calendar' } }) + }, { passive: true }) this.events = (await getEvents()).sort((a, b) => { if (new Date(a.date) < new Date(b.date)) return -1 return 1 @@ -180,7 +183,7 @@ export default { }) }, expand(target) { - if (!this.expanded) { + if (!this.expanded && target) { setTimeout(() => { const bottomVisible = (window.innerHeight - target.getBoundingClientRect().bottom) > 30 if (!bottomVisible) this.$refs.container.scrollIntoView({ behavior: 'smooth', block: 'end' }) diff --git a/src/components/News.vue b/src/components/News.vue index 177949bc..5c7dbc45 100644 --- a/src/components/News.vue +++ b/src/components/News.vue @@ -64,6 +64,9 @@ export default { } }, async mounted() { + this.$refs.container.addEventListener('click', () => { + window.plausible('Interact', { props: { section: 'News' } }) + }, { passive: true }) this.news = (await getNews()).sort((a, b) => { if (new Date(a.date) > new Date(b.date)) return -1 return 1