Skip to content

Commit deb94c7

Browse files
Use Bootstrap icons instead of emoji
1 parent e027781 commit deb94c7

3 files changed

Lines changed: 26 additions & 8 deletions

File tree

‎codespeed/static/css/main.css‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ ul#links {
9898
}
9999
ul#links li { margin-left: 0.25em; }
100100
ul#links li a:link, ul#links li a:visited {
101-
display: inline-block;
101+
display: inline-flex;
102+
align-items: center;
103+
gap: 0.4em;
102104
padding: 0.35em 0.75em;
103105
color: var(--text-muted);
104106
border-radius: var(--radius-sm);
105107
text-decoration: none;
106108
}
109+
ul#links li a svg { width: 1.05em; height: 1.05em; overflow: visible; stroke: currentColor; stroke-width: 0.6; stroke-linejoin: round; }
107110
ul#links li a:hover, ul#links li a:focus {
108111
color: var(--text);
109112
background-color: var(--surface-alt);
@@ -215,7 +218,14 @@ div#configbar span.options { padding-right: 1.8em; font-size: 0.9em; white-space
215218
div#configbar input { margin-right: 0; vertical-align: middle; }
216219
div#configbar select { margin: 0 0.3em; }
217220

218-
div#contentnav a { font-size: 0.9em; padding-bottom: 0.25em; }
221+
div#contentnav a {
222+
display: inline-flex;
223+
align-items: center;
224+
gap: 0.3em;
225+
font-size: 0.9em;
226+
padding-bottom: 0.25em;
227+
}
228+
div#contentnav a svg { width: 1.1em; height: 1.1em; }
219229
div#contentnav #previous { float: left; }
220230
div#contentnav #next { float: right; }
221231

@@ -263,15 +273,21 @@ div.about_content p, div.about_content li, div.about_content h2, div.about_conte
263273
a.togglefold { color: var(--text); font-weight: 500; }
264274
a.togglefold:hover { text-decoration: none; }
265275
a.togglefold::before {
266-
content: '▶';
276+
/* Bootstrap Icons chevron-right (MIT, twbs/icons), coloured via mask */
277+
content: '';
267278
display: inline-block;
279+
width: 0.8em;
280+
height: 0.8em;
268281
margin-right: 0.35em;
269-
font-size: 0.65em;
270-
color: var(--text-faint);
282+
vertical-align: -0.05em;
283+
background-color: var(--text-muted);
284+
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' stroke='%23000' stroke-width='1.2' stroke-linejoin='round' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E") no-repeat center / contain;
285+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' stroke='%23000' stroke-width='1.2' stroke-linejoin='round' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E") no-repeat center / contain;
271286
transition: transform 0.15s ease;
272287
transform: rotate(90deg);
273288
}
274289
a.togglefold.folded::before { transform: rotate(0deg); }
290+
a.togglefold:hover::before { background-color: var(--text); }
275291
.checklinks { font-size: 0.85em; color: var(--text-faint); }
276292
a.checkall, a.uncheckall { color: var(--text-faint); }
277293
a.checkall:hover, a.uncheckall:hover { color: var(--accent); }

‎codespeed/templates/codespeed/base.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
</a>
2222
<h2>{% block page_title %}SPEED CENTER{% endblock page_title %}</h2>
2323
{% block top_nav %}
24+
{# Icons: Bootstrap Icons house-door and info-circle (MIT, twbs/icons) #}
2425
<ul id="links" class="inline">
25-
<li><a href="{% url 'home' %}">Home</a></li><li><a href="{% url 'about' %}">About</a></li>
26+
<li><a href="{% url 'home' %}"><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="M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4.5a.5.5 0 0 0 .5-.5v-4h2v4a.5.5 0 0 0 .5.5H14a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293zM2.5 14V7.707l5.5-5.5 5.5 5.5V14H10v-4a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v4z"/></svg>Home</a></li><li><a href="{% url 'about' %}"><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="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/></svg>About</a></li>
2627
</ul>
2728
{% endblock top_nav %}
2829
{% endblock page_header %}

‎codespeed/templates/codespeed/changes_table.html‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
{% load percentages %}
22

33
<div id="contentnav">
4-
{% if prev %}<a id="previous" href="#" data-revision="{{ prev.rev }}" data-desc="{{ prev.desc }}">← {{ prev.short_rev }}{% if prev.summary %} ({{ prev.summary }}){% endif %}</a>{% endif %}
5-
{% if next %}<a id="next" href="#" data-revision="{{ next.rev }}" data-desc="{{ next.desc }}">{{ next.short_rev }}{% if next.summary %} ({{ next.summary }}){% endif %} →</a>{% endif %}
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 %}
67
</div>
78

89
{% for units in tablelist %}

0 commit comments

Comments
 (0)