-
Notifications
You must be signed in to change notification settings - Fork 275
/
Copy pathindex.html
265 lines (241 loc) · 10.1 KB
/
index.html
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="./favicon.ico">
<title>vue-tour-landing</title>
<script src="https://unpkg.com/vue"></script>
<script src="../dist/vue-tour.umd.min.js"></script>
<link rel="stylesheet" href="../dist/vue-tour.css">
<link rel="stylesheet" href="./css/app.css">
</head>
<body>
<div id="app">
<div class="section section-hero bg-gray">
<div id="overview" class="grid-hero container grid-lg text-center">
<div class="docs-brand">
<a href="#" @click="$tours['myTour'].start()" class="docs-logo" id="v-step-0">
<img src="./assets/logo.png" alt="Vue Tour">
<h2>VUE TOUR</h2>
</a>
</div>
<div class="docs-brand docs-brand--pulsar">
<a href="https://pulsar.surge.sh/" target="_blank" class="docs-logo bg-dark" id="v-step-0-1">
<h2 class="text-light">PULSAR</h2>
</a>
</div>
<h1>vue-tour</h1>
<h2>a <u>Lightweight</u>, <u>Simple</u> and <u>Customizable</u> tour plugin for use with Vue.js</h2>
<p>
<a href="https://github.com/pulsardev/vue-tour/wiki" class="btn btn-primary btn-lg mr-2">Docs</a>
<a href="https://github.com/pulsardev/vue-tour" target="_blank" rel="noopener" class="btn btn-primary btn-lg">GitHub</a>
</p>
<p>
<a class="github-button" href="https://github.com/pulsardev/vue-tour" data-size="large" data-show-count="true" aria-label="Star pulsardev/vue-tour on GitHub">Star</a>
</p>
<p class="text-gray">Latest version: <span class="version">{{ version }}</span></p>
<div class="columns">
<div class="column col-4 col-xs-12">
<div class="card text-center">
<div class="card-header">
<span class="card-title">Lightweight</span>
</div>
<div class="card-body">
Vue Tour is composed of just two Vue components and a very small JavaScript file.
</div>
</div>
</div>
<div class="column col-4 col-xs-12">
<div class="card text-center" id="v-step-1">
<div class="card-header">
<span class="card-title">Simple</span>
</div>
<div class="card-body">
Add an array of steps in your component and a 'v-tour' component in your template and you're good to go!
</div>
</div>
</div>
<div class="column col-4 col-xs-12">
<div class="card text-center">
<div class="card-header">
<span class="card-title">Customizable</span>
</div>
<div class="card-body">
You can change the DOM of every steps independently, use your own classes and even add custom animations.
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section section-features bg-primary text-light text-center">
<div class="container grid-lg">
<h2>Introduction</h2>
<div class="columns">
<div class="column col-10 col-sm-12 col-mx-auto text-left">
<p class="text-secondary">
Vue Tour provides a quick and easy way to guide your users through your application.
You can control the tour on this page by clicking the following buttons.
</p>
</div>
<div class="column col-10 col-sm-12 col-mx-auto">
<!--<my-tour></my-tour>-->
<div>
<button @click="$tours['myTour'].start()" class="btn btn-lg mr-2">Start the tour</button>
<button @click="nextStep" class="btn btn-lg mr-2">Next step</button>
<button @click="showLastStep" class="btn btn-lg">Show last step</button>
<v-tour name="myTour" :steps="steps" :callbacks="callbacks" :options="{ highlight: true }">
<template slot-scope="tour">
<transition name="fade">
<v-step
v-if="tour.currentStep === index"
v-for="(step, index) of tour.steps"
:key="index"
:step="step"
:previous-step="tour.previousStep"
:next-step="tour.nextStep"
:stop="tour.stop"
:is-first="tour.isFirst"
:is-last="tour.isLast"
:labels="tour.labels"
:highlight="tour.highlight"
>
<template v-if="tour.currentStep === 2">
<div slot="actions">
<button @click="tour.previousStep" class="btn btn-primary mr-2">Previous step</button>
<button @click="tour.nextStep" class="btn btn-primary">Next step</button>
</div>
</template>
</v-step>
</transition>
</template>
</v-tour>
</div>
</div>
<div class="column col-10 col-sm-12 col-mx-auto">
<a href="https://github.com/pulsardev/vue-tour" class="btn btn-lg" id="v-step-2">Install Vue Tour</a>
</div>
</div>
</div>
</div>
<div class="section section-updates bg-gray">
<div class="container grid-lg">
<div class="columns">
<div class="column col-6 col-xs-12">
<div class="card" id="v-step-3">
<div class="card-header">
<div class="card-title h6">PayPal Donate</div>
</div>
<div class="card-body">
Vue Tour is completely free to use. If you enjoy it, please consider donating for the further development. ♥
</div>
<div class="card-footer">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CLK49A83DXCQ8" class="btn btn-primary" target="_blank">Donate</a>
</div>
</div>
</div>
<div class="column col-6 col-xs-12">
<div class="card">
<div class="card-header">
<div class="card-title h6">Vue Tour Docs</div>
</div>
<div class="card-body">
Go to our documentation if you want to use Vue Tour in a more advanced way.
</div>
<div class="card-footer">
<a href="https://github.com/pulsardev/vue-tour/wiki" class="btn btn-primary">Explore</a>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="section section-footer">
<div id="copyright" class="grid-footer container grid-lg">
<p>
<a href="https://github.com/pulsardev/vue-tour/wiki" target="_blank">Documents</a> |
<a href="https://github.com/pulsardev/vue-tour" target="_blank">GitHub</a> |
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=CLK49A83DXCQ8" target="_blank">PayPal Donate</a> |
Version <span class="version">{{ version }}</span>
</p>
<p>
Built with <span class="text-error">♥</span> by <a href="https://pulsar.surge.sh" target="_blank">Pulsar</a>.
Licensed under the <a href="https://github.com/pulsardev/vue-tour/blob/master/LICENSE" target="_blank">MIT License</a>.
</p>
</div>
</footer>
</div>
</body>
<script>
new Vue({
data () {
return {
version: '1.1.0',
steps: [
{
target: '#v-step-0',
content: `Discover <strong>Vue Tour</strong>!`,
params: {
highlight: false
}
},
{
target: '#v-step-0-1',
content: `Created by <a href="https://github.com/pulsardev" target="_blank" rel="noopener">Pulsar</a> and its <a href="https://github.com/pulsardev/vue-tour/graphs/contributors" target="_blank" rel="noopener">contributors</a>.`
},
{
target: '#v-step-1',
header: {
title: 'Vue Tour'
},
content: 'An awesome plugin made with Vue.js!'
},
{
target: '#v-step-2',
content: 'Try it, you\'ll love it!<br>You can put HTML in the steps and completely customize the DOM to suit your needs.',
params: {
placement: 'top'
}
},
{
target: '#v-step-3',
params: {
placement: 'left'
}
}
],
callbacks: {
onPreviousStep: this.myCustomPreviousStepCallback,
onNextStep: this.myCustomNextStepCallback
}
}
},
mounted: function () {
this.$tours['myTour'].start()
// A dynamically added onStop callback
this.callbacks.onStop = () => {
document.querySelector('#v-step-0').scrollIntoView({ behavior: 'smooth' })
}
},
methods: {
nextStep () {
this.$tours['myTour'].nextStep()
},
showLastStep () {
this.$tours['myTour'].currentStep = this.steps.length - 1
},
myCustomPreviousStepCallback (currentStep) {
console.log('[Vue Tour] A custom previousStep callback has been called on step ' + (currentStep + 1))
},
myCustomNextStepCallback (currentStep) {
console.log('[Vue Tour] A custom nextStep callback has been called on step ' + (currentStep + 1))
if (currentStep === 1) {
console.log('[Vue Tour] A custom nextStep callback has been called from step 2 to step 3')
}
}
}
}).$mount('#app')
</script>
</html>