From cfa32077c80dcdc28d29ab87c4debee75c666a9c Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Tue, 19 Apr 2022 10:45:51 +0200 Subject: [PATCH] Add script to locate meetup coordinates Inspired by @OttoAllmendinger's [comment](https://github.com/Einundzwanzig-Podcast/einundzwanzig.space/pull/66#issuecomment-1101299945). --- src/meetups.pug | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/meetups.pug b/src/meetups.pug index a199761aa12..ddab6213f55 100644 --- a/src/meetups.pug +++ b/src/meetups.pug @@ -42,7 +42,7 @@ block main = m.name.replace('Bitcoin ', '') - j++ - img(src=assetPath('/img/dach.svg') alt="DE, AT, CH") + img#dach(src=assetPath('/img/dach.svg') alt="DE, AT, CH") #unmapped h2 Weitere Meetups @@ -51,3 +51,11 @@ block main li(class=clss(m) style=style(m)) a(href=m.url target="_blank" rel="nofollow noopener") = m.name + + script. + document.getElementById('dach').onclick = e => { + console.log({ + top: Math.round(e.offsetY / e.target.height * 100) - 2, + left: Math.round(e.offsetX / e.target.width * 100) + 1 + }) + }