From 369c386d2843eca83103a5303131471c46c154d1 Mon Sep 17 00:00:00 2001 From: Thor Galle Date: Tue, 18 Jun 2024 14:30:41 +0300 Subject: [PATCH] feat: add static meetup layer --- src/lib/components/Map/MeetupDrawer.svelte | 305 ++++++++++++++++++ src/lib/components/Map/MeetupLayer.svelte | 119 +++++++ src/locales/en.json | 11 +- src/locales/fr.json | 7 +- src/locales/nl.json | 10 +- src/routes/explore/+layout.svelte | 17 + .../explore/meetup/[meetupId]/+page.svelte | 1 + static/images/markers/fireplace-yellow.png | Bin 0 -> 7365 bytes static/images/markers/fireplace.png | Bin 0 -> 1339 bytes 9 files changed, 467 insertions(+), 3 deletions(-) create mode 100644 src/lib/components/Map/MeetupDrawer.svelte create mode 100644 src/lib/components/Map/MeetupLayer.svelte create mode 100644 src/routes/explore/meetup/[meetupId]/+page.svelte create mode 100644 static/images/markers/fireplace-yellow.png create mode 100644 static/images/markers/fireplace.png diff --git a/src/lib/components/Map/MeetupDrawer.svelte b/src/lib/components/Map/MeetupDrawer.svelte new file mode 100644 index 00000000..c87c9db0 --- /dev/null +++ b/src/lib/components/Map/MeetupDrawer.svelte @@ -0,0 +1,305 @@ + + + +{#if isShowingMagnifiedPhoto && !isGettingMagnifiedPhoto} + +{/if} + +
+ {#if isSelected} +
+
+
+ WTMG meetup - {meetupDateStr} +
+ +
+
+
+

+ {$_('map.meetups.description', { + values: { + location: $_(`map.meetups.cities.${meetup?.place}`), + date: meetupDateStr + } + })} +

+
+
+ +
+ {/if} +
+ + diff --git a/src/lib/components/Map/MeetupLayer.svelte b/src/lib/components/Map/MeetupLayer.svelte new file mode 100644 index 00000000..8b1b3041 --- /dev/null +++ b/src/lib/components/Map/MeetupLayer.svelte @@ -0,0 +1,119 @@ + + + diff --git a/src/locales/en.json b/src/locales/en.json index ae92e70d..04e48619 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1174,7 +1174,16 @@ "select-file": "select file", "added-to-map": "has been added to the map." }, - "zoom-restriction-notice": "to zoom in more" + "zoom-restriction-notice": "to zoom in more", + "meetups": { + "description": "Looking for your next slow travel adventure? Join us at the WTMG meetup near {location} on {date}! The idea is simple: we meet in a WTMG garden, share our excitement about slow travel and have a great time together. It’s free, but mandatory to register. See you there!", + "btn-register": "Register now", + "no-account": "You must {signInLink} to register", + "cities": { + "Lier": "Lier", + "Arlon": "Arlon" + } + } }, "terms-of-use": { "title": "Terms of use", diff --git a/src/locales/fr.json b/src/locales/fr.json index 3c9b0e74..80cc1b69 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -1160,7 +1160,12 @@ "select-file": "sélectionnez le fichier", "added-to-map": "a été ajouté sur la carte." }, - "zoom-restriction-notice": "pour zoomer plus" + "zoom-restriction-notice": "pour zoomer plus", + "meetups": { + "description": "Vous cherchez votre prochaine aventure slow travel ? Rejoignez-nous au meetup WTMG près de {location} le {date} ! L’idée est simple : nous nous retrouvons dans un jardin WTMG, partageons notre enthousiasme pour le slow travel et passons un bon moment ensemble. C'est gratuit, mais vous devez vous inscrire. Nous avons hâte de vous y voir !", + "btn-register": "S’inscrire", + "no-account": "Vous devez {signInLink} pour vous inscrire" + } }, "terms-of-use": { "title": "Conditions d'utilisation", diff --git a/src/locales/nl.json b/src/locales/nl.json index ada342ba..4db283ec 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -778,7 +778,15 @@ "select-file": "selecteer een bestand", "added-to-map": "is toegevoegd aan de kaart." }, - "zoom-restriction-notice": "om meer in te zoomen" + "zoom-restriction-notice": "om meer in te zoomen", + "meetups": { + "description": "Op zoek naar je volgende slow travel avontuur? Kom naar de WTMG meetup in de buurt van {location} op {date}! Het idee is simpel: we ontmoeten elkaar in een WTMG-tuin, delen ons enthousiasme over slow travel en hebben een geweldige tijd samen. Het is gratis, maar inschrijven is verplicht. Tot dan!", + "btn-register": "Schrijf je in", + "no-account": "Je moet {signInLink} om je in te schrijven", + "cities": { + "Arlon": "Aarlen" + } + } }, "rules": { "title": "Regels", diff --git a/src/routes/explore/+layout.svelte b/src/routes/explore/+layout.svelte index 1ed71e1b..aaf140cc 100644 --- a/src/routes/explore/+layout.svelte +++ b/src/routes/explore/+layout.svelte @@ -34,6 +34,9 @@ import { fileDataLayers, removeTrailAnimations } from '$lib/stores/file'; import { isOnIDevicePWA } from '$lib/api/push-registrations'; import { isEmpty } from 'lodash-es'; + import MeetupLayer, { meetups } from '$lib/components/Map/MeetupLayer.svelte'; + import { lnglatToObject } from '$lib/api/mapbox'; + import MeetupDrawer from '$lib/components/Map/MeetupDrawer.svelte'; let showHiking = false; let showCycling = false; @@ -83,6 +86,10 @@ // TODO check this: It looks like there is no need for a subscribe on page let hasGardenInURL = !!$page.params.gardenId; + // reactivity seems to be necessary here! + $: selectedMeetupId = $page.params.meetupId; + $: selectedMeetup = meetups.find((m) => m.id === selectedMeetupId); + let zoom = hasGardenInURL ? ZOOM_LEVELS.ROAD : ZOOM_LEVELS.WESTERN_EUROPE; $: applyZoom = hasGardenInURL ? true : false; @@ -136,6 +143,14 @@ } }; + const selectMeetup = (meetupId: string) => { + const meetup = meetups.find((m) => m.id === meetupId); + if (meetup) { + centerLocation = lnglatToObject(meetup.lnglat); + goto(`${routes.MAP}/meetup/${meetup.id}`); + } + }; + const goToPlace = (event) => { zoom = ZOOM_LEVELS.CITY; applyZoom = true; @@ -225,7 +240,9 @@ /> {/if} + + selectMeetup(e.detail)} {selectedMeetupId} /> {#if carNoticeShown}
diff --git a/src/routes/explore/meetup/[meetupId]/+page.svelte b/src/routes/explore/meetup/[meetupId]/+page.svelte new file mode 100644 index 00000000..5d2a3a05 --- /dev/null +++ b/src/routes/explore/meetup/[meetupId]/+page.svelte @@ -0,0 +1 @@ + diff --git a/static/images/markers/fireplace-yellow.png b/static/images/markers/fireplace-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb60aadff957775ca4fc57351a4ca1fd7538eef GIT binary patch literal 7365 zcmY+JbyO7I^Y@pIl@I}80STo$C1oi|5h(#d7Nt9P>7`Z>q&o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TYdkpLzeH{NHR_5Vi=c6>MruT(WOMBw`H-%Ir6c=qF+!Q87B0ftx0dOTyO!y zuuRm*Qy>T9ubFz2wJ&l;t#(lx;tlD4*B0g13`>Yr_>hs9#E4}R+=p!-8rTde7gA6KXR|MIH@Onz~W`$eySl zVw`$B8fhP%VBY^y%<9!XTxC7IwUxoVPt+)g4~iHvhwx|co?h-3>|pMOHJN<8_dt9H zz2vG-5kj ze+R9YDj8$~#uiK3HbWop$|IMuXBW6nVP1Lh^Qjz$G=H<7cXW#VfSH<>m~Q^!v#j7F z9~W@gz6?lFmZnWd9S7u;H(&<)DYEgKU`N5;T{_tYZpWKuGV&>QJW1b29P@t*PjF>a WP3qM`WN`Z%1<=;eSFcfpMEoDDzJ9s@ literal 0 HcmV?d00001 diff --git a/static/images/markers/fireplace.png b/static/images/markers/fireplace.png new file mode 100644 index 0000000000000000000000000000000000000000..3feb2f555a6a7681d4890a434b6120a3cd30a3a9 GIT binary patch literal 1339 zcmbu9{XY{30LJHSj0{DVSW`sj_2gL8HH+BQxtV40$u@7b=*87;6D}_eVMckUV+*~B zQImHj+9o+_3CG=BD--5*^AelW-*C_8^E}@lo}Zpyo^-UYx30E{HUI$7MfrGQwn_YE zEw$|&I+^yZ7(t)LdTn#-e@HPuyCE8-CjBN&xG0m$u%Vdw?D(|-J__f}Zm8Xqi09I- zuXJ)&`R$A4jLPbYR=pjnxZ< zDZD=3`taLv(fEc$y!5b;*Y|2|fX8lND^}%ShX<9b^2PFOcV=w#=V4>%IC(O2u3Kb^>q0|3;NC{GV; z48Ea6LJ`Avq@er)ek~5SLQ|!d?WfD7QiX_goqVz&*+?tsStsGpk8Qkmn8oYe=dFi3 z7B=1`;Y`1*8^5UTd5jMD1*xkj8#1Wzd!cF4R$x-AX{(G_c6I2|x|n`&GtVm41!Vj= zHZ+}~=Ph*KKS!mz+hwAS2Xk~H!n0{SAGJ~-n1cYH-C$YH7fq&p7%U0>(vH?sLw3vC%iX82GQ+aVgM4Er^tvahZ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