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" style="background-color: red;">
<>
back
$button>
<%endif%>
<%if [function[tour-is-not-last-step]] %>
<$button class="tc-btn-big-green" style="background-color: purple;">
<>
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-condition()
<$transclude tiddler=<> mode="block"/>
<>
\end tour-step-no-condition
\procedure tour-step-condition-not-satisfied()
<$transclude tiddler=<> mode="block"/>
<%if [{$:/state/tour/step}has[selector]] %>
<$button class="tc-btn-big-green" style="background-color: red;">
<$action-sendmessage $message="tm-spotlight-element" selector={{{ [{$:/state/tour/step}get[selector]] }}} selector-fallback-1={{{ [{$:/state/tour/step}get[selector-fallback-1]] }}} selector-fallback-2={{{ [{$:/state/tour/step}get[selector-fallback-2]] }}}/>
show me a hint
$button>
<%endif%>
\end tour-step-condition-not-satisfied
\procedure tour-step-condition-satisfied()
<$let tour-task="">
<$transclude tiddler=<> mode="block"/>
$let>
<$confetti/>
Congratulations, you may proceed
<>
\end tour-step-condition-satisfied
<%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}}
condition-var={{{ [
get[condition-var]] :map[subfilter] }}}
>
<%if [has[caption]] %>
<$transclude $tiddler=<> $field="caption" mode="inline"/>
<%endif%>
<%if [!has[condition]] %>
<>
<%endif%>
<%if [has[condition]] %>
<$let condition={{{ [get[condition]] }}}>
<%if [subfilter] %>
<>
<%else%>
<>
<%endif%>
$let>
<%endif%>
$let>
<%endif%>