diff --git a/docs-src/src/content/docs/recipes/cookbook.md b/docs-src/src/content/docs/recipes/cookbook.md index b355aa688..7cc23862e 100644 --- a/docs-src/src/content/docs/recipes/cookbook.md +++ b/docs-src/src/content/docs/recipes/cookbook.md @@ -59,7 +59,7 @@ const tour = new Shepherd.Tour({ Using the already exposed API, you could add a progress indicator of your choosing for each step to let your users know how far into a tour they may be. -The example below uses the [Step](https://docs.shepherdpro.com/api/step/classes/step/) `options` +The example below uses the [Step](https://docs.shepherdjs.dev/api/step/classes/step/) `options` object and adds to `when` on the `show` event. Within that, we create an element to render in the header with text of what step out of all potential steps is now being show. diff --git a/landing/src/components/Header.astro b/landing/src/components/Header.astro index c38fb59c6..c6503dca6 100644 --- a/landing/src/components/Header.astro +++ b/landing/src/components/Header.astro @@ -69,91 +69,108 @@ const { isHome } = Astro.props;

Guide your users through a tour of your app

-
- { - isHome && ( -
-
-
- - -
- -
-

- Accessibility -

- -

- Shepherd has full keyboard navigation support, focus - trapping, and a11y compliance via aria attributes. -

-
- -
+ + { + isHome && ( +
+
+
+
+
+ + Learn more +
+
+
+
+
+
+ + +
+ +
+

+ Accessibility +

+ +

+ Shepherd has full keyboard navigation support, focus trapping, + and a11y compliance via aria attributes. +

+
-
-
- - -
- -
-

- Highly Customizable -

- -

- Shepherd's styles are kept minimal, allowing you to easily - customize the look and feel, but still give you enough to - drop in and be ready to go quickly. -

-
- -
+
+
+
+ +
+
+ + +
+ +
+

+ Highly Customizable +

+ +

+ Shepherd's styles are kept minimal, allowing you to easily + customize the look and feel, but still give you enough to drop + in and be ready to go quickly. +

+ +
+
-
-
- - -
- -
-

- Framework Ready -

- -

- Shepherd is ready to drop into your application using React, - Ember, Angular, Vue.js, ES Modules, or plain Javascript! -

-
- -
+
+
+ + +
+ +
+

+ Framework Ready +

+ +

+ Shepherd is ready to drop into your application using React, + Ember, Angular, Vue.js, ES Modules, or plain Javascript! +

+ +
- ) - } -
+
+ ) + }
diff --git a/landing/src/pages/index.astro b/landing/src/pages/index.astro index 6eeaf66eb..d16adbf50 100644 --- a/landing/src/pages/index.astro +++ b/landing/src/pages/index.astro @@ -5,39 +5,39 @@ import MainPage from '@layouts/MainPage.astro';
Demo
-
-
-

+
+
+

01. How to Include

-
+
`} - lang="js" - theme="nord" + lang='js' + theme='nord' wrap />
-
-

02. Example

+
+

02. Example

-
+
@@ -94,7 +94,9 @@ import MainPage from '@layouts/MainPage.astro'; // wait for shepherd to be ready setTimeout(function () { const shepherd = setupShepherd(); - shepherd.start(); + const startBtn = document.querySelector('#showTour'); + + startBtn?.addEventListener('click', () => shepherd.start()); }, 400); } diff --git a/shepherd.js/src/tour.ts b/shepherd.js/src/tour.ts index 886eac5c2..03581d1b7 100644 --- a/shepherd.js/src/tour.ts +++ b/shepherd.js/src/tour.ts @@ -332,12 +332,12 @@ export class Tour extends Evented { if (shouldSkipStep) { this._skipStep(step, forward); } else { + this.currentStep = step; this.trigger('show', { step, previous: this.currentStep }); - this.currentStep = step; step.show(); } }