Changeset f6b2c68 in Klonkt
- Timestamp:
- 06/26/2026 04:49:12 PM (2 months ago)
- Branches:
- main
- Children:
- 9327a85
- Parents:
- 1c85964
- Location:
- src
- Files:
-
- 3 edited
-
server.js (modified) (1 diff)
-
views/partials/topnav.ejs (modified) (1 diff)
-
views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/server.js
r1c85964 rf6b2c68 395 395 res.set('Cache-Control', 'no-cache'); 396 396 res.send(` 397 const CACHE_VERSION = 'pcms-v1 3-' + new Date().toISOString().split('T')[0];397 const CACHE_VERSION = 'pcms-v14-' + new Date().toISOString().split('T')[0]; 398 398 self.addEventListener('install', e => { 399 399 e.waitUntil(caches.open(CACHE_VERSION).then(c => c.addAll(['/']))); -
src/views/partials/topnav.ejs
r1c85964 rf6b2c68 328 328 @media (max-width: 767px) { 329 329 body:not(.on-admin) .masthead { display: none; } 330 /* The masthead is gone on mobile, so it can't carry the iOS safe-area top inset 331 (env() resolves to 0 in the home-screen PWA; --ios-safe-top is set by JS in shell). 332 Pad the body instead so the profile-header clears the Dynamic Island / notch. */ 333 body:not(.on-admin) { padding-top: var(--ios-safe-top, 0px); } 330 334 } 331 335 -
src/views/shell.ejs
r1c85964 rf6b2c68 223 223 document.documentElement.style.setProperty('--ios-safe-top', i + 'px'); 224 224 var mh = document.querySelector('.masthead'); 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 var ph = document.querySelector('.profile-header') || document.querySelector('#pcms-chrome'); 232 var mr = mh ? mh.getBoundingClientRect() : null; 233 var pr = ph ? ph.getBoundingClientRect() : null; 234 var mhCS = mh ? getComputedStyle(mh) : null; 235 d.textContent = 'env=' + rawEnv + ' final=' + i + ' standalone=' + standalone 236 + '\nscreen=' + screen.width + 'x' + screen.height + ' dpr=' + window.devicePixelRatio + ' scrollY=' + Math.round(window.scrollY) 237 + '\nmh: pos=' + (mhCS ? mhCS.position : '-') + ' pad=' + (mhCS ? Math.round(parseFloat(mhCS.paddingTop)) : '-') + ' top=' + (mr ? Math.round(mr.top) : '-') + ' h=' + (mr ? Math.round(mr.height) : '-') 238 + '\nchrome/profile top=' + (pr ? Math.round(pr.top) : '-') + ' body.pt=' + Math.round(parseFloat(getComputedStyle(document.body).paddingTop)); 225 var mhHidden = !mh || getComputedStyle(mh).display === 'none' || mh.offsetHeight === 0; 226 if (mhHidden) { 227 /* Mobile: the masthead is hidden (bottom-tab replaces it ≤767px) so it can't carry 228 the inset. Pad the body instead → the profile-header clears the island/notch. */ 229 document.body.style.paddingTop = i + 'px'; 230 if (mh) mh.style.paddingTop = ''; 231 } else { 232 /* Desktop/landscape: the sticky masthead carries the inset in its own padding. */ 233 document.body.style.paddingTop = ''; 234 mh.style.paddingTop = 'calc(.55rem + ' + i + 'px)'; 235 } 239 236 } 240 237 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)