Skip to content

Commit c5e41f3

Browse files
# This is a combination of 3 commits.
# This is the 1st commit message: /crates page, better mobile styling # The commit message rust-lang#2 will be skipped: # changed data-test attr for class # The commit message rust-lang#3 will be skipped: # bottom positioning of header element on crates page
1 parent d15aa91 commit c5e41f3

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

app/styles/crate.scss

+29-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
.team-info {
2626
@include flex-direction(column);
2727
}
28+
h1 {
29+
position: relative;
30+
bottom: 0.3rem;
31+
}
2832
}
2933
h1 {
3034
padding-left: 10px;
@@ -118,12 +122,35 @@
118122
}
119123
}
120124

125+
.crate-link {
126+
display: inline-block;
127+
}
128+
129+
@media only screen and (max-width: 639px) {
130+
.white-rows div {
131+
margin: auto auto 0.2rem auto;
132+
text-align: center;
133+
}
134+
.white-rows > div .row {
135+
flex-flow: column wrap;
136+
}
137+
.row > div.stats {
138+
width: 100%;
139+
display: flex;
140+
margin: auto;
141+
}
142+
.crate-link {
143+
text-align: center;
144+
display: block;
145+
}
146+
}
147+
121148
.crate {
122149
.desc {
123150
padding-top: 5px;
124151
@include display-flex;
125152
@include flex-direction(column);
126-
width: 75%;
153+
@media screen and (min-width: 640px){ width: 75%; }
127154
}
128155

129156
.info a {
@@ -143,7 +170,7 @@
143170
.downloads {
144171
@include display-flex;
145172
@include align-items(center);
146-
padding-bottom: 5px;
173+
@media screen and (min-width: 640px) { padding-bottom: 5px; }
147174
}
148175
.recent-downloads {
149176
@include display-flex;

app/templates/components/crate-row.hbs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<div class='desc'>
22
<div class='info'>
3-
{{#link-to 'crate' crate.id data-test-crate-link}}{{ crate.name }}{{/link-to}}
3+
<div class='crate-link'>
4+
{{#link-to 'crate' crate.id data-test-crate-link}}{{ crate.name }}{{/link-to}}
5+
</div>
46
<span class='vers'>
57
<img
68
src="https://img.shields.io/crates/v/{{ crate.name }}.svg"

0 commit comments

Comments
 (0)