diff --git a/coverage/generate-index-html.py b/coverage/generate-index-html.py index 36e23e5..2caaa57 100755 --- a/coverage/generate-index-html.py +++ b/coverage/generate-index-html.py @@ -32,18 +32,36 @@ main { margin-bottom: 2rem; } .table-header, .table-row { + box-sizing: border-box; display: flex; width: 100%; padding: 2px 10px; } - .table-header { font-weight: bold; } + .table-header { font-weight: bold;} .table-header > div, .table-row > div { flex-grow: 1; width: 100px; } .table-row:nth-child(even) { background-color: #eee; } - .sha { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + .sha .cell-value { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + .cell-header { display: none; } + @media screen and (min-width: 690px) and (max-width: 850px) { + .table-header > div:nth-child(n+3), + .table-row > div:nth-child(n+3) { + flex-grow: 0.2; + } + .table-header > div:first-child, + .table-row > div:first-child { + flex-grow: 0.4; + } + } + @media screen and (max-width: 690px) { + .cell-header { display: block; font-weight: bold; } + .table-header { display: none; } + .table-row { display: block; } + .table-row > div { width: 100%; text-align: center; margin-bottom: 12px;} + } @@ -73,10 +91,10 @@ date = datetime.datetime.strptime(date, '%Y-%m-%dT%H:%M:%S%fZ').strftime("%d/%m/%Y %H:%M") out.write('''
-
{0}
-
{1}
-
{2:05.2f} %
-
{3:05.2f} %
+
Date (UTC)
{0}
+
HEAD
+
JS Coverage
+
C++ Coverage
'''.format(date, sha, float(jscov), float(cxxcov))) out.write('''