Update status_header.html

This commit is contained in:
Joachim 2021-04-24 20:47:39 +02:00
parent 59ed49f082
commit 04e1806482
1 changed files with 47 additions and 47 deletions

View File

@ -41,54 +41,54 @@
{% elif status.reply_parent %} {% elif status.reply_parent %}
{% with parent_status=status|parent %} {% with parent_status=status|parent %}
{% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">status</a>{% endblocktrans %} {% blocktrans with username=parent_status.user.display_name user_path=parent_status.user.local_path status_path=parent_status.local_path %}replied to <a href="{{ user_path }}">{{ username}}'s</a> <a href="{{ status_path }}">status</a>{% endblocktrans %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}
{% if status.book %} {% if status.book %}
{% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %} {% 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' %}: <a href="/book/{{ status.book.id }}">{{ status.book|title }}</a>{% if status.status_type == 'Rating' %}:
<span <span
itemprop="reviewRating" itemprop="reviewRating"
itemscope itemscope
itemtype="https://schema.org/Rating" itemtype="https://schema.org/Rating"
> >
<span class="is-hidden" {{ rating_type }}> <span class="is-hidden" {{ rating_type }}>
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}"> <meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
{% if status.book %} {% if status.book %}
{% if status.status_type == 'GeneratedNote' or status.status_type == 'Rating' %} {% 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' %}: <a href="/book/{{ status.book.id }}">{{ status.book|title }}</a>{% if status.status_type == 'Rating' %}:
<span <span
itemprop="reviewRating" itemprop="reviewRating"
itemscope itemscope
itemtype="https://schema.org/Rating" itemtype="https://schema.org/Rating"
> >
<span class="is-hidden" {{ rating_type }}> <span class="is-hidden" {{ rating_type }}>
<meta itemprop="ratingValue" content="{{ status.rating|floatformat }}"> <meta itemprop="ratingValue" content="{{ status.rating|floatformat }}">
{# @todo Is it possible to not hard-code the value? #} {# @todo Is it possible to not hard-code the value? #}
<meta itemprop="bestRating" content="5"> <meta itemprop="bestRating" content="5">
</span> </span>
{% include 'snippets/stars.html' with rating=status.rating %} {% include 'snippets/stars.html' with rating=status.rating %}
{% endif %} {% endif %}
{% else %} {% else %}
{% include 'snippets/book_titleby.html' with book=status.book %} {% include 'snippets/book_titleby.html' with book=status.book %}
{% endif %} {% endif %}
{% elif status.mention_books %} {% elif status.mention_books %}
<a href="/book/{{ status.mention_books.first.id }}"> <a href="/book/{{ status.mention_books.first.id }}">
{{ status.mention_books.first.title }} {{ status.mention_books.first.title }}
</a> </a>
{% endif %} {% endif %}
{% include 'snippets/stars.html' with rating=status.rating %} {% include 'snippets/stars.html' with rating=status.rating %}
{% endif %} {% endif %}
{% else %} {% else %}
{% include 'snippets/book_titleby.html' with book=status.book %} {% 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>
{% endif %} {% endif %}
{% elif status.mention_books %}
<a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first|title }}</a>
{% endif %}
</h3> </h3>
<p class="is-size-7 is-flex is-align-items-center"> <p class="is-size-7 is-flex is-align-items-center">