Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Selfies: Difference between revisions

From Treeverse
No edit summary
No edit summary
Line 10: Line 10:
   .tv-panel{
   .tv-panel{
     position:absolute; top:10px; right:10px; z-index:1000;
     position:absolute; top:10px; right:10px; z-index:1000;
     background:#f4f8f4; padding:8px 10px; border-radius:12px;  
     background:#f4f8f4; padding:6px 8px; border-radius:10px;  
     box-shadow:0 6px 20px rgba(0,0,0,.25);
     box-shadow:0 6px 20px rgba(0,0,0,.25);
     width:260px; font:14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
     width:220px; font:13px/1.3 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
     border:2px solid #3b5d3f;
     border:2px solid #3b5d3f;
   }
   }
   .tv-panel h3{margin:.2rem 0; font-size:16px}
   .tv-panel h3{margin:.2rem 0; font-size:15px}
   .tv-icon{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;
   .tv-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;
     box-shadow:0 0 0 2px #fff,0 2px 6px rgba(0,0,0,.25); font-size:18px; line-height:1; background:#16a085}
     box-shadow:0 0 0 2px #fff,0 2px 6px rgba(0,0,0,.25); font-size:16px; line-height:1; background:#16a085}
   .tv-input{display:block;width:100%;margin:6px 0;box-sizing:border-box}
   .tv-input{display:block;width:100%;margin:5px 0;box-sizing:border-box}
   .tv-text{padding:7px 9px;border:1px solid #ccc;border-radius:6px;font-size:14px}
   .tv-text{padding:6px 8px;border:1px solid #ccc;border-radius:5px;font-size:13px}
   .tv-btn{display:block;width:100%;margin-top:8px;padding:10px;border:none;border-radius:6px;
   .tv-btn{display:block;width:100%;margin-top:6px;padding:9px;border:none;border-radius:6px;
     font-weight:bold;cursor:pointer;font-size:14px}
     font-weight:bold;cursor:pointer;font-size:13px}
   .btn-add{background:#27ae60;color:#fff} .btn-add:hover{background:#1f8b4d}
   .btn-add{background:#27ae60;color:#fff} .btn-add:hover{background:#1f8b4d}
   .btn-del{background:#bdc3c7;color:#2c3e50;transition:background .2s,color .2s}
   .btn-del{background:#bdc3c7;color:#2c3e50;transition:background .2s,color .2s}
   .btn-del.on{background:#e74c3c;color:#fff}
   .btn-del.on{background:#e74c3c;color:#fff}


   #m-photo{padding:8px;border:1px solid #ccc;border-radius:6px;font-size:14px;background:#fff}
   #m-photo{padding:6px;border:1px solid #ccc;border-radius:5px;font-size:13px;background:#fff}


   #toast{position:fixed;top:10px;left:50%;transform:translateX(-50%);
   #toast{position:fixed;top:10px;left:50%;transform:translateX(-50%);
Line 33: Line 33:
   #toast.show{opacity:1}
   #toast.show{opacity:1}


   /* Popup wider than default; selfie at 75% width */
   /* Popup wider than default; selfie at 100% width */
   .tv-popup .leaflet-popup-content{margin:10px 12px; width:360px !important; max-width:360px !important}
   .tv-popup .leaflet-popup-content{margin:10px 12px; width:360px !important; max-width:360px !important}
   .tv-popup .leaflet-popup-content img{display:block;width:75%;height:auto;border-radius:6px;margin-top:6px}
   .tv-popup .leaflet-popup-content img{display:block;width:100%;height:auto;border-radius:6px;margin-top:6px}
   @media (max-width:520px){
   @media (max-width:520px){
     .tv-popup .leaflet-popup-content{width:72vw !important; max-width:72vw !important}
     .tv-popup .leaflet-popup-content{width:72vw !important; max-width:72vw !important}
Line 71: Line 71:


   function toast(msg="Saved ✅"){ const t=document.getElementById('toast'); t.textContent=msg; t.classList.add('show'); setTimeout(()=>t.classList.remove('show'),1500); }
   function toast(msg="Saved ✅"){ const t=document.getElementById('toast'); t.textContent=msg; t.classList.add('show'); setTimeout(()=>t.classList.remove('show'),1500); }
   function icon(){ return L.divIcon({ className:'tv-icon', html:'<span>📸</span>', iconSize:[30,30], iconAnchor:[15,30], popupAnchor:[0,-24] }); }
   function icon(){ return L.divIcon({ className:'tv-icon', html:'<span>📸</span>', iconSize:[28,28], iconAnchor:[14,28], popupAnchor:[0,-24] }); }
   function popupHtml(title,desc,imgUrl){
   function popupHtml(title,desc,imgUrl){
     const t=(title||'').trim();
     const t=(title||'').trim();
Line 87: Line 87:
     map.fitBounds(bounds);
     map.fitBounds(bounds);


     // After fitting, bias view to the extreme left (as far as bounds allow)
     // After fitting, force center near left edge
     setTimeout(() => {
     setTimeout(() => {
       try {
       try {
         const z = map.getZoom();
         const z = map.getZoom();
         map.setView([h/2, 0], z, { animate:false }); // center near left edge
         map.setView([h/2, 0], z, { animate:false });
       } catch(e) {}
       } catch(e) {}
     }, 0);
     }, 0);