{% extends 'layout.html' %} {% load i18n %} {% load static %} {% block title %}{% blocktrans %}{{ year }} in the books{% endblocktrans %}{% endblock %} {% block head_links %} {% endblock %} {% block content %} {% with display_name=summary_user.display_name %} {% if user == summary_user %}
{% with year=paginated_years|first %}
{{ year }}
{% endwith %} {% with year=paginated_years|last %} {% if year %}
{{ year }}
{% endif %} {% endwith %}
{% endif %}

📚✨ {% blocktrans %}{{ year }} in the books{% endblocktrans %} ✨📚

{% blocktrans %}{{ display_name }}’s year of reading{% endblocktrans %}

{% if not books %}

{% blocktrans %}Sadly {{ display_name }} didn’t finish any book in {{ year }}{% endblocktrans %}

{% else %}

{% blocktrans %}In {{ year }}, {{ display_name }} read {{ books_total }} books
for a total of {{ pages_total }} pages!{% endblocktrans %}

{% trans "That’s great!" %}

{% blocktrans %}That makes an average of {{ pages_average }} pages per book.{% endblocktrans %}

{% if no_page_number %}

{% blocktrans %}({{ no_page_number }} books don’t have pages){% endblocktrans %}

{% endif %}
{% if book_pages_lowest and book_pages_highest %}
{% include 'snippets/book_cover.html' with book=book_pages_lowest cover_class='is-w-auto-tablet is-h-l-mobile' %}
{% trans "Their shortest read this year…" %}

{{ book_pages_lowest.title }}

{% if book_pages_lowest.authors.exists %}

{% trans "by" %} {% include 'snippets/authors.html' with book=book_pages_lowest link_class="has-text-success-dark" %}

{% endif %}

{% with pages=book_pages_lowest.pages %} {% blocktrans %}{{ pages }} pages{% endblocktrans%} {% endwith %}

{% include 'snippets/book_cover.html' with book=book_pages_highest cover_class='is-w-auto-tablet is-h-l-mobile' %}
{% trans "…and the longest" %}

{{ book_pages_highest.title }}

{% if book_pages_highest.authors.exists %}

{% trans "by" %} {% include 'snippets/authors.html' with book=book_pages_highest link_class="has-text-success-dark" %}

{% endif %}

{% with pages=book_pages_highest.pages %} {% blocktrans %}{{ pages }} pages{% endblocktrans%} {% endwith %}

{% endif %}

{% if ratings_total > 0 %}

{% blocktrans %}{{ display_name }} left {{ ratings_total }} ratings,
their average rating is {{ rating_average }}{% endblocktrans %}

{% include 'snippets/book_cover.html' with book=book_rating_highest.book cover_class='is-w-auto-tablet is-h-l-mobile' %}
{% trans "Their best rated review" %}

{{ book_rating_highest.book.title }}

{% if book_rating_highest.book.authors.exists %}

{% trans "by" %} {% include 'snippets/authors.html' with book=book_rating_highest.book link_class="has-text-success-dark" %}

{% endif %}

{% with rating=book_rating_highest.rating|floatformat %} {% blocktrans %}Their rating: {{ rating }}{% endblocktrans%} {% endwith %}


{% endif %}

{% blocktrans %}All the books {{ display_name }} read in 2021{% endblocktrans %}

{% endif %} {% endwith %} {% endblock %}