title: $:/plugins/tiddlywiki/tour/panel
tags: $:/tags/PageTemplate
\whitespace trim
\procedure tour-buttons()
\procedure tv-action-refresh-policy() always
<%if [function[tour-is-not-first-step]] %>
<$button class="tc-btn-big-green tc-tour-panel-navigation-back">
<>
back
$button>
<%endif%>
<%if [function[tour-is-not-last-step]] %>
<$button class="tc-btn-big-green tc-tour-panel-navigation-next">
<>
next
$button>
<%endif%>
<%if [function[tour-is-last-step]] %>
<$confetti/>
<$confetti delay=100/>
<$confetti delay=200/>
<$confetti delay=300/>
<$confetti delay=400/>
<$confetti delay=500/>
<%endif%>
\end
\procedure tour-step-no-success-filter()
<$transclude tiddler=<> mode="block"/>
<>
\end tour-step-no-success-filter
\procedure tour-step-success-filter-not-satisfied()
<$transclude tiddler=<> mode="block"/>
<%if [{$:/state/tour/step}has[hint-selector]] %>
<$button class="tc-btn-big-green tc-tour-panel-navigation-hint">
<$action-sendmessage $message="tm-spotlight-element" selector={{{ [{$:/state/tour/step}get[hint-selector]] }}} selector-fallback-1={{{ [{$:/state/tour/step}get[hint-selector-fallback-1]] }}} selector-fallback-2={{{ [{$:/state/tour/step}get[hint-selector-fallback-2]] }}}/>
<$transclude tiddler={{$:/state/tour/step}} field="hint-text" mode="inline"> show me a hint $transclude>
$button>
<%endif%>
\end tour-step-success-filter-not-satisfied
\procedure tour-step-success-filter-satisfied()
<$let tour-task="">
<$transclude tiddler=<> mode="block"/>
$let>
<$confetti/>
Congratulations, you may proceed
<>
\end tour-step-success-filter-satisfied
\import [[$:/plugins/tiddlywiki/tour/variables]]
<%if [{$:/config/ShowTour}!is[blank]else[show]match[show]] %>
<$image class="tc-tour-panel-banner-image" source={{{ [{$:/config/CurrentTour}get[logo]] }}}/>
<$button set="$:/config/ShowTour" setTo="no" class="tc-btn-invisible">{{$:/core/images/close-button}}$button>
<$button popup=<
> class="tc-btn-invisible tc-tour-panel-list-button" selectedClass="tc-selected">
''Tour'': <>
$button>
<$reveal state=<> type="popup" position="belowleft" animate="yes" tag="div">
$reveal>
<$let
currentTour={{$:/config/CurrentTour}}
currentTourStep={{$:/state/tour/step}}
step-success-filter-var={{{ [
get[step-success-filter-var]] :map[subfilter] }}}
>
<%if [has[caption]] %>
<$transclude $tiddler=<> $field="caption" mode="inline"/>
<%endif%>
<%if [!has[step-success-filter]] %>
<>
<%endif%>
<%if [has[step-success-filter]] %>
<$let step-success-filter={{{ [get[step-success-filter]] }}}>
<%if [subfilter] %>
<>
<%else%>
<>
<%endif%>
$let>
<%endif%>
$let>
<%endif%>