From fef66a7cfe021c64d7691d9f027cc810c682e3ea Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 19 Jun 2022 11:08:01 +1000 Subject: [PATCH] guided tour for book search Adds a guided tour for book search page including logic for differing messages depending on what results are visible. --- bookwyrm/templates/guided_tour/search.html | 191 +++++++++++++++++++++ bookwyrm/templates/search/book.html | 8 +- bookwyrm/templates/search/layout.html | 10 +- 3 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 bookwyrm/templates/guided_tour/search.html diff --git a/bookwyrm/templates/guided_tour/search.html b/bookwyrm/templates/guided_tour/search.html new file mode 100644 index 000000000..868d9b819 --- /dev/null +++ b/bookwyrm/templates/guided_tour/search.html @@ -0,0 +1,191 @@ +{% load i18n %} + + + + + + // { + // text: "{% trans 'Groups can have group-curated lists. We haven\'t discussed lists yet, so now let\s fix that.' %}\ + //

\ + // {% trans 'Click on the button to create a list.' %}", + // title: "{% trans 'Group lists' %}", + // attachTo: { + // element: "#create_group_list_button", + // on: "right", + // }, + // buttons: [ + // { + // action() { + // return this.back(); + // }, + // secondary: true, + // text: "{% trans 'Back' %}", + // }, + // { + // action() { + // return this.next(); + // }, + // text: "{% trans 'Next' %}", + // }, + // ], + // }, + // { + // text: "{% trans 'todo' %}", + // title: "{% trans 'TODO' %}", + // buttons: [ + // { + // action() { + // return this.complete(); + // }, + // text: "{% trans 'Ok' %}", + // }, + // ], + // }, diff --git a/bookwyrm/templates/search/book.html b/bookwyrm/templates/search/book.html index d2828eabf..d8835b3ef 100644 --- a/bookwyrm/templates/search/book.html +++ b/bookwyrm/templates/search/book.html @@ -7,7 +7,7 @@ {% with results|first as local_results %} -
+
{% if not results %}

{% blocktrans %}No results found for "{{ query }}"{% endblocktrans %} @@ -68,3 +68,9 @@ {% endif %} {% endblock %} + +{% block scripts %} +{% if user.show_guided_tour %} + {% include 'guided_tour/search.html' %} +{% endif %} +{% endblock %}