diff options
Diffstat (limited to 'src/refactor.js')
-rw-r--r-- | src/refactor.js | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/refactor.js b/src/refactor.js index e68d2d9..3731993 100644 --- a/src/refactor.js +++ b/src/refactor.js @@ -60,7 +60,7 @@ const dataController = (function () { query, ...algolia_params, ...geoParam, - attributesToRetrieve: ['_geoloc', 'name'], + attributesToRetrieve: ['_geoloc', 'name', 'address', 'postcode'], }, }); return res; @@ -91,6 +91,7 @@ const interfaceController = (function () { zoom, center: position, mapId: 'pub_map', + colorScheme: 'DARK', restriction: { latLngBounds: maxSpace, strictBounds: true, @@ -102,15 +103,20 @@ const interfaceController = (function () { bounds: bounds, editable: true, draggable: true, + strokeWeight: 2, + strokeOpacity: 0.8, + strokeColor: '#D97706', + fillColor: '#D97706', + fillOpacity: 0.35, }); shape.setMap(map); } else if (currentShape === 'polygon') { shape = new Polygon({ paths: initialPolygonBounds, - strokeColor: '#FF0000', + strokeColor: '#D97706', strokeOpacity: 0.8, strokeWeight: 2, - fillColor: '#FF0000', + fillColor: '#D97706', fillOpacity: 0.35, editable: true, draggable: true, @@ -156,7 +162,15 @@ const interfaceController = (function () { let html = `<ul class="flex flex-col gap-2">`; for (const pub of slicedArr) { - html += `<li>${pub.name}</li>`; + html += `<li class="relative bg-[#373737] rounded-lg p-4"> + <h3 class="font-medium mb-2">${pub.name}</h3> + <h4 class="text-sm">${pub.address}, ${pub.postcode}</h4> + <a href="https://www.google.co.uk/maps/place/Ye+Old+White+Horse/" class="absolute block top-4 right-4" target="_blank"> + <svg width="20px" height="20px" viewBox="0 0 24 24" fill="none" > + <path d="M5 12V6C5 5.44772 5.44772 5 6 5H18C18.5523 5 19 5.44772 19 6V18C19 18.5523 18.5523 19 18 19H12M8.11111 12H12M12 12V15.8889M12 12L5 19" stroke="#D97706" stroke-linecap="round" stroke-linejoin="round" /> + </svg> + </a> + </li>`; } html += `</ul>`; |