Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
make listing collection colorless and odorless (bug 1131402)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Feb 12, 2015
1 parent cf5e07b commit 4243143
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
9 changes: 4 additions & 5 deletions src/media/css/feed/collections.styl
Expand Up @@ -16,15 +16,14 @@
// Header for listing collections on the homepage.
display: block;
height: 48px;
padding-top: 15px;
padding-top: 30px;
position: relative;
text-align: center;

&:hover {
text-decoration: none;
}
h3 {
color: $white;
font-size: 20px;
font-weight: 200;
line-height: 20px;
Expand All @@ -33,13 +32,12 @@

.collection-listing-desc {
type_body();
padding-bottom: 10px;
text-align: center;
padding-bottom: 5px;
}

.feed-landing-header .collection-listing-desc {
color: $white;
padding: 10px;
padding: 10px 10px 30px;
}

[data-page-type~="homepage"] .collection-listing-header {
Expand All @@ -60,6 +58,7 @@

.collection-group-header {
_h3();
padding-top: 30px;
}

.collection-landing-header-mobile {
Expand Down
7 changes: 7 additions & 0 deletions src/media/css/feed/colors.styl
Expand Up @@ -12,6 +12,13 @@ feed_background_color($color) {
}
}

[data-collection-landing-color],
[data-shelf-landing-carrier] {
h1,
.feed-landing-description {
color: $white;
}
}
[data-collection-landing-color="amber"] {
collection_background_colors($color-collection--amber);
}
Expand Down
11 changes: 6 additions & 5 deletions src/media/css/feed/landing.styl
Expand Up @@ -5,6 +5,9 @@
*/
@import '../lib';

.feed-landing.full > div {
padding-top: 0;
}

.feed-landing-header {
display: block;
Expand Down Expand Up @@ -39,11 +42,6 @@
.feed-landing-header-desktop {
display: none;
width: 100%;

h1,
.feed-landing-description {
color: $white;
}
}


Expand All @@ -59,6 +57,9 @@
}

@media $base-tablet {
.feed-landing.full > div {
padding-top: 30px;
}
.feed-landing-header {
left: -10%;
position: relative;
Expand Down
9 changes: 3 additions & 6 deletions src/templates/_macros/feed_item.html
Expand Up @@ -157,15 +157,12 @@ <h1 class="name">{{ coll.name|translate(coll)|safe }}</h1>
{% endmacro %}

{% macro collection_listing_header(coll) %}
{% set color = coll.color or 'sapphire' %}

<a class="collection-listing-header"
href="{{ url('feed/feed_collection', [coll.slug])|urlparams(src='collection-element') }}"
data-feed-color="{{ color }}">
href="{{ url('feed/feed_collection', [coll.slug])|urlparams(src='collection-element') }}">
<h3>{{ coll.name|translate(coll)|safe }}</h3>
</a>
{% if coll.description %}
<p class="collection-listing-desc" data-collection-color="{{ color }}">
<p class="collection-listing-desc">
{{ coll.description|translate(coll)|safe }}
</p>
{% endif %}
Expand Down Expand Up @@ -202,7 +199,7 @@ <h3>{{ coll.name|translate(coll)|safe }}</h3>
{% set src = 'operator-shelf-element' if coll.carrier else 'collection-element' %}

<div class="feed-landing-wrapper" data-tracking="{{ coll.slug }}"
{% if not coll.carrier %}
{% if not coll.carrier and coll.type != feed.COLL_LISTING %}
data-collection-landing-color="{{ color }}"
{% endif %}
{% if coll.background_image %}data-collection-landing-has-background-image{% endif %}
Expand Down

0 comments on commit 4243143

Please sign in to comment.