summaryrefslogtreecommitdiff
diff options
from:
to:
context:
space:
mode:
authorGravatar Saya Andy <145215889+SayaAndy@users.noreply.github.com> 2025-08-20 16:04:35 +0700
committerGravatar GitHub <noreply@github.com> 2025-08-20 16:04:35 +0700
commita3d04476daa507cf941a5b82355c744c6622246c (patch)
treef958c583d51e6cc1bce76a5c3260e06e18ede586
parent0d8aa40ce197b10e32f2e6cc378188b71a83689f (diff)
parentb815b74d7a943d1f71a0ddcf6b343d3958d2b97a (diff)
downloadweb-0.6.2.tar.gz
web-0.6.2.zip
v0.6.2v0.6.2
- feat: use custom color markers for global map - feat: if gallery has only a single item, raise picture height
-rw-r--r--static/input.css18
-rw-r--r--views/pages/global-map.html21
2 files changed, 39 insertions, 0 deletions
diff --git a/static/input.css b/static/input.css
index 8c0069b..9f834a6 100644
--- a/static/input.css
+++ b/static/input.css
@@ -283,6 +283,20 @@ body:has(.lg-container:not([class~="lg-inline"])) #sidebar {
border: 0.3vmax outset var(--main-light-color);
}
+.custom-svg-marker {
+ background: transparent;
+ border: none;
+}
+
+.custom-svg-marker svg {
+ filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
+ transition: transform 0.2s;
+}
+
+.custom-svg-marker:hover svg {
+ transform: scale(1.1);
+}
+
.lg-backdrop {
background-color: var(--background-light-color);
opacity: 0.8 !important;
@@ -327,6 +341,10 @@ body:has(.lg-container:not([class~="lg-inline"])) #sidebar {
bottom: calc(10vmin + 5vmax) !important;
}
+.lg-outer[class~="lg-single-item"] .lg-content {
+ bottom: 5vmax !important;
+}
+
.lg-thumb-item {
width: 10vmin !important;
height: 10vmin !important;
diff --git a/views/pages/global-map.html b/views/pages/global-map.html
index 05c39a1..6185076 100644
--- a/views/pages/global-map.html
+++ b/views/pages/global-map.html
@@ -179,6 +179,26 @@
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);
@@ -218,6 +238,7 @@
}
var marker = L.marker([x, y], {
+ icon: createCustomIcon(titleColor),
title: title,
}).bindPopup(`
<div class="flex flex-row justify-center justify-items-center">