Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s
Build and deploy / deploy (push) Successful in 2m39s
This commit is contained in:
1 parent
99c848189e
commit
12562baeb5
2040 files changed
+184656
-181
No files matched your search
@@ -0,0 +1,4 @@
|
||||
async(page)=>{const base='http://127.0.0.1:50480',pages=[{"id": "resources", "path": "/resources/"}, {"id": "privacy", "path": "/privacy/"}, {"id": "sources", "path": "/sources/"}, {"id": "accessibility", "path": "/accessibility/"}, {"id": "uikit", "path": "/ui-kit/"}],reps=[{"id": "home", "path": "/", "width": 320, "theme": "light", "status": 200, "title": "ProgCode — записки о программировании", "h1": "Разобраться.Написать. Проверить.", "scrollWidth": 320, "bodyChars": 0, "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 0, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false, "top": "/tmp/progcode-ds-content/home-320-light-top.png"}, {"id": "a0", "path": "/articles/использование-jquery-в-webpack/", "slug": "использование-jquery-в-webpack", "width": 320, "theme": "light", "status": 200, "title": "JavaScript. Использование jQuery в Webpack — ProgCode", "h1": "JavaScript. Использование jQuery в Webpack", "scrollWidth": 320, "bodyChars": 2824, "bodyWidth": 288, "fontSize": "18px", "lineHeight": "30.96px", "bodyColor": "rgb(36, 37, 33)", "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 0, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false}, {"id": "a1", "path": "/articles/bitrix-api-add-foto-editor/", "slug": "bitrix-api-add-foto-editor", "width": 320, "theme": "light", "status": 200, "title": "Bitrix API. Вставка на страницу встроенного редактора картинок — ProgCode", "h1": "Bitrix API. Вставка на страницу встроенного редактора картинок", "scrollWidth": 320, "bodyChars": 2387, "bodyWidth": 288, "fontSize": "18px", "lineHeight": "30.96px", "bodyColor": "rgb(36, 37, 33)", "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 2, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false}, {"id": "a2", "path": "/articles/о-tilix-и-d-интервью-с-геральдом-нанном/", "slug": "о-tilix-и-d-интервью-с-геральдом-нанном", "width": 320, "theme": "light", "status": 200, "title": "О Tilix и D: интервью с Геральдом Нанном — ProgCode", "h1": "О Tilix и D: интервью с Геральдом Нанном", "scrollWidth": 320, "bodyChars": 21566, "bodyWidth": 288, "fontSize": "18px", "lineHeight": "30.96px", "bodyColor": "rgb(36, 37, 33)", "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 1, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false}, {"id": "a6", "path": "/articles/ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate/", "slug": "ошибка-php-ssl-certificate-error-unable-to-get-local-issuer-certificate", "width": 320, "theme": "light", "status": 200, "title": "Ошибка PHP. SSL certificate error: unable to get local issuer certificate — ProgCode", "h1": "Ошибка PHP. SSL certificate error: unable to get local issuer certificate", "scrollWidth": 320, "bodyChars": 2422, "bodyWidth": 288, "fontSize": "18px", "lineHeight": "30.96px", "bodyColor": "rgb(36, 37, 33)", "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 1, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false, "top": "/tmp/progcode-ds-content/a6-320-light-top.png"}, {"id": "a7", "path": "/articles/dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол/", "slug": "dconf-2017-под-капотом-мусорщика-ди-дмитрий-ол", "width": 320, "theme": "light", "status": 200, "title": "DConf-2017. Под капотом мусорщика D (Дмитрий Ольшанский) — ProgCode", "h1": "DConf-2017. Под капотом мусорщика D (Дмитрий Ольшанский)", "scrollWidth": 320, "bodyChars": 13239, "bodyWidth": 288, "fontSize": "18px", "lineHeight": "30.96px", "bodyColor": "rgb(36, 37, 33)", "canvas": "rgb(246, 244, 239)", "h1Width": 288, "h1ScrollWidth": 288, "failedImages": [], "figures": 2, "tableRows": 0, "tableColumns": 0, "downloads": 0, "hasFalseMBHint": false}, {"id": "a8", "path": "/articles/пишем-аналог-функции-php-preg_match_all-на-языке-прог/", "slug": "пишем-аналог-функции-php-preg_match_all-на-языке-прог", "width": 320, "theme": "light", "status": 200, "title": "Пишем аналог функции PHP preg_match_all на языке программирования D — ProgCode", "h1": "Пишем аналог функции PHP preg_match_all на языке программирования D", "scrollWidth": 320, "bodyChars": 5932, "bodyWidth":
Line truncated
|
||||
for(const width of [320,390,1440])for(const theme of ['light','dark'])for(const c of pages){await page.setViewportSize({width,height:1000});await page.emulateMedia({colorScheme:theme,reducedMotion:'reduce'});const res=await page.goto(base+c.path,{waitUntil:'networkidle'});await page.getByLabel('Тема',{exact:true}).selectOption(theme);await page.evaluate(()=>document.fonts.ready);let row=await page.evaluate(()=>({doc:document.documentElement.scrollWidth,width:innerWidth,h1:{text:document.querySelector('h1').innerText,font:getComputedStyle(document.querySelector('h1')).fontSize,client:document.querySelector('h1').clientWidth,scroll:document.querySelector('h1').scrollWidth},text:document.querySelector('main').innerText,footer:document.querySelector('footer').innerText,footerLinks:[...document.querySelectorAll('footer a')].map(a=>({text:a.innerText,url:a.getAttribute('href')})),failedImages:[...document.images].filter(i=>!i.complete||!i.naturalWidth).map(i=>i.src),fields:[...document.querySelectorAll('input,textarea')].map(e=>({id:e.id,width:e.getBoundingClientRect().width,cls:e.className})),download:document.querySelectorAll('[download]').length}));row={...c,width,theme,status:res.status(),...row};await page.screenshot({path:'/tmp/progcode-ds-cm-f5/'+c.id+'-'+width+'-'+theme+'-top.png'});await page.evaluate(()=>window.scrollTo({top:document.body.scrollHeight,behavior:'instant'}));await page.screenshot({path:'/tmp/progcode-ds-cm-f5/'+c.id+'-'+width+'-'+theme+'-footer.png'});results.push(row);}
|
||||
for(let i=0;i<reps.length;i++){let c=reps[i];const width=i%3===0?1440:i%3===1?320:390,theme=i%2?'light':'dark';await page.setViewportSize({width,height:1000});await page.emulateMedia({colorScheme:theme,reducedMotion:'reduce'});const res=await page.goto(base+c.path,{waitUntil:'networkidle'});await page.getByLabel('Тема',{exact:true}).selectOption(theme);await page.screenshot({path:'/tmp/progcode-ds-cm-f5/'+c.id+'-'+width+'-'+theme+'-representative.png'});results.push({...c,width,theme,status:res.status(),...await page.evaluate(()=>({doc:document.documentElement.scrollWidth,body:document.querySelector('.article-content')?.textContent.length,failedImages:[...document.images].filter(i=>!i.complete||!i.naturalWidth).map(i=>i.src)}))});}
|
||||
return{source:'f5d92794816398171b68a1d374b24bd0cd9ea0f85d005c7be92369b40d314900',build:'ea4fb0dc8934776e4e9d4213f07c27424962789bfadd1ba9ca51ad31d5736851',base,results,errors,external};}
|
||||
Reference in new issue
Block a user