{% extends "base.html" %} {% block title %}My to-read books{% endblock %} {% block content %}

My to-read books

Your personal reading list

+ Add book
{% set total = books|length %} {% set reading_count = books|selectattr('status', 'equalto', 'reading')|list|length %} {% set finished_count = books|selectattr('status', 'equalto', 'finished')|list|length %}

Total books

{{ total }}

Reading now

{{ reading_count }}

Finished

{{ finished_count }}

{% if books %}
{% for book in books %} {% set palette = ['cover-1','cover-2','cover-3','cover-4','cover-5','cover-6'] %}
{{ book.title }}

{{ book.title }}

{{ book.author }}

{% if book.status == 'reading' %} Reading {% elif book.status == 'finished' %} Finished {% else %} Want to read {% endif %} {% if book.pages %} {{ book.pages }} pages {% endif %}
{% endfor %}
{% else %}

You haven't added any books yet.

+ Add your first book
{% endif %} {% endblock %}