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,17 @@
|
||||
import puppeteer from 'puppeteer';
|
||||
import sharp from 'sharp';
|
||||
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();
|
||||
await p.setViewport({width:1280,height:1400,deviceScaleFactor:1});
|
||||
await p.goto('http://10.200.201.3:4175/_lab/neu-card.html',{waitUntil:'load',timeout:60000});
|
||||
await new Promise(r=>setTimeout(r,2000));
|
||||
const el = await p.$('#sec-shader');
|
||||
await el.screenshot({ path: '/tmp/shader-sec.png' });
|
||||
// analyse average + stddev of color
|
||||
const {data,info} = await sharp('/tmp/shader-sec.png').raw().toBuffer({resolveWithObject:true});
|
||||
let n=info.width*info.height, rs=0,gs=0,bs=0; const cols=new Set();
|
||||
for(let i=0;i<data.length;i+=3){ rs+=data[i]; gs+=data[i+1]; bs+=data[i+2];
|
||||
if(i%900===0) cols.add(`${data[i]>>4},${data[i+1]>>4},${data[i+2]>>4}`); }
|
||||
console.log('avg rgb', Math.round(rs/n),Math.round(gs/n),Math.round(bs/n));
|
||||
console.log('distinct coarse colors sampled:', cols.size);
|
||||
await b.close();
|
||||
Reference in new issue
Block a user