From 436afb0ebdd98bd87d36aa073405b14320a969d9 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 28 Jul 2021 13:17:56 -0700 Subject: [PATCH] Fixes heirarchy and classes in feed layout --- bookwyrm/templates/feed/feed_layout.html | 132 ++++++++++++----------- 1 file changed, 67 insertions(+), 65 deletions(-) diff --git a/bookwyrm/templates/feed/feed_layout.html b/bookwyrm/templates/feed/feed_layout.html index 3c6b65a1..224fac03 100644 --- a/bookwyrm/templates/feed/feed_layout.html +++ b/bookwyrm/templates/feed/feed_layout.html @@ -7,82 +7,84 @@
{% if user.is_authenticated %}
-

{% trans "Your books" %}

- {% if not suggested_books %} -

{% trans "There are no books here right now! Try searching for a book to get started" %}

- {% else %} - {% with active_book=request.GET.book %} -
-
-
    +
    +

    {% trans "Your books" %}

    + {% if not suggested_books %} +

    {% trans "There are no books here right now! Try searching for a book to get started" %}

    + {% else %} + {% with active_book=request.GET.book %} +
    +
    +
      + {% for shelf in suggested_books %} + {% if shelf.books %} + {% with shelf_counter=forloop.counter %} +
    • +

      + {% if shelf.identifier == 'to-read' %}{% trans "To Read" %} + {% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %} + {% elif shelf.identifier == 'read' %}{% trans "Read" %} + {% else %}{{ shelf.name }}{% endif %} +

      +
      + +
      +
    • + {% endwith %} + {% endif %} + {% endfor %} +
    +
    {% for shelf in suggested_books %} - {% if shelf.books %} {% with shelf_counter=forloop.counter %} -
  • -

    - {% if shelf.identifier == 'to-read' %}{% trans "To Read" %} - {% elif shelf.identifier == 'reading' %}{% trans "Currently Reading" %} - {% elif shelf.identifier == 'read' %}{% trans "Read" %} - {% else %}{{ shelf.name }}{% endif %} -

    -
    - -
    -
  • - {% endwith %} - {% endif %} - {% endfor %} -
-
- {% for shelf in suggested_books %} - {% with shelf_counter=forloop.counter %} - {% for book in shelf.books %} -
+ {% for book in shelf.books %} +
-
-
-
-

{% include 'snippets/book_titleby.html' with book=book %}

- {% include 'snippets/shelve_button/shelve_button.html' with book=book %} +
+
+
+

{% include 'snippets/book_titleby.html' with book=book %}

+ {% include 'snippets/shelve_button/shelve_button.html' with book=book %} +
+
+
+ {% trans "Close" as button_text %} + {% include 'snippets/toggle/toggle_button.html' with label=button_text controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %}
-
- {% trans "Close" as button_text %} - {% include 'snippets/toggle/toggle_button.html' with label=button_text controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %} +
+ {% include 'snippets/create_status.html' with book=book %}
-
- {% include 'snippets/create_status.html' with book=book %} -
+ {% endfor %} + {% endwith %} + {% endfor %}
- {% endfor %} {% endwith %} - {% endfor %} -
- {% endwith %} - {% endif %} + {% endif %} + {% if goal %} -
+

{% blocktrans with yar=goal.year %}{{ year }} Reading Goal{% endblocktrans %}

{% include 'snippets/goal_progress.html' with goal=goal %}