separates css for star forms
This commit is contained in:
parent
3aeeaa80e7
commit
560c5fd2f7
|
@ -333,35 +333,36 @@ button .icon {
|
|||
margin: 0;
|
||||
color: goldenrod;
|
||||
}
|
||||
.rate-stars:hover .icon:before {
|
||||
|
||||
.review-form .rate-stars:hover .icon:before {
|
||||
content: '\e9d9';
|
||||
}
|
||||
.rate-stars label {
|
||||
.review-form .rate-stars label {
|
||||
display: inline;
|
||||
}
|
||||
.rate-stars form:hover ~ form .icon:before{
|
||||
.review-form .rate-stars form:hover ~ form .icon:before{
|
||||
content: '\e9d7';
|
||||
}
|
||||
|
||||
.rate-stars input + .icon:before {
|
||||
.review-form .rate-stars input + .icon:before {
|
||||
content: '\e9d9';
|
||||
}
|
||||
.rate-stars input:checked + .icon:before {
|
||||
.review-form .rate-stars input:checked + .icon:before {
|
||||
content: '\e9d9';
|
||||
}
|
||||
.rate-stars input:checked + * ~ .icon:before {
|
||||
.review-form .rate-stars input:checked + * ~ .icon:before {
|
||||
content: '\e9d7';
|
||||
}
|
||||
.rate-stars:hover label.icon:before {
|
||||
.review-form .rate-stars:hover label.icon:before {
|
||||
content: '\e9d9';
|
||||
}
|
||||
.rate-stars label.icon:hover:before {
|
||||
.review-form .rate-stars label.icon:hover:before {
|
||||
content: '\e9d9';
|
||||
}
|
||||
.rate-stars label.icon:hover ~ label.icon:before{
|
||||
.review-form .rate-stars label.icon:hover ~ label.icon:before{
|
||||
content: '\e9d7';
|
||||
}
|
||||
.rate-stars input[type="radio"] {
|
||||
.review-form .rate-stars input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
{% load fr_display %}
|
||||
<span class="hidden-text">Rating</span>
|
||||
<div class="stars rate-stars">
|
||||
<input type="radio" name="rating" value="" checked></input>
|
||||
{% for i in '12345'|make_list %}
|
||||
<input id="book{{book.id}}-star-{{ forloop.counter }}" type="radio" name="rating" value="{{ forloop.counter }}"></input>
|
||||
<label class="icon icon-star-empty" for="book{{book.id}}-star-{{ forloop.counter }}">
|
||||
<span class="hidden-text">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue