Changeset 1c85964 in Klonkt


Ignore:
Timestamp:
06/26/2026 04:33:36 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
f6b2c68
Parents:
7eee449
Message:

debug(ios): richer safe-area overlay (masthead/profile rects) + SW cache v13

Temporary: capture masthead position/height/top + chrome/profile top + body padding
to pin down why the masthead padding doesn't push content below the island in the PWA.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/server.js

    r7eee449 r1c85964  
    395395  res.set('Cache-Control', 'no-cache');
    396396  res.send(`
    397 const CACHE_VERSION = 'pcms-v12-' + new Date().toISOString().split('T')[0];
     397const CACHE_VERSION = 'pcms-v13-' + new Date().toISOString().split('T')[0];
    398398self.addEventListener('install', e => {
    399399  e.waitUntil(caches.open(CACHE_VERSION).then(c => c.addAll(['/'])));
  • src/views/shell.ejs

    r7eee449 r1c85964  
    229229      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';
    230230      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');
     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));
    232239  }
    233240  if (document.body) apply(); else document.addEventListener('DOMContentLoaded', apply);
Note: See TracChangeset for help on using the changeset viewer.