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

Commit

Permalink
add new stars to reviews on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Aug 7, 2012
1 parent d1d59da commit f4586a2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion media/css/mkt/detail.less
Expand Up @@ -490,7 +490,7 @@ h1 .num {
margin-top: 10px;
padding: 15px 15px 0;
&:before {
left: 135px;
left: 123px;
}
}
.grouped-ratings li {
Expand Down
37 changes: 26 additions & 11 deletions media/css/mkt/ratings.less
Expand Up @@ -153,7 +153,7 @@ section.replies .review.reply {
}
}

.review:nth-of-type(2n) {
#review-list .review:nth-of-type(2n) {
background-color: lighten(@bg, 5%);
+ .replies .review {
background-color: lighten(@bg, 5%);
Expand Down Expand Up @@ -231,18 +231,18 @@ header.product {
}

.stars {
background: url(../../img/mkt/stars/sprite-16.png) no-repeat;
background: url(../../img/mkt/stars/sprite-medium.png) no-repeat;
display: inline-block;
height: 18px;
height: 14px;
margin-right: 4px;
text-indent: -9999px;
vertical-align: middle;
width: 89px;
&.stars-4 { background-position: -18px 0; }
&.stars-3 { background-position: -36px 0; }
&.stars-2 { background-position: -54px 0; }
&.stars-1 { background-position: -72px 0; }
&.stars-0 { background-position: -90px 0; }
width: 64px;
&.stars-4 { background-position: -13px 0; }
&.stars-3 { background-position: -26px 0; }
&.stars-2 { background-position: -39px 0; }
&.stars-1 { background-position: -52px 0; }
&.stars-0 { background-position: -65px 0; }
&.ratingwidget {
background: url(../../img/mkt/stars/32.png) repeat-x;
background-repeat: repeat-x 5px 0;
Expand All @@ -266,6 +266,21 @@ header.product {
margin: 0 0 0 4px;
}

.featured .stars {
background-image: url(../../img/mkt/stars/sprite-tiny.png);
height: 9px;
width: 45px;
&.stars-4 { background-position: -9px 0; }
&.stars-3 { background-position: -18px 0; }
&.stars-2 { background-position: -27px 0; }
&.stars-1 { background-position: -36px 0; }
&.stars-0 { background-position: -45px 0; }
}

.featured .rating .cnt {
display: none;
}

.no-rating strong {
font-size: 12px;
font-weight: 700;
Expand Down Expand Up @@ -360,7 +375,7 @@ header.product {
height: 22px;
position: absolute;
top: 0;
left: 96px;
left: 71px; /* old stars: 96px */
width: 2px;
z-index: 0;
}
Expand All @@ -370,7 +385,7 @@ header.product {
height: 36px;
position: absolute;
top: -5px;
left: 89px;
left: 64px; /* old stars: 89px */
width: 9px;
z-index: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion media/css/mkt/tile.less
Expand Up @@ -2,4 +2,4 @@
.author {
display: none;
}
}
}
Binary file added media/img/mkt/stars/sprite-medium.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/img/mkt/stars/sprite-tiny.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion mkt/webapps/models.py
Expand Up @@ -406,7 +406,8 @@ class ContentRating(amo.models.ModelBase):
"""
addon = models.ForeignKey('addons.Addon', related_name='content_ratings')
ratings_body = models.PositiveIntegerField(
choices=[(k, rb.name) for k, rb in ratingsbodies.RATINGS_BODIES.items()],
choices=[(k, rb.name) for k, rb in
ratingsbodies.RATINGS_BODIES.items()],
null=False)
rating = models.PositiveIntegerField(null=False)

Expand Down

0 comments on commit f4586a2

Please sign in to comment.