Skip to content

Commit cd8d068

Browse files
A few minor tweaks
1 parent 661d163 commit cd8d068

5 files changed

Lines changed: 34 additions & 11 deletions

File tree

‎codespeed/static/css/main.css‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ div#title {
7575
padding: 0.4em var(--gap);
7676
background-color: var(--surface);
7777
border-bottom: 1px solid var(--border);
78+
border-radius: 0 0 var(--radius) var(--radius);
7879
}
7980
div#title a { display: inline-flex; align-items: center; }
8081
div#title img { display: block; height: 40px; padding: 0; margin: 0; }
@@ -184,10 +185,19 @@ div#presentation div.menubox:hover {
184185
div#presentation div.menubox h2 { font-size: 1.1em; font-weight: 600; }
185186
div#presentation div.menubox p { color: var(--text-muted); }
186187

187-
div#presentation p { min-height: 5.5em; margin: 0.6em 0 0; padding-left: 118px; text-align: left; }
188-
div#presentation div#changes p { background: url(../images/changes.png) no-repeat; }
189-
div#presentation div#timeline p { background: url(../images/timeline.png) no-repeat; }
190-
div#presentation div#comparison p { background: url(../images/comparison.png) no-repeat; }
188+
/* The three icons differ in size (98 to 147px wide); scale them to one height */
189+
div#presentation p {
190+
min-height: 5.5em;
191+
margin: 0.6em 0 0;
192+
padding-left: 122px;
193+
text-align: left;
194+
background-repeat: no-repeat;
195+
background-position: 0 0.2em;
196+
background-size: auto 65px;
197+
}
198+
div#presentation div#changes p { background-image: url(../images/changes.png); }
199+
div#presentation div#timeline p { background-image: url(../images/timeline.png); }
200+
div#presentation div#comparison p { background-image: url(../images/comparison.png); }
191201

192202
div#presentation div#reports { margin-top: 1em; }
193203

@@ -214,7 +224,11 @@ div#content, div.about_content {
214224
text-align: center;
215225
padding: 1em;
216226
}
217-
div.about_content { text-align: left; }
227+
div.about_content { text-align: left; max-width: calc(100ch + 2em); }
228+
/* Keep prose readable: wrap paragraphs at roughly 100 characters */
229+
div.about_content p, div.about_content li, div.about_content h2, div.about_content h3 {
230+
max-width: 100ch;
231+
}
218232

219233
.sidebox {
220234
overflow: hidden;
@@ -297,7 +311,7 @@ table.reports caption {
297311
font-size: 1em;
298312
font-weight: 600;
299313
margin-bottom: 0.4em;
300-
text-align: left;
314+
text-align: center;
301315
}
302316
table.reports caption a { color: var(--text); }
303317
table.reports caption a img { border: 0; vertical-align: middle; height: 14px; margin-bottom: 1px; }
@@ -415,7 +429,14 @@ tbody.commits tr td.date { padding: 0.3em; width: 5em; text-align: right; }
415429
overflow: auto;
416430
}
417431

418-
a#permalink { float: right; font-size: 0.9em; }
432+
a#permalink {
433+
float: right;
434+
display: inline-flex;
435+
align-items: center;
436+
gap: 0.25em;
437+
font-size: 0.9em;
438+
}
439+
a#permalink svg { width: 1.1em; height: 1.1em; }
419440

420441
/* Plot styles */
421442
div#plot { text-align: left; height: 500px; width: 100%; }

‎codespeed/templates/codespeed/changes.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
<div id="configbar">
6060
<span class="options">Results for revision <select id="revision"></select></span>
61-
<a id="permalink" href="#">Permalink</a>
61+
{% include "codespeed/permalink.html" %}
6262
</div>
6363
<div id="content" class="clearfix">
6464
<div id="contentwrap"></div>

‎codespeed/templates/codespeed/comparison.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171
</select>
7272
</span>
7373
<span class="options">
74-
<label for="direction">horizontal</label>
74+
<label for="direction">Horizontal:</label>
7575
<input id="direction" type="checkbox" name="direction" value="horizontal"/>
7676
</span>
77-
<a id="permalink" href="#">Permalink</a>
77+
{% include "codespeed/permalink.html" %}
7878
</div>
7979
<div id="content" class="clearfix">
8080
<div id="plotwrapper"></div>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{% comment %}Permalink anchor with the Bootstrap Icons "link-45deg" glyph (MIT, twbs/icons).{% endcomment %}
2+
<a id="permalink" href="#"><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 d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1 1 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4 4 0 0 1-.128-1.287z"/><path d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243z"/></svg>Permalink</a>

‎codespeed/templates/codespeed/timeline.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<label for="show_extrema_bands">Show extrema bands</label>
9898
</span>
9999
{% endif %}
100-
<a id="permalink" href="#">Permalink</a>
100+
{% include "codespeed/permalink.html" %}
101101
</div>
102102
<div id="content" class="clearfix">
103103
<div id="plotgrid"></div>

0 commit comments

Comments
 (0)