aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-10-25 18:38:02 -0600
committersecondl1ght <[email protected]>2022-10-25 18:38:02 -0600
commit2091cf76cfa67d37dc8f058cc62d0aa1050eef3c (patch)
tree6fc6fd350d5633aaa76b350a6ac02b71fd51e01b
parentd7e35c5a48f55ebb1dfcdcbb29c7da79fb84943f (diff)
downloadcoinos-ui-2091cf76cfa67d37dc8f058cc62d0aa1050eef3c.tar.gz
coinos-ui-2091cf76cfa67d37dc8f058cc62d0aa1050eef3c.zip
format locations map popup
-rw-r--r--src/components/LocationsMap.svelte61
1 files changed, 30 insertions, 31 deletions
diff --git a/src/components/LocationsMap.svelte b/src/components/LocationsMap.svelte
index 34821745..b3be164f 100644
--- a/src/components/LocationsMap.svelte
+++ b/src/components/LocationsMap.svelte
@@ -108,38 +108,38 @@
let marker = L.marker([location.lat, location.lon]);
- marker.bindPopup(`${
- location.tags && location.tags.name
- ? `<span class='block'>${location.tags.name}</span>`
- : ''
- }
-
- <span class='block'>${location.tags && checkAddress(location.tags)}</span>
+ marker.bindPopup(
+ `${
+ location.tags && location.tags.name
+ ? `<span class='block'>${location.tags.name}</span>`
+ : ''
+ }
+ <span class='block'>${location.tags && checkAddress(location.tags)}</span>
- ${
- location.tags && location.tags.phone
- ? `<a href='tel:${location.tags.phone}' class='block'>${location.tags.phone}</a>`
- : ''
- }
+ ${
+ location.tags && location.tags.phone
+ ? `<a href='tel:${location.tags.phone}' class='block'>${location.tags.phone}</a>`
+ : ''
+ }
- ${
- location.tags && location.tags.website
- ? `<a href=${location.tags.website} target="_blank" rel="noreferrer" class='block'>${location.tags.website}</a>`
- : ''
- }
+ ${
+ location.tags && location.tags.website
+ ? `<a href=${location.tags.website} target="_blank" rel="noreferrer" class='block'>${location.tags.website}</a>`
+ : ''
+ }
- ${
- location.tags && location.tags['contact:twitter']
- ? `<a href=${
- location.tags['contact:twitter'].startsWith('http')
- ? location.tags['contact:twitter']
- : `https://twitter.com/${location.tags['contact:twitter']}`
- } target="_blank" rel="noreferrer" class='block'>TWT: ${
- location.tags['contact:twitter']
- }</a>`
- : ''
- }
+ ${
+ location.tags && location.tags['contact:twitter']
+ ? `<a href=${
+ location.tags['contact:twitter'].startsWith('http')
+ ? location.tags['contact:twitter']
+ : `https://twitter.com/${location.tags['contact:twitter']}`
+ } target="_blank" rel="noreferrer" class='block'>TWT: ${
+ location.tags['contact:twitter']
+ }</a>`
+ : ''
+ }
${
location.tags && location.tags['contact:instagram']
@@ -175,9 +175,8 @@
location.tags['contact:linkedin']
}</a>`
: ''
- }
-
-`);
+ }`
+ );
markers.addLayer(marker);
});