From 5f0e14934f25e79e038b828311f1cb4e6d579d33 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Mon, 13 Jun 2022 15:29:20 +1000 Subject: [PATCH] add guided tour to main feed page This uses an embedded script tag so that we can use django templates for logic - most importantly, we need to be able to use translations within the tour text. --- bookwyrm/templates/feed/layout.html | 6 + bookwyrm/templates/guided_tour/home.html | 192 +++++++++++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 bookwyrm/templates/guided_tour/home.html diff --git a/bookwyrm/templates/feed/layout.html b/bookwyrm/templates/feed/layout.html index 5083c0ab8..aed7a7ee4 100644 --- a/bookwyrm/templates/feed/layout.html +++ b/bookwyrm/templates/feed/layout.html @@ -32,4 +32,10 @@ {% block scripts %} + + +{% if user.show_guided_tour %} + {% include 'guided_tour/home.html' %} +{% endif %} + {% endblock %} diff --git a/bookwyrm/templates/guided_tour/home.html b/bookwyrm/templates/guided_tour/home.html new file mode 100644 index 000000000..ad1aba63e --- /dev/null +++ b/bookwyrm/templates/guided_tour/home.html @@ -0,0 +1,192 @@ +{% load i18n %} +{% csrf_token %} + +