Skip to content

Commit ff45bd1

Browse files
authored
Merge pull request #478 from ducks/docs-repo-homepage-links-in-search-474
adding docs, homepage, and repo links to crate-row/search
2 parents 390b2d5 + 4e2b71e commit ff45bd1

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

app/styles/crate.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
padding: 20px 0;
9898
@include display-flex;
9999
@include justify-content(space-between);
100+
@include flex-wrap(wrap);
100101

101102
&:last-of-type { border: none; }
102103
}
@@ -123,6 +124,24 @@
123124
color: $main-color-light;
124125
}
125126
.downloads { @include display-flex; @include align-items(center); }
127+
128+
.quick-links {
129+
ul {
130+
@include display-flex;
131+
font-size: 80%;
132+
list-style-type: none;
133+
margin: 1em 0 0 0;
134+
padding: 0;
135+
136+
li {
137+
margin-right: 1em;
138+
139+
&:last-child {
140+
margin-right: 0;
141+
}
142+
}
143+
}
144+
}
126145
}
127146

128147
.pagination {

app/templates/components/crate-row.hbs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,16 @@
1515
<span class='num'>{{ format-num crate.downloads }}</span>
1616
</div>
1717
</div>
18+
<div class="quick-links">
19+
<ul>
20+
{{#if crate.homepage}}
21+
<li><a href="{{crate.homepage}}">Homepage</a></li>
22+
{{/if}}
23+
{{#if crate.documentation}}
24+
<li><a href="{{crate.documentation}}">Documentation</a></li>
25+
{{/if}}
26+
{{#if crate.repository}}
27+
<li><a href="{{crate.repository}}">Repository</a></li>
28+
{{/if}}
29+
</ul>
30+
</div>

0 commit comments

Comments
 (0)