bookwyrm/bookwyrm/templates/guided_tour/user_books.html
Hugh Rundle 3f67bc3b61 standardise ids for tour anchors
To make it harder to accidentally mess up the tour when making changes to pages, this commit adds ids with 'tour' prefixes to (nearly) all elements used by the guided tour as anchor points. The exception is where an element already had an id that is being used by something else in Bookwyrm.

Some minor changes also made to clean up the wording of the tour.
2022-07-03 15:57:10 +10:00

140 lines
4.7 KiB
HTML

{% load i18n %}
<script>
const tour = new Shepherd.Tour({
exitOnEsc: true,
});
tour.addSteps([
{
text: "{% trans 'This is the page where your books are listed, organised into shelves.' %}",
title: "{% trans 'Your books' %}",
buttons: [
{
action() {
disableGuidedTour(csrf_token);
return this.complete();
},
secondary: true,
text: "{% trans 'End Tour' %}",
classes: "is-danger",
},
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
},
],
},
{
text: "<code>{% trans 'To Read' %}</code>, \
<code>{% trans 'Currently Reading' %}</code>, \
<code>{% trans 'Read' %}</code>,\
{% trans ' and ' %}\
<code>{% trans 'Stopped Reading' %}</code> \
{% trans 'are default shelves used to indicate the current reading status of books. A book can only be assigned to one of these shelves at any given moment e.g. a book is not allowed to be on both the ' %}\
<code>{% trans 'Currently Reading' %}</code>, \
{% trans ' and the ' %}\
<code>{% trans 'To Read' %}</code>, \
{% trans ' shelves. When you change the reading status of a book it will automatically be moved to the matching shelf.' %}\
",
title: "{% trans 'Creating a group' %}",
attachTo: {
element: "#tour-user-shelves",
on: "bottom-start",
},
buttons: [
{
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'You can create additional custom shelves to organise your books. A book on a custom shelf can be on any number of other shelves simultaneously, including one of the default reading status shelves' %}",
title: "{% trans 'Adding custom shelves.' %}",
attachTo: {
element: "#tour-create-shelf",
on: "left",
},
buttons: [
{
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'If you have an export file from another service like Goodreads or LibraryThing, you can import your books and shelves here.' %}",
title: "{% trans 'Import from another service' %}",
attachTo: {
element: "#tour-import-books",
on: "left",
},
buttons: [
{
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'Now that we\'ve explored book shelves, let\'s take a look at a related concept: book lists! Click on the ' %}\
<code>\
{% trans 'Lists' %}\
</code>\
{% trans ' link here to continue the tour.' %}",
title: "{% trans 'Lists' %}",
attachTo: {
element: "#tour-navbar-start",
on: "right",
},
buttons: [
{
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
this.complete();
},
text: "{% trans 'Ok' %}"
},
]
}
])
tour.start()
</script>