Skip to content

Commit f7c3dad

Browse files
Add a download icon beside the export button
1 parent 779d1c2 commit f7c3dad

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎codespeed/static/css/main.css‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,18 @@ tbody.commits tr td.date { padding: 0.3em; width: 5em; text-align: right; }
449449
overflow: auto;
450450
}
451451

452-
a#permalink {
452+
a#permalink, a#exportcsv {
453453
margin-left: auto;
454454
display: inline-flex;
455455
align-items: center;
456456
gap: 0.25em;
457457
font-size: 0.9em;
458458
}
459-
a#permalink svg { width: 1.1em; height: 1.1em; }
459+
a#permalink svg, a#exportcsv svg { width: 1.1em; height: 1.1em; }
460+
/* The download glyph fills its 16px grid, the link glyph does not;
461+
shrink it slightly so the two look the same size. */
462+
a#exportcsv svg { width: 0.95em; height: 0.95em; }
463+
a#exportcsv + a#permalink { margin-left: 1em; }
460464

461465
/* Plot styles */
462466
div#plot { text-align: left; height: 500px; width: 100%; }
@@ -577,6 +581,4 @@ div.footer a:hover { color: var(--accent); text-decoration: underline; }
577581

578582
/* speed.pypy.org additions */
579583
.envlinecolor { float: right; font-size: 12px; line-height: 18px; color: #555; }
580-
a#exportcsv { margin-left: auto; font-size: small; }
581-
a#exportcsv + a#permalink { margin-left: 1em; }
582584
a#exportcsv:hover { text-decoration: underline; }

‎codespeed/templates/codespeed/comparison.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
<label for="direction">Horizontal:</label>
7878
<input id="direction" type="checkbox" name="direction" value="horizontal"/>
7979
</span>
80-
<a id="exportcsv" href="#">Export CSV</a>
80+
{% comment %}Bootstrap Icons "download" glyph (MIT, twbs/icons).{% endcomment %}
81+
<a id="exportcsv" 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="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5"/><path d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708z"/></svg>Export CSV</a>
8182
{% include "codespeed/permalink.html" %}
8283
</div>
8384
<div id="graph-title" style="text-align:center; padding:8px 0; font-size:15px;"></div>

0 commit comments

Comments
 (0)