Synchronize star ratings of themes and plugins.

Makes themes ratings look like plugins ratings already do.

Props helen.
Fixes #32782.
 

Built from https://develop.svn.wordpress.org/trunk@33073


git-svn-id: http://core.svn.wordpress.org/trunk@33044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-07-03 20:54:24 +00:00
parent 27885cc561
commit 86499fc07d
6 changed files with 74 additions and 104 deletions

View File

@ -1173,62 +1173,54 @@ body.show-upload-theme p.no-themes {
} }
} }
.rating { .theme-details .star-rating {
margin: 15px 0 0; margin: 15px 0 0;
} }
.rating span:before {
color: #e6b800; .theme-details .star-rating span:before {
color: #ffb900;
content: "\f154"; content: "\f154";
display: inline-block; display: inline-block;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font: normal 20px/1 'dashicons'; font: normal 20px/1 'dashicons';
vertical-align: top; vertical-align: top;
} }
/* Half stars */ /* Half stars */
.rating-10 span.one:before, .star-rating.rating-10 span.one:before,
.rating-30 span.two:before, .star-rating.rating-30 span.two:before,
.rating-50 span.three:before, .star-rating.rating-50 span.three:before,
.rating-70 span.four:before, .star-rating.rating-70 span.four:before,
.rating-90 span.five:before { .star-rating.rating-90 span.five:before {
content: "\f459"; content: "\f459";
} }
/* Full stars */ /* Full stars */
.rating-20 span.one:before { .star-rating.rating-20 span.one:before,
.star-rating.rating-30 span.one:before,
.star-rating.rating-40 span.one:before,
.star-rating.rating-40 span.two:before,
.star-rating.rating-50 span.one:before,
.star-rating.rating-50 span.two:before,
.star-rating.rating-60 span.one:before,
.star-rating.rating-60 span.two:before,
.star-rating.rating-60 span.three:before,
.star-rating.rating-70 span.one:before,
.star-rating.rating-70 span.two:before,
.star-rating.rating-70 span.three:before,
.star-rating.rating-80 span.one:before,
.star-rating.rating-80 span.two:before,
.star-rating.rating-80 span.three:before,
.star-rating.rating-80 span.four:before,
.star-rating.rating-90 span.one:before,
.star-rating.rating-90 span.two:before,
.star-rating.rating-90 span.three:before,
.star-rating.rating-90 span.four:before,
.star-rating.rating-100 > span:before {
content: "\f155"; content: "\f155";
} }
.rating-30 span.one:before,
.rating-40 span.one:before, .theme-details .star-rating .ratings {
.rating-40 span.two:before {
content: "\f155";
}
.rating-50 span.one:before,
.rating-50 span.two:before,
.rating-60 span.one:before,
.rating-60 span.two:before,
.rating-60 span.three:before {
content: "\f155";
}
.rating-70 span.one:before,
.rating-70 span.two:before,
.rating-70 span.three:before,
.rating-80 span.one:before,
.rating-80 span.two:before,
.rating-80 span.three:before,
.rating-80 span.four:before {
content: "\f155";
}
.rating-90 span.one:before,
.rating-90 span.two:before,
.rating-90 span.three:before,
.rating-90 span.four:before,
.rating-100 span.one:before,
.rating-100 span.two:before,
.rating-100 span.three:before,
.rating-100 span.four:before,
.rating-100 span.five:before {
content: "\f155";
}
.rating .ratings {
display: block; display: block;
line-height: 20px; line-height: 20px;
color: #999; color: #999;
@ -1675,11 +1667,6 @@ body.full-overlay-active {
float: right; float: right;
} }
.theme-details .star-rating {
margin: 7px 0;
float: left;
}
.theme-details .theme-description { .theme-details .theme-description {
float: right; float: right;
color: #777; color: #777;

View File

@ -1173,62 +1173,54 @@ body.show-upload-theme p.no-themes {
} }
} }
.rating { .theme-details .star-rating {
margin: 15px 0 0; margin: 15px 0 0;
} }
.rating span:before {
color: #e6b800; .theme-details .star-rating span:before {
color: #ffb900;
content: "\f154"; content: "\f154";
display: inline-block; display: inline-block;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
font: normal 20px/1 'dashicons'; font: normal 20px/1 'dashicons';
vertical-align: top; vertical-align: top;
} }
/* Half stars */ /* Half stars */
.rating-10 span.one:before, .star-rating.rating-10 span.one:before,
.rating-30 span.two:before, .star-rating.rating-30 span.two:before,
.rating-50 span.three:before, .star-rating.rating-50 span.three:before,
.rating-70 span.four:before, .star-rating.rating-70 span.four:before,
.rating-90 span.five:before { .star-rating.rating-90 span.five:before {
content: "\f459"; content: "\f459";
} }
/* Full stars */ /* Full stars */
.rating-20 span.one:before { .star-rating.rating-20 span.one:before,
.star-rating.rating-30 span.one:before,
.star-rating.rating-40 span.one:before,
.star-rating.rating-40 span.two:before,
.star-rating.rating-50 span.one:before,
.star-rating.rating-50 span.two:before,
.star-rating.rating-60 span.one:before,
.star-rating.rating-60 span.two:before,
.star-rating.rating-60 span.three:before,
.star-rating.rating-70 span.one:before,
.star-rating.rating-70 span.two:before,
.star-rating.rating-70 span.three:before,
.star-rating.rating-80 span.one:before,
.star-rating.rating-80 span.two:before,
.star-rating.rating-80 span.three:before,
.star-rating.rating-80 span.four:before,
.star-rating.rating-90 span.one:before,
.star-rating.rating-90 span.two:before,
.star-rating.rating-90 span.three:before,
.star-rating.rating-90 span.four:before,
.star-rating.rating-100 > span:before {
content: "\f155"; content: "\f155";
} }
.rating-30 span.one:before,
.rating-40 span.one:before, .theme-details .star-rating .ratings {
.rating-40 span.two:before {
content: "\f155";
}
.rating-50 span.one:before,
.rating-50 span.two:before,
.rating-60 span.one:before,
.rating-60 span.two:before,
.rating-60 span.three:before {
content: "\f155";
}
.rating-70 span.one:before,
.rating-70 span.two:before,
.rating-70 span.three:before,
.rating-80 span.one:before,
.rating-80 span.two:before,
.rating-80 span.three:before,
.rating-80 span.four:before {
content: "\f155";
}
.rating-90 span.one:before,
.rating-90 span.two:before,
.rating-90 span.three:before,
.rating-90 span.four:before,
.rating-100 span.one:before,
.rating-100 span.two:before,
.rating-100 span.three:before,
.rating-100 span.four:before,
.rating-100 span.five:before {
content: "\f155";
}
.rating .ratings {
display: block; display: block;
line-height: 20px; line-height: 20px;
color: #999; color: #999;
@ -1675,11 +1667,6 @@ body.full-overlay-active {
float: left; float: left;
} }
.theme-details .star-rating {
margin: 7px 0;
float: right;
}
.theme-details .theme-description { .theme-details .theme-description {
float: left; float: left;
color: #777; color: #777;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -237,16 +237,12 @@ if ( $tab ) {
<div class="theme-details"> <div class="theme-details">
<# if ( data.rating ) { #> <# if ( data.rating ) { #>
<div class="rating rating-{{ Math.round( data.rating / 10 ) * 10 }}"> <div class="star-rating rating-{{ Math.round( data.rating / 10 ) * 10 }}">
<span class="one"></span> <span class="one"></span><span class="two"></span><span class="three"></span><span class="four"></span><span class="five"></span>
<span class="two"></span>
<span class="three"></span>
<span class="four"></span>
<span class="five"></span>
<small class="ratings">{{ data.num_ratings }}</small> <small class="ratings">{{ data.num_ratings }}</small>
</div> </div>
<# } else { #> <# } else { #>
<div class="rating"> <div class="star-rating">
<small class="ratings"><?php _e( 'This theme has not been rated yet.' ); ?></small> <small class="ratings"><?php _e( 'This theme has not been rated yet.' ); ?></small>
</div> </div>
<# } #> <# } #>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-beta1-33072'; $wp_version = '4.3-beta1-33073';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.