File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 7171 <calendar-icon size =" 1rem" color =" white" class =" mr-2xsmall" style =" transform : translateY (-2px )" />
7272 {{ getDateString(new Date(event.date), new Date(event.dateEnd)) }}
7373 </div >
74- <div v-if =" event.location.trim() !== ''" class =" flex" >
74+ <div v-if =" event.location && event.location .trim() !== ''" class =" flex" >
7575 <marker-icon class =" mr-2xsmall" size =" 1rem" style =" transform : translateY (3px )" />
7676 {{ event.location }}
7777 </div >
@@ -152,6 +152,9 @@ export default {
152152 }
153153 },
154154 async mounted () {
155+ this .$refs .container .addEventListener (' click' , () => {
156+ window .plausible (' Interact' , { props: { section: ' Calendar' } })
157+ }, { passive: true })
155158 this .events = (await getEvents ()).sort ((a , b ) => {
156159 if (new Date (a .date ) < new Date (b .date )) return - 1
157160 return 1
@@ -180,7 +183,7 @@ export default {
180183 })
181184 },
182185 expand (target ) {
183- if (! this .expanded ) {
186+ if (! this .expanded && target ) {
184187 setTimeout (() => {
185188 const bottomVisible = (window .innerHeight - target .getBoundingClientRect ().bottom ) > 30
186189 if (! bottomVisible) this .$refs .container .scrollIntoView ({ behavior: ' smooth' , block: ' end' })
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ export default {
6464 }
6565 },
6666 async mounted () {
67+ this .$refs .container .addEventListener (' click' , () => {
68+ window .plausible (' Interact' , { props: { section: ' News' } })
69+ }, { passive: true })
6770 this .news = (await getNews ()).sort ((a , b ) => {
6871 if (new Date (a .date ) > new Date (b .date )) return - 1
6972 return 1
You can’t perform that action at this time.
0 commit comments