
{% extends "base.html" %}

{% block style %}
table {
  color: #151B54;
}

table tr th {
  color: white;
  background: #736F6E;
}

{% endblock %}

{% block document_title %}{{ block.super }} - Coloured style{% endblock %}
{% block page_title %}{{ block.super }} - Coloured style{% endblock %}

{% block title_row %}<tr><th>Title</th><th>Genre</th><th>Rating</th></tr>{% endblock %}
{% block book_rows %}
  {% for book in books %}
    {% ifchanged %}<tr><td colspan="3" align="center" style="background:yellow;" >{{ book.author }}</td>{% endifchanged %}
    <tr style="background-color:{% cycle "#E3E4FA" "#FCDFFF" "#E9CFEC" "#C8BBBE" %};" ><td>{{ book.title }}</td><td>{{ book.genre }}</td><td>{% range book.rating %}<img src="{% media_finder "star.png" %}" />{% endrange %}</td></tr>
  {% empty %}
    <tr><td><div>No Books here!</div></td></tr>
  {% endfor %}
{% endblock %}