Changeset a036251 in Klonkt
- Timestamp:
- 06/26/2026 03:24:06 PM (2 months ago)
- Branches:
- main
- Children:
- 76f0e61
- Parents:
- 7ca3ffc
- Location:
- src
- Files:
-
- 2 edited
-
assets/css/style.css (modified) (5 diffs)
-
views/shell.ejs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/css/style.css
r7ca3ffc ra036251 63 63 --radius: 8px; --transition: 180ms cubic-bezier(.4,0,.2,1); 64 64 --safe-top: env(safe-area-inset-top, 0); --safe-bot: env(safe-area-inset-bottom, 0); 65 /* iOS top inset: starts from env(), but a tiny boot script overrides it with a 66 real/measured value (env() resolves to 0 in some iOS standalone states). */ 67 --ios-safe-top: env(safe-area-inset-top, 0px); 65 68 color-scheme: light dark; 66 69 } … … 507 510 .masthead { 508 511 border-bottom: 1px solid var(--rule); 509 padding: calc(1rem + env(safe-area-inset-top, 0px)) 0 1rem;512 padding: calc(1rem + var(--ios-safe-top, 0px)) 0 1rem; 510 513 /* GEEN backdrop-filter hier: een voorouder met backdrop-filter blokkeert de 511 514 frosted blur van het user-menu-dropdown eronder. Masthead is toch bijna … … 1620 1623 border-top-right-radius: 0; 1621 1624 box-shadow: none; 1622 padding-top: calc(.75rem + env(safe-area-inset-top, 0px));1625 padding-top: calc(.75rem + var(--ios-safe-top, 0px)); 1623 1626 padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); 1624 1627 } … … 1678 1681 } 1679 1682 @media (max-width: 400px) { 1680 .masthead { padding: calc(.5rem + env(safe-area-inset-top, 0px)) 0 .5rem; }1683 .masthead { padding: calc(.5rem + var(--ios-safe-top, 0px)) 0 .5rem; } 1681 1684 .masthead-inner { gap: .25rem; } 1682 1685 .site-title { font-size: 1.05rem; } … … 2759 2762 2760 2763 /* Masthead: compacter */ 2761 .masthead { padding: calc(.55rem + env(safe-area-inset-top, 0px)) 0 .55rem; }2764 .masthead { padding: calc(.55rem + var(--ios-safe-top, 0px)) 0 .55rem; } 2762 2765 .masthead-inner { gap: 1rem; } 2763 2766 .site-title { font-size: 1.25rem; } -
src/views/shell.ejs
r7ca3ffc ra036251 198 198 199 199 <!-- v9 stylesheet (full palette system) --> 200 <link rel="stylesheet" href="/assets/css/style.css?v=53"> 200 <link rel="stylesheet" href="/assets/css/style.css?v=54"> 201 <script> 202 /* iOS safe-area, built by hand: env(safe-area-inset-top) resolves to 0 in some iOS 203 states (Safari + standalone) even with viewport-fit=cover. Measure it directly, and 204 if it comes back empty on a notch/Dynamic-Island iPhone, fall back to a fixed inset. 205 The masthead reads --ios-safe-top. */ 206 (function(){ 207 var ua = navigator.userAgent || ''; 208 var isIOS = /iP(hone|od|ad)/.test(ua) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1); 209 if (!isIOS) return; 210 function setInset(){ 211 if (!document.body) return; 212 var p = document.createElement('div'); 213 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'; 214 document.body.appendChild(p); 215 var i = parseFloat(getComputedStyle(p).paddingTop) || 0; 216 p.remove(); 217 // env() gave nothing but this looks like a notched iPhone (logical height >= 812) 218 // -> use a fixed status-bar inset so the masthead clears the camera anyway. 219 if (i < 20 && Math.max(screen.width, screen.height) >= 812) i = 50; 220 document.documentElement.style.setProperty('--ios-safe-top', i + 'px'); 221 } 222 if (document.body) setInset(); else document.addEventListener('DOMContentLoaded', setInset); 223 window.addEventListener('orientationchange', function(){ setTimeout(setInset, 250); }); 224 })(); 225 </script> 201 226 202 227 <!-- Audio player styles: loaded on every page so the mini-player works
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)