Skip to content

Commit

Permalink
# This is a combination of 3 commits.
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
someguynamedmatt committed Feb 22, 2018
1 parent 63e987e commit c6b3c09
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
31 changes: 29 additions & 2 deletions app/styles/crate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
.team-info {
@include flex-direction(column);
}
h1 {
position: relative;
bottom: 0.3rem;
}
}
h1 {
padding-left: 10px;
Expand Down Expand Up @@ -118,12 +122,35 @@
}
}

.crate-link {
display: inline-block;
}

@media only screen and (max-width: 639px) {
.white-rows div {
margin: auto auto 0.2rem auto;
text-align: center;
}
.white-rows > div .row {
flex-flow: column wrap;
}
.row > div.stats {
width: 100%;
display: flex;
margin: auto;
}
.crate-link {
text-align: center;
display: block;
}
}

.crate {
.desc {
padding-top: 5px;
@include display-flex;
@include flex-direction(column);
width: 75%;
@media screen and (min-width: 640px){ width: 75%; }
}

.info a {
Expand All @@ -143,7 +170,7 @@
.downloads {
@include display-flex;
@include align-items(center);
padding-bottom: 5px;
@media screen and (min-width: 640px) { padding-bottom: 5px; }
}
.recent-downloads {
@include display-flex;
Expand Down
4 changes: 3 additions & 1 deletion app/templates/components/crate-row.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class='desc'>
<div class='info'>
{{#link-to 'crate' crate.id data-test-crate-link}}{{ crate.name }}{{/link-to}}
<div class='crate-link'>
{{#link-to 'crate' crate.id data-test-crate-link}}{{ crate.name }}{{/link-to}}
</div>
<span class='vers'>
<img
src="https://img.shields.io/crates/v/{{ crate.name }}.svg"
Expand Down

0 comments on commit c6b3c09

Please sign in to comment.