2022-06-13 05:29:20 +00:00
{% load i18n %}
< script >
2022-06-18 03:27:00 +00:00
const initiateTour = new Shepherd.Tour({
exitOnEsc: true,
});
2022-06-13 05:29:20 +00:00
2022-06-18 03:27:00 +00:00
initiateTour.addSteps([
{
2022-07-09 05:00:30 +00:00
text: "{% trans 'Welcome to Bookwyrm!< br > < br > Would you like to take the guided tour to help you get started?' %}",
2022-06-18 03:27:00 +00:00
title: "{% trans 'Guided Tour' %}",
2022-06-13 05:29:20 +00:00
buttons: [
{
action() {
2022-06-18 03:27:00 +00:00
disableGuidedTour(csrf_token);
2022-06-13 05:29:20 +00:00
return this.next();
},
secondary: true,
2022-06-18 03:27:00 +00:00
text: "{% trans 'No thanks' %}",
classes: "is-danger",
2022-06-13 05:29:20 +00:00
},
{
action() {
2022-06-18 03:27:00 +00:00
this.cancel();
return homeTour.start()
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
text: "{% trans 'Yes please!' %}",
2022-06-13 05:29:20 +00:00
},
],
2022-06-18 03:27:00 +00:00
},
{
text: "{% trans 'If you ever change your mind, just click on the Guided Tour link to start your tour' %}",
title: "{% trans 'Guided Tour' %}",
2022-06-13 06:56:07 +00:00
attachTo: {
2022-07-03 05:57:10 +00:00
element: "#tour-begin",
2022-06-18 03:27:00 +00:00
on: "left-start",
2022-06-13 06:56:07 +00:00
},
buttons: [
{
action() {
2022-06-18 03:27:00 +00:00
return this.complete()
2022-06-13 06:56:07 +00:00
},
2022-06-18 03:27:00 +00:00
text: "{% trans 'Ok' %}",
classes: "is-success",
}
2022-06-13 06:56:07 +00:00
],
2022-06-18 03:27:00 +00:00
}
])
const homeTour = new Shepherd.Tour({
exitOnEsc: true,
});
homeTour.addSteps([
{
text: "{% trans 'Search for books, users, or lists using this search box.' %}",
title: "{% trans 'Search box' %}",
attachTo: {
2022-07-03 05:57:10 +00:00
element: "#tour-search",
2022-06-18 03:27:00 +00:00
on: "bottom",
2022-06-13 06:56:07 +00:00
},
2022-07-09 05:00:30 +00:00
highlightClass: 'tour-element-highlight',
2022-06-18 03:27:00 +00:00
buttons: [
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
],
},
{
text: "{% trans 'Search book records by scanning an ISBN barcode using your camera.' %}",
title: "{% trans 'Barcode reader' %}",
attachTo: {
2022-07-03 05:57:10 +00:00
element: "#tour-barcode",
2022-06-18 03:27:00 +00:00
on: "bottom",
},
buttons: [
2022-06-13 05:29:20 +00:00
{
2022-06-18 03:27:00 +00:00
action() {
return this.back();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'Use these links to discover the latest news from your feed, lists of books by topic, and the latest happenings on this Bookwyrm server!' %}",
title: "{% trans 'Navigation Bar' %}",
attachTo: {
2022-07-03 05:57:10 +00:00
element: "#tour-navbar-start",
2022-06-18 03:27:00 +00:00
on: "bottom",
2022-06-13 05:29:20 +00:00
},
2022-07-09 05:00:30 +00:00
highlightClass: 'tour-element-highlight',
2022-06-18 03:27:00 +00:00
buttons: [
{
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
2022-06-13 05:29:20 +00:00
},
{
2022-06-18 03:27:00 +00:00
action() {
return this.next();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'Books on your reading status shelves will be shown here.' %}",
title: "{% trans 'Your Books' %}",
attachTo: {
2022-07-03 05:57:10 +00:00
element: "#tour-suggested-books",
2022-06-18 03:27:00 +00:00
on: "right",
},
2022-07-09 05:00:30 +00:00
highlightClass: 'tour-element-highlight',
2022-06-18 03:27:00 +00:00
buttons: [
{
action() {
return this.back();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
},
text: "{% trans 'Next' %}",
},
],
},
{
text: "{% trans 'This bell will light up when you have a new notification. When it does, click on it to find out what exciting thing has happened!' %}",
title: "{% trans 'Notifications' %}",
attachTo: {
2022-07-03 05:57:10 +00:00
element: '#tour-notifications',
2022-06-18 03:27:00 +00:00
on: "left-end",
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
buttons: [
2022-06-13 05:29:20 +00:00
{
2022-06-18 03:27:00 +00:00
action() {
return this.back();
},
secondary: true,
text: "{% trans 'Back' %}",
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
{
action() {
return this.next();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
text: "{% trans 'Next' %}",
},
],
},
{
2022-07-09 05:10:52 +00:00
text: "{% trans 'Your profile, books, direct messages, and settings can be accessed by clicking on your name here.< p class = \'notification is-warning is-light mt-3 \ ' > Try selecting < strong > Profile< / strong > from the drop down menu to continue the tour.< / p > ' %}",
2022-06-18 03:27:00 +00:00
title: "{% trans 'Profile and settings menu' %}",
attachTo: {
element: "#navbar-dropdown",
on: "left-end",
},
buttons: [
{
action() {
return this.back();
2022-06-13 05:29:20 +00:00
},
2022-06-18 03:27:00 +00:00
secondary: true,
text: "{% trans 'Back' %}",
},
{
action() {
return this.next();
},
text: "{% trans 'Ok' %}",
},
],
}
]);
2022-06-13 05:29:20 +00:00
2022-06-18 03:27:00 +00:00
initiateTour.start()
2022-06-13 05:29:20 +00:00
< / script >