{% 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 books in {{ year }}{% endblocktrans %}

{% else %}

{% blocktrans trimmed count counter=books_total with pages_total=pages_total|intcomma %} In {{ year }}, {{ display_name }} read {{ books_total }} book
for a total of {{ pages_total }} pages! {% plural %} 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' size='xxlarge' %}
{% 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' size='xxlarge' %}
{% 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 goal_status and goal_status.percent >= 100 %}

{% with goal=goal_status.goal goal_percent=goal_status.percent %} {% blocktrans trimmed count counter=goal %} {{ display_name }} set a goal of reading {{ goal }} book in {{ year }},
and achieved {{ goal_percent }}% of that goal {% plural %} {{ display_name }} set a goal of reading {{ goal }} books in {{ year }},
and achieved {{ goal_percent }}% of that goal {% endblocktrans %} {% endwith %}

{% trans "Way to go!" %}


{% endif %} {% if ratings_total > 0 %}

{% blocktrans trimmed count counter=ratings_total %} {{ display_name }} left {{ ratings_total }} rating,
their average rating is {{ rating_average }} {% plural %} {{ 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-xl-tablet is-h-l-mobile' size='xxlarge' %}
{% 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 {{ year }}{% endblocktrans %}

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