Changeset b8bbe77 in Klonkt
- Timestamp:
- 06/26/2026 03:42:25 PM (2 months ago)
- Branches:
- main
- Children:
- cb3d5fc
- Parents:
- 76f0e61
- File:
-
- 1 edited
-
src/views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/views/shell.ejs
r76f0e61 rb8bbe77 217 217 p.style.cssText = 'position:fixed;top:0;left:0;width:0;height:0;padding-top:env(safe-area-inset-top,0px);visibility:hidden;pointer-events:none'; 218 218 document.body.appendChild(p); 219 var i= parseFloat(getComputedStyle(p).paddingTop) || 0;219 var rawEnv = parseFloat(getComputedStyle(p).paddingTop) || 0; 220 220 p.remove(); 221 var i = rawEnv; 221 222 if (i < 20 && Math.max(screen.width, screen.height) >= 812) i = standalone ? 59 : 47; 222 223 document.documentElement.style.setProperty('--ios-safe-top', i + 'px'); 223 224 var mh = document.querySelector('.masthead'); 224 225 if (mh) mh.style.paddingTop = 'calc(.55rem + ' + i + 'px)'; 226 /* TEMP DEBUG — remove after diagnosing the iOS PWA safe-area. Tap to dismiss. */ 227 var d = document.getElementById('ios-dbg'); 228 if (!d) { d = document.createElement('div'); d.id = 'ios-dbg'; d.onclick = function(){ d.remove(); }; 229 d.style.cssText = 'position:fixed;left:6px;bottom:96px;z-index:2147483647;background:rgba(0,0,0,.86);color:#0f0;font:11px/1.4 monospace;padding:7px 9px;border-radius:6px;white-space:pre;max-width:92vw'; 230 document.body.appendChild(d); } 231 d.textContent = 'env=' + rawEnv + ' final=' + i + '\nstandalone=' + standalone + '\nscreen=' + screen.width + 'x' + screen.height + ' dpr=' + window.devicePixelRatio + '\nmasthead pad=' + (mh ? getComputedStyle(mh).paddingTop : 'NOT FOUND'); 225 232 } 226 233 if (document.body) apply(); else document.addEventListener('DOMContentLoaded', apply);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)