{% extends 'layout.html' %} {% load i18n %} {% load static %} {% load humanize %} {% 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 %} {% if year %}
{{ year }}
{% endif %} {% 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 %}

{% trans "Share this page" %}
{% if year_key %}
{% endif %} {% if user == summary_user %} {% if year_key %}

{% trans "Sharing status: public with key" %}

{% trans "The page can be seen by anyone with the complete address." %}

{% csrf_token %}
{% else %}

{% trans "Sharing status: private" %}

{% trans "The page is private, only you can see it." %}

{% csrf_token %}
{% endif %}

{% trans "When you make your page private, the old key won’t give access to the page anymore. A new key will be created if the page is once again made public." %}

{% endif %}

{% 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 with pages=pages_average|intcomma %}That makes an average of {{ pages }} pages per book.{% endblocktrans %}

{% if no_page_number %}

{% blocktrans trimmed count counter=no_page_number %} ({{ no_page_number }} book doesn’t have pages) {% plural %} ({{ 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' %}
{% if book_rating_highest %}
{% 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 %}

{% endif %}

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

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