From 3a7271309e9ff23bae05aa7bfa421929ed3b4cab Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 16 Jan 2021 08:19:54 -0800 Subject: [PATCH] Adds markup for set goal status on feed page --- bookwyrm/templates/feed.html | 39 ++++++++++++++++++- .../snippets/finish_reading_modal.html | 4 +- bookwyrm/templates/snippets/goal_form.html | 32 +++++++++++++++ .../snippets/start_reading_modal.html | 4 +- bookwyrm/views/landing.py | 7 ++++ 5 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 bookwyrm/templates/snippets/goal_form.html diff --git a/bookwyrm/templates/feed.html b/bookwyrm/templates/feed.html index b77da819b..750576c1a 100644 --- a/bookwyrm/templates/feed.html +++ b/bookwyrm/templates/feed.html @@ -47,8 +47,8 @@

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

{% include 'snippets/toggle/toggle_button.html' with label="close" controls_text="no-book" class="delete" %}
@@ -67,6 +67,14 @@
{% endif %} + + {% if goal %} +
+
+ {{ goal }} hi +
+
+ {% endif %}
@@ -85,6 +93,33 @@
+ {# announcements and system messages #} + {% if not goal and tab == 'home' %} +
+ {% now 'Y' as year %} +
+
+

+ {{ year }} reading goal +

+
+
+

Set a goal for how many books you'll finish reading in {{ year }}, and track your progress throughout the year.

+ + {% include 'snippets/goal_form.html' %} +
+
+ +
+
+
+ {% endif %} +
+ + {# activity feed #} {% if not activities %}

There aren't any activities right now! Try following a user to get started

{% endif %} diff --git a/bookwyrm/templates/snippets/finish_reading_modal.html b/bookwyrm/templates/snippets/finish_reading_modal.html index 06874c069..79bcd9449 100644 --- a/bookwyrm/templates/snippets/finish_reading_modal.html +++ b/bookwyrm/templates/snippets/finish_reading_modal.html @@ -29,8 +29,8 @@