diff --git a/fedireads/forms.py b/fedireads/forms.py index 5041cfe6..ffbf6cd1 100644 --- a/fedireads/forms.py +++ b/fedireads/forms.py @@ -35,11 +35,10 @@ class RatingForm(ModelForm): class ReviewForm(ModelForm): class Meta: model = models.Review - fields = ['name', 'rating', 'content'] + fields = ['name', 'content'] help_texts = {f: None for f in fields} labels = { 'name': 'Title', - 'rating': 'Rating (out of 5)', 'content': 'Review', } diff --git a/fedireads/static/format.css b/fedireads/static/format.css index 32919692..b3cfaca3 100644 --- a/fedireads/static/format.css +++ b/fedireads/static/format.css @@ -326,7 +326,7 @@ button .icon { display: inline; width: min-content; } -.rate-stars form button.icon { +.rate-stars button.icon { background: none; border: none; padding: 0; @@ -336,10 +336,35 @@ button .icon { .rate-stars:hover .icon:before { content: '\e9d9'; } +.rate-stars label { + display: inline; +} .rate-stars form:hover ~ form .icon:before{ content: '\e9d7'; } +.rate-stars input + .icon:before { + content: '\e9d9'; +} +.rate-stars input:checked + .icon:before { + content: '\e9d9'; +} +.rate-stars input:checked + * ~ .icon:before { + content: '\e9d7'; +} +.rate-stars:hover label.icon:before { + content: '\e9d9'; +} +.rate-stars label.icon:hover:before { + content: '\e9d9'; + } +.rate-stars label.icon:hover ~ label.icon:before{ + content: '\e9d7'; +} +.rate-stars input[type="radio"] { + display: none; +} + /* re-usable tab styles */ .tabs { display: flex; diff --git a/fedireads/templates/snippets/create_status.html b/fedireads/templates/snippets/create_status.html index 1f833f07..2913e8a6 100644 --- a/fedireads/templates/snippets/create_status.html +++ b/fedireads/templates/snippets/create_status.html @@ -4,7 +4,7 @@