Files
huncode 12562baeb5
Build and deploy / deploy (push) Successful in 2m39s
Implement ProgCode identity and real shared reading UI kit
2026-10-27 15:19:49 +03:00

2 lines
1.3 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
async page=>{const b='http://127.0.0.1:65019',o='/tmp/progcode-ds-designer0340',r={model:'Reflow at 720 CSS px for a 1440px display; separate absolute-font-size ×2 DOM model. Neither is true browser zoom.',checks:[]};for(const [name,path] of [['home','/'],['resources','/resources/'],['privacy','/privacy/'],['json','/tools/'],['kit','/ui-kit/'],['tilix','/articles/о-tilix-и-d-интервью-с-геральдом-нанном/']]){await page.setViewportSize({width:720,height:450});await page.goto(b+path);await page.getByRole('combobox',{name:'Тема'}).selectOption('light');r.checks.push({name,model:'720CSS',...await page.evaluate(()=>({width:innerWidth,scroll:document.documentElement.scrollWidth}))});await page.screenshot({path:o+'/'+name+'-reflow720.png'});await page.setViewportSize({width:1440,height:900});await page.goto(b+path);await page.evaluate(()=>{const es=[...document.querySelectorAll('html,body,body *')].filter(e=>e instanceof HTMLElement).map(e=>[e,parseFloat(getComputedStyle(e).fontSize)]);for(const [e,size] of es)e.style.fontSize=(size*2)+'px';});r.checks.push({name,model:'text200DOM',...await page.evaluate(()=>({width:innerWidth,scroll:document.documentElement.scrollWidth,mainWidth:document.querySelector('main')?.clientWidth}))});await page.screenshot({path:o+'/'+name+'-text200model.png'});}return r;}