Diffstat (limited to 'views')
| -rw-r--r-- | views/layouts/general-page.html | 11 | ||||
| -rw-r--r-- | views/pages/global-map.html | 32 |
2 files changed, 2 insertions, 41 deletions
diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html index cd19bd0..5918956 100644 --- a/views/layouts/general-page.html +++ b/views/layouts/general-page.html @@ -98,17 +98,6 @@ } }); - function calculateVmin(percent) { - const viewportWidth = window.innerWidth; - const viewportHeight = window.innerHeight; - - const smallerDimension = Math.min(viewportWidth, viewportHeight); - - const vminValue = (smallerDimension / 100) * percent; - - return vminValue; - } - function calculateVmax(percent) { const viewportWidth = window.innerWidth; const viewportHeight = window.innerHeight; diff --git a/views/pages/global-map.html b/views/pages/global-map.html index 6185076..09d7ab2 100644 --- a/views/pages/global-map.html +++ b/views/pages/global-map.html @@ -11,8 +11,6 @@ {{ block "header" . }}{{ end }} <link href="/output.css" rel="stylesheet"> <link rel="stylesheet" href="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet/1.9.4/leaflet.css"> - <link rel="stylesheet" href="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet.markercluster/1.4.1/MarkerCluster.css"> - <link rel="stylesheet" href="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css"> </head> <body data-theme="ram" class="font-spectral text-main-dark overflow-hidden bg-interlocked-hexagons h-screen flex flex-row ar-lt-0.8:flex-col"> @@ -62,7 +60,6 @@ <script src="https://f003.backblazeb2.com/file/sayana-static/libs/htmx/2.0.6/htmx.min.js"></script> <script src="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet/1.9.4/leaflet.js"></script> - <script src="https://f003.backblazeb2.com/file/sayana-static/libs/leaflet.markercluster/1.4.1/leaflet.markercluster.js"></script> <script> const themeWheel = document.getElementById('theme-wheel'); @@ -177,27 +174,6 @@ <script> var map; - var markers = L.markerClusterGroup(); - - function createCustomIcon(color, borderColor = "var(--main-light-color)") { - const svgIcon = ` - <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> - <path d="M12 1C7.5 1 4 4.5 4 9c0 6.5 8 14 8 14s8-7.5 8-14c0-4.5-3.5-8-8-8zm0 11c-1.5 0-3-1.5-3-3s1.5-3 3-3 3 1.5 3 3-1.5 3-3 3z" - fill="${color}" - stroke="${borderColor}" - stroke-width="1" - stroke-linejoin="round"/> - </svg> - `; - - return L.divIcon({ - html: svgIcon, - className: 'custom-svg-marker', - iconSize: [32, 32], - iconAnchor: [16, 32], - popupAnchor: [0, -32] - }); - } function initLocationMap() { map = L.map('map-container').setView([{{ .MapLocationLat }}, {{ .MapLocationLong }}], 4); @@ -206,8 +182,6 @@ maxZoom: 18, attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' }).addTo(map); - - map.addLayer(markers); } function stringToColor(str) { @@ -238,15 +212,13 @@ } var marker = L.marker([x, y], { - icon: createCustomIcon(titleColor), title: title, - }).bindPopup(` + }).addTo(map) + .bindPopup(` <div class="flex flex-row justify-center justify-items-center"> <img onclick="location.href='${link}';" class="cursor-pointer object-cover rounded-[10%] select-none w-[3vmax] h-[3vmax] mr-[0.5vmax]" src="https://f003.backblazeb2.com/file/sayana-photos/webp-320p/${thumbnail}.webp"> <span><b><a href="${link}">${title}</a></b><br><a href="https://www.openstreetmap.org/#map=13/${x}/${y}">${x}, ${y}</a></span> </div>`); - - markers.addLayer(marker); } document.addEventListener('DOMContentLoaded', () => { |