Merge branch 'akinwale-ui-discover-cards'

This commit is contained in:
Jeremy Kauffman 2017-07-19 18:13:40 -04:00
commit 4886f1a81a
2 changed files with 25 additions and 17 deletions

View file

@ -78,10 +78,11 @@ class FileCard extends React.PureComponent {
onClick={() => navigate("/show", { uri })} onClick={() => navigate("/show", { uri })}
className="card__link" className="card__link"
> >
<CardMedia title={title} thumbnail={thumbnail} />
<div className="card__title-identity"> <div className="card__title-identity">
<h5 title={title}> <div className="card__title" title={title}>
<TruncatedText lines={1}>{title}</TruncatedText> <TruncatedText lines={1}>{title}</TruncatedText>
</h5> </div>
<div className="card__subtitle"> <div className="card__subtitle">
<span style={{ float: "right" }}> <span style={{ float: "right" }}>
<FilePrice uri={uri} /> <FilePrice uri={uri} />
@ -92,7 +93,6 @@ class FileCard extends React.PureComponent {
<UriIndicator uri={uri} /> <UriIndicator uri={uri} />
</div> </div>
</div> </div>
<CardMedia title={title} thumbnail={thumbnail} />
<div className="card__content card__subtext card__subtext--two-lines"> <div className="card__content card__subtext card__subtext--two-lines">
<TruncatedMarkdown lines={2}>{description}</TruncatedMarkdown> <TruncatedMarkdown lines={2}>{description}</TruncatedMarkdown>
</div> </div>

View file

@ -19,18 +19,29 @@ $padding-card-horizontal: $spacing-vertical * 2/3;
.card--obscured .card__inner { .card--obscured .card__inner {
filter: blur($blur-intensity-nsfw); filter: blur($blur-intensity-nsfw);
} }
.card__title-primary { .card__title-primary,
.card__title-identity,
.card__actions,
.card__content,
.card__subtext {
padding: 0 $padding-card-horizontal; padding: 0 $padding-card-horizontal;
}
.card--small {
.card__title-primary,
.card__title-identity,
.card__actions,
.card__content,
.card__subtext {
padding: 0 $padding-card-horizontal / 2;
}
}
.card__title-primary {
margin-top: $spacing-vertical * 2/3; margin-top: $spacing-vertical * 2/3;
} }
.card__title-identity { .card__title-identity {
padding: 0 $padding-card-horizontal;
margin-top: $spacing-vertical * 1/3; margin-top: $spacing-vertical * 1/3;
margin-bottom: $spacing-vertical * 1/3; margin-bottom: $spacing-vertical * 1/3;
} }
.card__actions {
padding: 0 $padding-card-horizontal;
}
.card__actions { .card__actions {
margin-top: $spacing-vertical * 2/3; margin-top: $spacing-vertical * 2/3;
} }
@ -45,21 +56,18 @@ $padding-card-horizontal: $spacing-vertical * 2/3;
.card__content { .card__content {
margin-top: $spacing-vertical * 2/3; margin-top: $spacing-vertical * 2/3;
margin-bottom: $spacing-vertical * 2/3; margin-bottom: $spacing-vertical * 2/3;
padding: 0 $padding-card-horizontal;
} }
.card__subtext { .card__subtext {
color: #444; color: $color-meta-light;
margin-top: 12px; font-size: 0.82em;
font-size: 0.9em; margin-top: $spacing-vertical * 1/3;
margin-top: $spacing-vertical * 2/3; margin-bottom: $spacing-vertical * 1/3;
margin-bottom: $spacing-vertical * 2/3;
padding: 0 $padding-card-horizontal;
} }
.card__subtext--allow-newlines { .card__subtext--allow-newlines {
white-space: pre-wrap; white-space: pre-wrap;
} }
.card__subtext--two-lines { .card__subtext--two-lines {
height: $font-size * 0.9 * $font-line-height * 2; height: $font-size * 0.82 * $font-line-height * 2; /*this is so one line text still has the proper height*/
} }
.card-overlay { .card-overlay {
position: absolute; position: absolute;
@ -144,7 +152,7 @@ $card-link-scaling: 1.1;
top: 36% top: 36%
} }
$width-card-small: $spacing-vertical * 12; $width-card-small: $spacing-vertical * 10;
$height-card-small: $spacing-vertical * 15; $height-card-small: $spacing-vertical * 15;
.card--small { .card--small {