2023-01-16 19:56:39 +00:00
|
|
|
title: $:/plugins/tiddlywiki/tour/panel
|
|
|
|
tags: $:/tags/PageTemplate
|
|
|
|
|
2023-09-21 10:31:23 +00:00
|
|
|
\whitespace trim
|
|
|
|
|
|
|
|
\procedure tour-buttons()
|
|
|
|
\procedure tv-action-refresh-policy() always
|
2023-07-20 07:45:44 +00:00
|
|
|
<div class="tc-tour-panel-navigation">
|
2023-09-10 14:23:05 +00:00
|
|
|
<$list filter="[function[tour-is-not-first-step]]" variable="ignore">
|
2023-05-10 09:14:26 +00:00
|
|
|
<$button class="tc-btn-big-green" style="background-color: red;">
|
2023-09-10 10:28:23 +00:00
|
|
|
<<tour-previous-step>>
|
2023-01-16 19:56:39 +00:00
|
|
|
back
|
|
|
|
</$button>
|
2023-05-10 09:14:26 +00:00
|
|
|
</$list>
|
|
|
|
<$button class="tc-btn-big-green" style="background-color: purple;">
|
2023-09-10 10:28:23 +00:00
|
|
|
<<tour-next-step>>
|
2023-01-16 19:56:39 +00:00
|
|
|
next
|
|
|
|
</$button>
|
2023-07-20 07:45:44 +00:00
|
|
|
</div>
|
2023-01-16 19:56:39 +00:00
|
|
|
\end
|
|
|
|
|
2023-09-21 08:59:28 +00:00
|
|
|
|
2023-01-16 19:56:39 +00:00
|
|
|
<$list filter="[{$:/config/ShowTour}!is[blank]else[show]match[show]]" variable="ignore">
|
2023-09-21 08:59:28 +00:00
|
|
|
<div class={{{ tc-tour-panel [{$:/state/tour/step}get[display-mode]else[normal]addprefix[tc-tour-panel-]] +[join[ ]] }}}>
|
|
|
|
<$image class="tc-tour-panel-banner-image" source={{{ [{$:/config/CurrentTour}get[logo]] }}}/>
|
|
|
|
<div class="tc-tour-panel-inner">
|
|
|
|
<div class="tc-tiddler-controls tc-tour-panel-controls">
|
|
|
|
<$button set="$:/config/ShowTour" setTo="no" class="tc-btn-invisible">{{$:/core/images/close-button}}</$button>
|
|
|
|
<div class="tc-tour-panel-list-wrapper">
|
|
|
|
<$button popup=<<qualify "$:/state/popup/tour-dropdown">> class="tc-btn-invisible tc-tour-panel-list-button" selectedClass="tc-selected">
|
|
|
|
''Tour'': <<tour-display-current-tour>>
|
|
|
|
</$button>
|
|
|
|
<$reveal state=<<qualify "$:/state/popup/tour-dropdown">> type="popup" position="belowleft" animate="yes">
|
|
|
|
<div class="tc-drop-down">
|
|
|
|
<p>
|
|
|
|
Choose a tour:
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<<tour-chooser>>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</$reveal>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-09-21 09:24:34 +00:00
|
|
|
<$let
|
|
|
|
currentTour={{$:/config/CurrentTour}}
|
|
|
|
currentTourStep={{$:/state/tour/step}}
|
2023-09-22 09:55:39 +00:00
|
|
|
condition-var={{{ [<currentTourStep>get[condition-var]] :map[subfilter<currentTiddler>] }}}
|
2023-09-21 09:24:34 +00:00
|
|
|
>
|
2023-09-22 09:55:39 +00:00
|
|
|
<!-- Handle steps without a condition -->
|
|
|
|
<$list filter="[<currentTourStep>!has[condition]]" variable="ignore">
|
|
|
|
<$transclude tiddler=<<currentTourStep>> mode="block"/>
|
|
|
|
<<tour-buttons>>
|
|
|
|
</$list>
|
|
|
|
<!-- Handle steps that have a condition -->
|
|
|
|
<$list filter="[<currentTourStep>has[condition]]" variable="ignore">
|
|
|
|
<$transclude tiddler=<<currentTourStep>> mode="block"/>
|
|
|
|
<$list filter={{{ [<currentTourStep>get[condition]] }}} limit="1" variable="ignore">
|
|
|
|
<$confetti/>
|
|
|
|
Congratulations, you may proceed
|
|
|
|
<<tour-buttons>>
|
|
|
|
</$list>
|
|
|
|
</$list>
|
2023-09-21 09:24:34 +00:00
|
|
|
</$let>
|
2023-09-21 08:59:28 +00:00
|
|
|
<$list filter="[{$:/state/tour/step}has[selector]]" variable="ignore">
|
|
|
|
<$button class="tc-btn-big-green" style="background-color: green;">
|
|
|
|
<$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>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-16 19:56:39 +00:00
|
|
|
</$list>
|