Move stars into header for ratings

This commit is contained in:
Mouse Reeve
2021-04-20 11:06:14 -07:00
parent 07dbc4c6c0
commit 9e5ebf9807
4 changed files with 120 additions and 119 deletions

View File

@ -40,10 +40,29 @@
{% endwith %}
{% endif %}
{% if status.book %}
<a href="/book/{{ status.book.id }}">{{ status.book.title }}</a>
{% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %}
<a href="/book/{{ status.book.id }}">{{ status.book.title }}</a>{% if status.status_type == 'Rating' %}:
<span
itemprop="reviewRating"
itemscope
itemtype="https://schema.org/Rating"
>
<span class="is-hidden" {{ rating_type }}>
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
{# @todo Is it possible to not hard-code the value? #}
<meta itemprop="bestRating" content="5">
</span>
{% include 'snippets/stars.html' with rating=status.rating %}
{% endif %}
{% else %}
{% include 'snippets/book_titleby.html' with book=status.book %}
{% endif %}
{% elif status.mention_books %}
<a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first.title }}</a>
<a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first.title }}</a>
{% endif %}
{% if status.progress %}