Spaces:
Running
Running
adds lotties
Browse files- index.html +0 -8
- static/app.js +4 -2
index.html
CHANGED
|
@@ -69,14 +69,6 @@
|
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
|
| 72 |
-
<div class="sidebar-divider"></div>
|
| 73 |
-
|
| 74 |
-
<div class="sidebar-section sidebar-map-legend">
|
| 75 |
-
<h3>Map legend</h3>
|
| 76 |
-
<div class="legend-row"><span class="legend-dot green"></span> Dog — seen recently</div>
|
| 77 |
-
<div class="legend-row"><span class="legend-dot orange"></span> Cat — seen recently</div>
|
| 78 |
-
<div class="legend-row"><span class="legend-dot red"></span> Not seen in +30 days</div>
|
| 79 |
-
</div>
|
| 80 |
</aside>
|
| 81 |
|
| 82 |
<div class="phone-wrap">
|
|
|
|
| 69 |
</div>
|
| 70 |
</div>
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
</aside>
|
| 73 |
|
| 74 |
<div class="phone-wrap">
|
static/app.js
CHANGED
|
@@ -117,9 +117,11 @@
|
|
| 117 |
const color = urgent ? '#E53935' : isDog ? '#388C59' : '#FB8C00';
|
| 118 |
const badge = a.count > 1
|
| 119 |
? `<span style="position:absolute;top:-5px;right:-5px;background:#fff;color:${color};border:1.5px solid ${color};border-radius:10px;min-width:16px;height:16px;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 3px;">${a.count}</span>` : '';
|
| 120 |
-
const
|
|
|
|
|
|
|
| 121 |
return L.divIcon({
|
| 122 |
-
html: `<div style="position:relative;background:${color};width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px rgba(0,0,0,.25);border:2.5px solid
|
| 123 |
className:'', iconSize:[42,42], iconAnchor:[21,21], popupAnchor:[0,-26]
|
| 124 |
});
|
| 125 |
}
|
|
|
|
| 117 |
const color = urgent ? '#E53935' : isDog ? '#388C59' : '#FB8C00';
|
| 118 |
const badge = a.count > 1
|
| 119 |
? `<span style="position:absolute;top:-5px;right:-5px;background:#fff;color:${color};border:1.5px solid ${color};border-radius:10px;min-width:16px;height:16px;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 3px;">${a.count}</span>` : '';
|
| 120 |
+
const inner = a.photo_url
|
| 121 |
+
? `<img src="${a.photo_url}" style="width:38px;height:38px;border-radius:50%;object-fit:cover;" onerror="this.outerHTML='${svgIcon(isDog ? 'dog' : 'cat', 22, '#fff').replace(/'/g, "\\'")}'"/>`
|
| 122 |
+
: svgIcon(isDog ? 'dog' : 'cat', 22, '#fff');
|
| 123 |
return L.divIcon({
|
| 124 |
+
html: `<div style="position:relative;background:${color};width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px rgba(0,0,0,.25);border:2.5px solid ${color};">${inner}${badge}</div>`,
|
| 125 |
className:'', iconSize:[42,42], iconAnchor:[21,21], popupAnchor:[0,-26]
|
| 126 |
});
|
| 127 |
}
|