From aebeac9112074219bc8d2f64a6d039b3e71afa3e Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 13 Jun 2022 17:26:53 +1000 Subject: [PATCH] add guided tour to user profile - adds ids to relevant elements to enable tour - adds guided tour using Shepherd --- .../templates/guided_tour/user_profile.html | 136 ++++++++++++++++++ bookwyrm/templates/user/layout.html | 14 +- 2 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 bookwyrm/templates/guided_tour/user_profile.html diff --git a/bookwyrm/templates/guided_tour/user_profile.html b/bookwyrm/templates/guided_tour/user_profile.html new file mode 100644 index 000000000..3e2bc3f2f --- /dev/null +++ b/bookwyrm/templates/guided_tour/user_profile.html @@ -0,0 +1,136 @@ +{% load i18n %} + + diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html index 3dbfc9dcd..c4a71735e 100755 --- a/bookwyrm/templates/user/layout.html +++ b/bookwyrm/templates/user/layout.html @@ -69,25 +69,25 @@ {% if is_self or user.goal.exists %} {% now 'Y' as year %} {% url 'user-goal' user|username year as url %} - + {% trans "Reading Goal" %} {% endif %} {% if is_self or user|has_groups %} {% url 'user-groups' user|username as url %} - + {% trans "Groups" %} {% endif %} {% if is_self or user.list_set.exists %} {% url 'user-lists' user|username as url %} - + {% trans "Lists" %} {% endif %} {% if user.shelf_set.exists %} {% url 'user-shelves' user|username as url %} - + {% trans "Books" %} {% endif %} @@ -99,3 +99,9 @@ {% block panel %}{% endblock %} {% endblock %} + +{% block scripts %} +{% if user.show_guided_tour %} + {% include 'guided_tour/user_profile.html' %} +{% endif %} +{% endblock %}