Skip to content

Commit 977fccd

Browse files
Fix changes page column alignment and overflow
1 parent cf3ee0c commit 977fccd

3 files changed

Lines changed: 23 additions & 20 deletions

File tree

‎codespeed/static/css/main.css‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,15 @@ div#configbar span.options { padding-right: 1.8em; font-size: 0.9em; white-space
228228
div#configbar input { margin-right: 0; vertical-align: middle; }
229229
div#configbar select { margin: 0 0.3em; }
230230

231+
div#contentnav { display: flex; gap: 1em; margin-bottom: 0.5em; }
231232
div#contentnav a {
232233
display: inline-flex;
233234
align-items: center;
234235
gap: 0.3em;
235236
font-size: 0.9em;
236-
padding-bottom: 0.25em;
237237
}
238238
div#contentnav a svg { width: 1.1em; height: 1.1em; }
239-
div#contentnav #previous { float: left; }
240-
div#contentnav #next { float: right; }
239+
div#contentnav #next { margin-left: auto; }
241240

242241
div#content, div.about_content {
243242
margin-left: calc(var(--sidebar-width) + 0.8em);
@@ -311,12 +310,17 @@ div#historical-plot { width: 600px; height: 400px; margin: 0 auto; }
311310
div#historical p { margin: 0.6em 0 1em; }
312311
div#historical p.plot-caption { font-size: 0.9em; color: var(--text-muted); }
313312

314-
/* Changes page layout */
315-
div#contentwrap { display: table; table-layout: fixed; width: 100%; }
316-
div#contentwrap div { display: table-cell; }
317-
div#contentwrap div.leftcolumn { width: 65%; }
318-
div#contentwrap div.rightcolumn { padding-left: 0.8em; width: 35%; }
319-
div#contentwrap div div { display: block; }
313+
/* Changes page layout: previous/next navigation across the top, the
314+
results table on the left and the revision details on the right */
315+
div#contentwrap {
316+
display: grid;
317+
grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
318+
column-gap: 0.8em;
319+
align-items: start;
320+
}
321+
div#contentwrap > div { grid-column: 1 / -1; }
322+
div#contentwrap > div.leftcolumn { grid-column: 1; }
323+
div#contentwrap > div.rightcolumn { grid-column: 2; }
320324

321325
/* Tables */
322326
table.tablesorter, table.info, table.revision, table.reports {
@@ -347,7 +351,7 @@ table.reports tr:first-child td { border-top: 0; }
347351
table.reports td:not(:first-child) { white-space: nowrap; }
348352
table.reports tr.status-none td.summary { opacity: 0.5; }
349353

350-
table.tablesorter { margin-right: 0.8em; margin-bottom: 0.8em; }
354+
table.tablesorter { margin-bottom: 0.8em; }
351355
table.tablesorter thead tr th {
352356
padding: 0.5em 14px 0.5em 0.5em;
353357
width: 5em;
@@ -420,7 +424,7 @@ table.tablesorter tbody tr.highlight td, tr.highlight td {
420424

421425
table.revision { table-layout: fixed; }
422426
table.revision col:first-child, table.info col:first-child { width: 5.3em; }
423-
table.info { margin-bottom: 1em; }
427+
table.info, table.revision { margin-bottom: 1em; }
424428
table.info th, table.revision th {
425429
background-color: var(--surface-alt);
426430
vertical-align: top;
@@ -559,7 +563,6 @@ div.footer a:hover { color: var(--accent); text-decoration: underline; }
559563
@media only screen and (max-width: 1100px) {
560564
:root { --sidebar-width: 12.5em; }
561565
div#container { padding: 0 0.5em; }
562-
div#contentwrap div.leftcolumn { width: 65%; }
563566
}
564567

565568
@media only screen and (max-width: 1090px) {
@@ -568,8 +571,8 @@ div.footer a:hover { color: var(--accent); text-decoration: underline; }
568571
}
569572

570573
@media only screen and (max-width: 1005px) {
571-
div#contentwrap div { display: table-row !important; }
572-
table.info { margin-bottom: 0.8em; }
574+
div#contentwrap { grid-template-columns: minmax(0, 1fr); }
575+
div#contentwrap > div.leftcolumn, div#contentwrap > div.rightcolumn { grid-column: 1; }
573576
div#title { min-height: 48px; margin-bottom: 0.6em; }
574577
div#title img { height: 32px; }
575578
div#title h2 { font-size: 1em; }

‎codespeed/templates/codespeed/changes_data.html‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<div id="contentnav">
2+
{% comment %}Arrows are Bootstrap Icons arrow-left / arrow-right (MIT, twbs/icons){% endcomment %}
3+
{% if prev %}<a id="previous" href="#" data-revision="{{ prev.rev }}" data-desc="{{ prev.desc }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"/></svg>{{ prev.short_rev }}{% if prev.summary %} ({{ prev.summary }}){% endif %}</a>{% endif %}
4+
{% if next %}<a id="next" href="#" data-revision="{{ next.rev }}" data-desc="{{ next.desc }}">{{ next.short_rev }}{% if next.summary %} ({{ next.summary }}){% endif %}<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"/></svg></a>{% endif %}
5+
</div>
6+
17
<div class="leftcolumn">
28
{% include 'codespeed/changes_table.html' %}
39
</div>

‎codespeed/templates/codespeed/changes_table.html‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{% load percentages %}
22

3-
<div id="contentnav">
4-
{% comment %}Arrows are Bootstrap Icons arrow-left / arrow-right (MIT, twbs/icons){% endcomment %}
5-
{% if prev %}<a id="previous" href="#" data-revision="{{ prev.rev }}" data-desc="{{ prev.desc }}"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M15 8a.5.5 0 0 0-.5-.5H2.707l3.147-3.146a.5.5 0 1 0-.708-.708l-4 4a.5.5 0 0 0 0 .708l4 4a.5.5 0 0 0 .708-.708L2.707 8.5H14.5A.5.5 0 0 0 15 8"/></svg>{{ prev.short_rev }}{% if prev.summary %} ({{ prev.summary }}){% endif %}</a>{% endif %}
6-
{% if next %}<a id="next" href="#" data-revision="{{ next.rev }}" data-desc="{{ next.desc }}">{{ next.short_rev }}{% if next.summary %} ({{ next.summary }}){% endif %}<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill-rule="evenodd" d="M1 8a.5.5 0 0 1 .5-.5h11.793l-3.147-3.146a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1 0 .708l-4 4a.5.5 0 0 1-.708-.708L13.293 8.5H1.5A.5.5 0 0 1 1 8"/></svg></a>{% endif %}
7-
</div>
8-
93
{% for units in tablelist %}
104
<table class="tablesorter" data-lessisbetter="{{ units.lessisbetter }}">
115
<thead>

0 commit comments

Comments
 (0)