Skip to content

Commit

Permalink
html: Fix tab on mobile, fix tables that aren't responsive/too large. (
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jun 19, 2019
1 parent 726b877 commit 9d6fada
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 33 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/html/assets/css/index.min.css

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions lib/plugins/html/src/sass/components/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ section {

@media screen and (max-width: 650px) {
#tabs {
a {
font-size: 0;
}
a:before {
margin: 0;
font-size: 18px;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/html/templates/url/metrics/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ if browsertime
each value, name in browsertime.cdp.performance
tr
td #{name}
td #{value}
td #{value.toFixed(0)}

if options.browsertime.visualElements
a#visual-elements
Expand Down
56 changes: 28 additions & 28 deletions lib/plugins/html/templates/url/thirdparty/firstParty.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ p Calculated using #{pagexray.firstPartyRegEx} (use
code --firstParty
| to configure).
.responsive
table(data-sortable, id='contentSizeFirstParty')
+rowHeading(['Content', 'Header Size', 'Transfer Size', 'Content Size', 'Requests'])
each data, type in pagexray.firstParty.contentTypes
table(data-sortable, id='contentSizeFirstParty')
+rowHeading(['Content', 'Header Size', 'Transfer Size', 'Content Size', 'Requests'])
each data, type in pagexray.firstParty.contentTypes
tr
td(data-title='Content Type') #{type}
+sizeCell('headerSize', data.headerSize)
+sizeCell('transferSize', data.transferSize)
+sizeCell('contentSize', data.contentSize)
+numberCell('requests', data.requests)
tr
td(data-title='Content Type') #{type}
+sizeCell('headerSize', data.headerSize)
+sizeCell('transferSize', data.transferSize)
+sizeCell('contentSize', data.contentSize)
+numberCell('requests', data.requests)
tr
td(data-title='Total') Total
+sizeCell('headerSize', pagexray.firstParty.headerSize)
+sizeCell('transferSize', pagexray.firstParty.transferSize)
+sizeCell('contentSize', pagexray.firstParty.contentSize)
+numberCell('requests', pagexray.firstParty.requests)
td(data-title='Total') Total
+sizeCell('headerSize', pagexray.firstParty.headerSize)
+sizeCell('transferSize', pagexray.firstParty.transferSize)
+sizeCell('contentSize', pagexray.firstParty.contentSize)
+numberCell('requests', pagexray.firstParty.requests)

a#third-party
h3 Third party requests and sizes per content type
.responsive
table(data-sortable, id='contentSizeThirdParty')
+rowHeading(['Content', 'Header Size', 'Transfer Size', 'Content Size', 'Requests'])
each data, type in pagexray.thirdParty.contentTypes
table(data-sortable, id='contentSizeThirdParty')
+rowHeading(['Content', 'Header Size', 'Transfer Size', 'Content Size', 'Requests'])
each data, type in pagexray.thirdParty.contentTypes
tr
td(data-title='Content Type') #{type}
+sizeCell('headerSize', data.headerSize)
+sizeCell('transferSize', data.transferSize)
+sizeCell('contentSize', data.contentSize)
+numberCell('requests', data.requests)
tr
td(data-title='Content Type') #{type}
+sizeCell('headerSize', data.headerSize)
+sizeCell('transferSize', data.transferSize)
+sizeCell('contentSize', data.contentSize)
+numberCell('requests', data.requests)
tr
td(data-title='Total') Total
+sizeCell('headerSize', pagexray.thirdParty.headerSize)
+sizeCell('transferSize', pagexray.thirdParty.transferSize)
+sizeCell('contentSize', pagexray.thirdParty.contentSize)
+numberCell('requests', pagexray.thirdParty.requests)
td(data-title='Total') Total
+sizeCell('headerSize', pagexray.thirdParty.headerSize)
+sizeCell('transferSize', pagexray.thirdParty.transferSize)
+sizeCell('contentSize', pagexray.thirdParty.contentSize)
+numberCell('requests', pagexray.thirdParty.requests)

0 comments on commit 9d6fada

Please sign in to comment.