Voeg 28 herkenbare kleurplaten en creatieve niveaus toe (v0.4.66-beta) #4
4 changed files with 46 additions and 5 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
0.4.53-beta
|
||||
0.4.54-beta
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@
|
|||
daadwerkelijk zichtbare hoogte wanneer de browserbalk in- of uitschuift.
|
||||
Doordat body een containing block is, gebruiken ook de absoluut
|
||||
gepositioneerde bord-, leerling- en ouderweergaven deze zichtbare hoogte. */
|
||||
html,body{height:100%; height:100dvh; margin:0; overflow:hidden;}
|
||||
html,body{
|
||||
height:100%; height:100dvh; height:var(--app-height,100dvh);
|
||||
margin:0; overflow:hidden;
|
||||
}
|
||||
body{
|
||||
position:relative;
|
||||
font-family:"Quicksand","Segoe UI Rounded","Arial Rounded MT Bold",ui-rounded,"Segoe UI",Verdana,sans-serif;
|
||||
|
|
@ -2057,6 +2060,21 @@ body.dark .world-fact{background:#1d3b2a;color:#a9e5b7}body.dark .world-fact .wo
|
|||
overscroll-behavior:contain;
|
||||
}
|
||||
#pupilView .pupil-card{width:100%!important;max-width:100%;min-width:0!important}
|
||||
/* Op een laag telefoonscherm wordt een bordwidget begrensd tot het zichtbare
|
||||
bord. De inhoud moet dan kunnen scrollen; overflow:hidden sneed vooral de
|
||||
opdrachtkaart en blokkenbak af. Letter/rekenroots mogen daarbij hoger
|
||||
worden dan hun viewport, waarna widget-body de scroll afhandelt. */
|
||||
.widget-body{
|
||||
overflow-y:auto;
|
||||
overscroll-behavior:contain;
|
||||
-webkit-overflow-scrolling:touch;
|
||||
}
|
||||
.widget-body>:is(.lg,.mt){flex:none;min-height:100%}
|
||||
.lg-card{min-height:210px}
|
||||
.mt-card{min-height:180px}
|
||||
/* De knop is buiten een opgelost woord display:none. De oude vaste 46px
|
||||
liet desondanks een lege witte "footer" onder de blokken staan. */
|
||||
.lg-bottom{min-height:0}
|
||||
.widget:not(.bare){max-width:calc(100% - 8px)}
|
||||
.widget-head{gap:4px;padding:6px 8px}
|
||||
.widget-head .wicon{font-size:18px}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,20 @@
|
|||
"use strict";
|
||||
/* version — shown until /api/version resolves (or if the fetch fails, e.g. offline).
|
||||
Kept in sync by hand with the VERSION file at the repo root on every release. */
|
||||
const VERSION = "0.4.53-beta";
|
||||
const VERSION = "0.4.54-beta";
|
||||
/* Safari en oudere mobiele browsers behandelen 100vh/100% soms als de hoogte
|
||||
achter hun adres- en navigatiebalk. visualViewport geeft de werkelijk
|
||||
zichtbare hoogte; de CSS gebruikt deze pixelwaarde als betrouwbare bron en
|
||||
blijft via resize ook bij draaien en in-/uitschuiven van browserbalken bij. */
|
||||
(function trackVisibleViewport(){
|
||||
const update=()=>{
|
||||
const height=window.visualViewport?.height || window.innerHeight;
|
||||
if(height>0)document.documentElement.style.setProperty("--app-height",Math.round(height)+"px");
|
||||
};
|
||||
update();
|
||||
window.addEventListener("resize",update,{passive:true});
|
||||
window.visualViewport?.addEventListener("resize",update,{passive:true});
|
||||
})();
|
||||
(function(){
|
||||
const tag = document.getElementById("verTag");
|
||||
tag.textContent = "v"+VERSION;
|
||||
|
|
|
|||
|
|
@ -109,9 +109,19 @@ test('index.html: elk script heeft defer + cache-busting, font-preload blijft on
|
|||
});
|
||||
|
||||
test('mobiele leerlingweergave volgt de zichtbare viewport zonder witte onderstrook', async () => {
|
||||
const css = await readFile(join(publicRoot, 'css', 'teach.css'), 'utf8');
|
||||
assert.match(css, /html,body\{height:100%; height:100dvh;/);
|
||||
const [css, core] = await Promise.all([
|
||||
readFile(join(publicRoot, 'css', 'teach.css'), 'utf8'),
|
||||
readFile(join(publicRoot, 'js', 'core.js'), 'utf8'),
|
||||
]);
|
||||
assert.match(css, /height:var\(--app-height,100dvh\)/);
|
||||
assert.match(css, /body\{\s*position:relative;/);
|
||||
assert.match(core, /window\.visualViewport\?\.height \|\| window\.innerHeight/);
|
||||
assert.match(core, /visualViewport\?\.addEventListener\("resize",update/);
|
||||
const phone = css.slice(css.indexOf('Widgetinhoud op telefoonformaat'));
|
||||
assert.match(phone, /body\.pupil-mode #pupilView\{[^}]*safe-area-inset-bottom[^}]*overscroll-behavior:contain;/);
|
||||
assert.match(phone, /\.widget-body\{[^}]*overflow-y:auto[^}]*-webkit-overflow-scrolling:touch;/);
|
||||
assert.match(phone, /\.widget-body>:is\(\.lg,\.mt\)\{flex:none;min-height:100%\}/);
|
||||
assert.match(phone, /\.lg-card\{min-height:210px\}/);
|
||||
assert.match(phone, /\.mt-card\{min-height:180px\}/);
|
||||
assert.match(phone, /\.lg-bottom\{min-height:0\}/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue