Change responsive_layout sizes and result format

This commit is contained in:
Marian Steinbach 2018-09-27 21:45:12 +02:00
parent 818e072756
commit 2a6e02cf5d
2 changed files with 7 additions and 3 deletions

View file

@ -18,8 +18,7 @@ class Checker(AbstractChecker):
# sizes we check for (width, height)
sizes = (
(320, 480), # old smartphone
(360, 640), # slightly newer smartphone
(360, 640), # rather old smartphone
(768, 1024), # older tablet or newer smartphone
(1024, 768), # older desktop or horiz. tablet
(1920, 1080), # Full HD horizontal
@ -40,7 +39,11 @@ class Checker(AbstractChecker):
results = {}
for url in self.config.urls:
results[url] = self.check_responsiveness(url)
sizes = self.check_responsiveness(url)
results[url] = {
'sizes': sizes,
'min_document_width': min([s['document_width'] for s in sizes]),
}
return results

View file

@ -198,6 +198,7 @@ def check_site(entry):
pprint(nextgen_results['charset'])
pprint(nextgen_results['html_head'])
pprint(nextgen_results['generator'])
pprint(nextgen_results['responsive_layout'])
result['details']['hostnames'] = nextgen_results['dns_resolution'].values()
#logging.debug("result[details][hostnames]: %r" % result['details']['hostnames'])