mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-01-04 22:38:43 +00:00
add help button if page has tour
- include logic in main layout to add button if there is a page tour available - add button for main user feed page
This commit is contained in:
parent
f81095cb64
commit
806e2778df
2 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,10 @@
|
||||||
<a href="{% url 'discover' %}" class="navbar-item mt-3 py-0">
|
<a href="{% url 'discover' %}" class="navbar-item mt-3 py-0">
|
||||||
{% trans "Discover" %}
|
{% trans "Discover" %}
|
||||||
</a>
|
</a>
|
||||||
|
{% if has_tour %}
|
||||||
|
<button id="tour_button" class="button is-inverted is-outlined navbar-item mt-5" onclick="startTour('home')"> {% trans "Help" %}
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -219,6 +223,8 @@
|
||||||
<script src="{% static "js/localstorage.js" %}?v={{ js_cache }}"></script>
|
<script src="{% static "js/localstorage.js" %}?v={{ js_cache }}"></script>
|
||||||
<script src="{% static "js/status_cache.js" %}?v={{ js_cache }}"></script>
|
<script src="{% static "js/status_cache.js" %}?v={{ js_cache }}"></script>
|
||||||
<script src="{% static "js/vendor/quagga.min.js" %}?v={{ js_cache }}"></script>
|
<script src="{% static "js/vendor/quagga.min.js" %}?v={{ js_cache }}"></script>
|
||||||
|
<script src="{% static "js/vendor/shepherd.min.js" %}?v={{ js_cache }}"></script>
|
||||||
|
<script src="{% static "js/tour.js" %}?v={{ js_cache }}"></script>
|
||||||
|
|
||||||
{% block scripts %}{% endblock %}
|
{% block scripts %}{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ class Feed(View):
|
||||||
"filters_applied": filters_applied,
|
"filters_applied": filters_applied,
|
||||||
"path": f"/{tab['key']}",
|
"path": f"/{tab['key']}",
|
||||||
"annual_summary_year": get_annual_summary_year(),
|
"annual_summary_year": get_annual_summary_year(),
|
||||||
|
"has_tour": True,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return TemplateResponse(request, "feed/feed.html", data)
|
return TemplateResponse(request, "feed/feed.html", data)
|
||||||
|
|
Loading…
Reference in a new issue