fix(i18n): add 'home' body class to English homepage so section__title margin applies
This commit is contained in:
1 parent
9d78567386
commit
939ce8fcc9
88 files changed
+1830
-2
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import puppeteer from 'puppeteer';
|
||||
const b = await puppeteer.launch({ args:['--no-sandbox','--disable-setuid-sandbox','--use-gl=angle','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
|
||||
const p = await b.newPage();
|
||||
const errs=[]; p.on('pageerror',e=>errs.push(e.message)); p.on('console',m=>{if(m.type()==='error')errs.push(m.text());});
|
||||
await p.setViewport({width:1100,height:1300});
|
||||
await p.goto('http://10.200.201.3:4175/_lab/neu-card.html',{waitUntil:'load',timeout:60000});
|
||||
await new Promise(r=>setTimeout(r,1500));
|
||||
const r = await p.evaluate(()=>{
|
||||
const m=document.querySelector('[data-shader-demo] .card-shader').paperShaderMount;
|
||||
const gl=m.gl;
|
||||
m.render(performance.now()); m.render(performance.now());
|
||||
const W=m.canvasElement.width,H=m.canvasElement.height; const buf=new Uint8Array(W*H*4); gl.readPixels(0,0,W,H,gl.RGBA,gl.UNSIGNED_BYTE,buf);
|
||||
let bright=0,maxc=0; for(let i=0;i<buf.length;i+=4){const mx=Math.max(buf[i],buf[i+1],buf[i+2]); if(mx>120)bright++; maxc=Math.max(maxc,mx);}
|
||||
return { brightPixels: bright, maxChannel: maxc };
|
||||
});
|
||||
console.log(JSON.stringify(r,null,1));
|
||||
console.log('ERRS', errs.slice(0,5));
|
||||
await b.close();
|
||||
Reference in new issue
Block a user