mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig.space.git
synced 2025-12-13 16:26:50 +00:00
Meetups: Add list with upcoming meetups
This commit is contained in:
@@ -53,7 +53,7 @@ const toggleModal = modalId => {
|
||||
}
|
||||
|
||||
const onMeetupMapMarkerClick = (m, modalId) => {
|
||||
console.log(modalId, m)
|
||||
console.log(m)
|
||||
const city = m.city ? m.city.trim() : ''
|
||||
const date = m.event ? new Date(`${m.event.start}Z`) : null
|
||||
const webUrl = m.url != m.websiteUrl ? m.websiteUrl : null
|
||||
@@ -161,4 +161,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
document.querySelectorAll('[data-modal]').forEach(modalLink => {
|
||||
modalLink.addEventListener('click', e => toggleModal(modalLink.dataset.modal))
|
||||
})
|
||||
|
||||
document.querySelectorAll('[data-meetup]').forEach(meetupLink => {
|
||||
meetupLink.addEventListener('click', e => {
|
||||
const meetup = JSON.parse(meetupLink.dataset.meetup)
|
||||
if (meetup) {
|
||||
e.preventDefault()
|
||||
onMeetupMapMarkerClick(meetup, modalId)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user