Add meetups, improve map

This commit is contained in:
Dennis Reimann
2021-09-22 09:43:38 +02:00
parent 74eb67bbea
commit 2e2bb086c1
5 changed files with 95 additions and 32 deletions

View File

@@ -65,7 +65,7 @@
--color-body-text: var(--color-neutral-0);
--color-body-bg: var(--color-neutral-90);
--color-card-bg: var(--color-neutral-95);
--color-overlay-bg: rgba(0, 0, 0, .95);
--color-overlay-bg: rgba(20, 20, 20, .95);
}
@media (prefers-color-scheme: dark) {

View File

@@ -1,25 +1,66 @@
@keyframes pulse {
0% { transform: scale(.75); }
1% { transform: scale(1.5); }
3% { transform: scale(.75); }
}
#meetups {
@media (--up_to_L) {
& #map {
& #map {
@media (--up_to_L) {
margin-top: var(--space-xl);
& img {
display: none;
}
}
}
@media (--L_and_up) {
& #map {
@media (--L_and_up) {
position: relative;
margin-top: var(--space-xxl);
& h2 {
display: none;
}
& img {
display: block;
width: 100%;
}
& ul {
margin: 0;
list-style: none;
}
& li {
position: absolute;
& .region {
display: none;
&.official {
color: var(--color-accent);
}
&:not(.official) {
color: var(--color-secondary);
}
& a {
color: inherit;
}
& .dot {
content: '';
position: absolute;
top: .3rem;
left: -1.25rem;
background: radial-gradient(currentColor 0%, rgba(255, 255, 255, 0) 100%);
animation-timing-function: linear;
animation-iteration-count: infinite;
will-change: transform;
transform-origin: 50%;
border-radius: 50%;
width: 1rem;
height: 1rem;
transform: scale(.75);
animation-name: pulse;
}
}
}

View File

@@ -3,6 +3,8 @@ extends /template.pug
block vars
- const title = 'Meetups'
- const description = 'Eine Liste von Einundzwanzig-Treffen im D/A/CH-Raum.'
- const filterOfficial = (list, official) => list.filter(meetup => meetup.name.startsWith('Einundzwanzig Meetup ') === official)
- let j = 0
block main
#meetups.wrap
@@ -15,15 +17,21 @@ block main
Die Vorlage für das Telegram-Gruppenbild findest du im [Media Kit](/media).
h2 Einundzwanzig Meetups
#map
h2 Einundzwanzig Meetups
ul.meetups
each m in meetups
each m in filterOfficial(meetups, true)
li.official(style=`top:${m.top}%;left:${m.left}%;`)
.dot(style=`animation-delay:${((j*2000) + random(3000))}ms;animation-duration:${meetups.length*2}s;`)
a(href=m.url target="_blank" rel="nofollow noopener")= m.name.replace('Einundzwanzig Meetup ', '')
- j++
h2 Weitere Meetups
ul.meetups
each m in filterOfficial(meetups, false)
li(style=`top:${m.top}%;left:${m.left}%;`)
a(href=m.telegram target="_blank" rel="nofollow noopener")= m.name.replace('Einundzwanzig Meetup ', '')
if !m.name.endsWith(m.region)
span.region
= " - "
= m.region
.dot(style=`animation-delay:${((j*2000) + random(3000))}ms;animation-duration:${meetups.length*2}s;`)
a(href=m.url target="_blank" rel="nofollow noopener")= m.name
- j++
img(src=assetPath('/img/dach.svg') alt="DE, AT, CH")