Guide
The guide can be used to build step-by-step tutorials for using the platform.
Guides are managed via the Stimulus JS controller lato_guide_controller.
To add a guide, set the attribute data-lato-guide-target="item" to a DOM element and define a unique key for the guide with the data-guide-key attribute, the display index with data-guide-index, and the guide content with data-guide-content.
<p data-lato-guide-target="item" data-guide-key="intro" data-guide-index="1" data-guide-content="This is an example of a guide." >
Reset Guides
Once a guide has been displayed, it is stored in the browser's local storage.
To reset the guides, simply use the rerun method of the lato_guide_controller.
<%= link_to 'Reset', '#', data: { action: 'click->lato-guide#rerun' } %>