Skip to content

Commit b70e2f6

Browse files
authored
Merge pull request #481 from integer32llc/version-badge-on-crate-list
Display the version badge on crate list pages
2 parents ff45bd1 + 00888f8 commit b70e2f6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/styles/crate.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,12 @@
117117
text-decoration: none;
118118
font-size: 120%;
119119
}
120-
.vers { margin-left: 10px; }
120+
.vers {
121+
margin-left: 10px;
122+
img {
123+
margin-bottom: -4px;
124+
}
125+
}
121126

122127
.stats {
123128
width: 15%;

app/templates/components/crate-row.hbs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
<div class='desc'>
22
<div class='info'>
33
{{#link-to 'crate' crate.id}}{{ crate.name }}{{/link-to}}
4-
<span class='vers small'>{{ crate.max_version }}</span>
4+
<span class='vers'>
5+
<img
6+
src="https://img.shields.io/crates/v/{{ crate.name }}.svg"
7+
alt="{{ crate.max_version }}"
8+
title="{{ crate.name }}’s current version badge" />
9+
</span>
510
</div>
611
<div class='summary'>
712
<span class='small'>

0 commit comments

Comments
 (0)