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 71
71
<calendar-icon size =" 1rem" color =" white" class =" mr-2xsmall" style =" transform : translateY (-2px )" />
72
72
{{ getDateString(new Date(event.date), new Date(event.dateEnd)) }}
73
73
</div >
74
- <div v-if =" event.location.trim() !== ''" class =" flex" >
74
+ <div v-if =" event.location && event.location .trim() !== ''" class =" flex" >
75
75
<marker-icon class =" mr-2xsmall" size =" 1rem" style =" transform : translateY (3px )" />
76
76
{{ event.location }}
77
77
</div >
@@ -152,6 +152,9 @@ export default {
152
152
}
153
153
},
154
154
async mounted () {
155
+ this .$refs .container .addEventListener (' click' , () => {
156
+ window .plausible (' Interact' , { props: { section: ' Calendar' } })
157
+ }, { passive: true })
155
158
this .events = (await getEvents ()).sort ((a , b ) => {
156
159
if (new Date (a .date ) < new Date (b .date )) return - 1
157
160
return 1
@@ -180,7 +183,7 @@ export default {
180
183
})
181
184
},
182
185
expand (target ) {
183
- if (! this .expanded ) {
186
+ if (! this .expanded && target ) {
184
187
setTimeout (() => {
185
188
const bottomVisible = (window .innerHeight - target .getBoundingClientRect ().bottom ) > 30
186
189
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 {
64
64
}
65
65
},
66
66
async mounted () {
67
+ this .$refs .container .addEventListener (' click' , () => {
68
+ window .plausible (' Interact' , { props: { section: ' News' } })
69
+ }, { passive: true })
67
70
this .news = (await getNews ()).sort ((a , b ) => {
68
71
if (new Date (a .date ) > new Date (b .date )) return - 1
69
72
return 1
You can’t perform that action at this time.
0 commit comments