-
Notifications
You must be signed in to change notification settings - Fork 5
/
tour.js
109 lines (101 loc) · 2.31 KB
/
tour.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
(function () {
var tour = new Shepherd.Tour({
defaultStepOptions: {
classes: "shadow-md bg-purple-dark",
scrollTo: true,
},
});
tour.addStep({
text: "Welcome to tabcms, a CMS that runs completely in your browser!",
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
"This is the page list. Pages are the content that powers your site, and allow you to edit content and upload images inline.",
attachTo: {
element: "#page-list",
on: "right",
},
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
'This is the template list. Templates contain the HTML that wraps your content, and are written using <a href="https://ejs.co/" target="_blank">EJS</a>.',
attachTo: {
element: "#template-list",
on: "right",
},
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
"This is the file list. Files can be anything from uploaded images to CSS and JS files. CSS and JS files can be edited right in the CMS!",
attachTo: {
element: "#file-list",
on: "right",
},
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
"Most of the buttons are self-explanatory, but this one downloads your site content and generates a static site you can upload right to a web server.",
attachTo: {
element: "#download-site",
on: "right",
},
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
"Once downloaded, the archive of your site can be uploaded at any time to get back into editing.",
attachTo: {
element: "#upload-site",
on: "right",
},
buttons: [
{
text: "Next",
action: tour.next,
},
],
});
tour.addStep({
text:
"That's about it - I made this in a week so enjoy it as a fun experiment on what's possible in your browser. Thanks!",
buttons: [
{
text: "Finish",
action: tour.next,
},
],
});
if (!localStorage.tourDone) {
localStorage.tourDone = true;
tour.start();
}
})();