diff --git a/core/wiki/peek-stylesheets.tid b/core/wiki/peek-stylesheets.tid index 7d9726fbeda..58ffaebcac4 100644 --- a/core/wiki/peek-stylesheets.tid +++ b/core/wiki/peek-stylesheets.tid @@ -1,76 +1,52 @@ title: $:/snippets/peek-stylesheets -\define expandable-stylesheets-list() -\whitespace trim -
    -<$list filter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]"> -<$vars state=<>> -<$set name="state" value={{{ [addsuffix] }}}> -
  1. -<$reveal type="match" state=<> text="yes" tag="span"> -<$button set=<> setTo="no" class="tc-btn-invisible"> -{{$:/core/images/down-arrow}} - - -<$reveal type="nomatch" state=<> text="yes" tag="span"> -<$button set=<> setTo="yes" class="tc-btn-invisible"> -{{$:/core/images/right-arrow}} - - -<$link> -<$view field="title"/> - -<$reveal type="match" state=<> text="yes" tag="div"> -<$set name="source" tiddler=<>> -<$wikify name="styles" text=<>> +\procedure expandable-content() +<$wikify name="styles" text={{!!text}}> <$codeblock code=<> language="css"/> - - -
  2. - - - -
\end -\define stylesheets-list() +\procedure toggle-content() +<$parameters openState="" open="[substitute[]get[text]else[no]]" openImage="$:/core/images/down-arrow" closedImage="$:/core/images/right-arrow" openCaption="" closedCaption=""> +<%if [!is[blank]] %> +<$checkbox tiddler={{{ [substitute[]] }}} field="text" checked="yes" style.appearance="none"> + +<%if [subfiltermatch[yes]] %> +<$transclude $tiddler=<> size="1em" /> <> +<%else%> +<$transclude $tiddler=<> size="1em" /> <> +<%endif%> + + +<%endif%> + +\end + +\procedure expandable-list() \whitespace trim +<$parameters filter="" openState="" open="[substitute[]get[text]else[no]]">
    -<$list filter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]"> +<$list filter=<> >
  1. -<$link> -<$view field="title"/> - -<$set name="source" tiddler=<>> -<$wikify name="styles" text=<>> -
    -
    -<$text text=<>/>
    -
    -
    - - +<$transclude $variable="toggle-content" open=<> openState=<> /> +<$link/> +<%if [subfiltermatch[yes]]%> +<> +<%endif%>
+ \end -\whitespace trim -<$vars modeState=<>> +<$let modeState=`$:/state/peek-stylesheets/mode/$(qualify)$` mode={{{ [get[text]else[expand]] }}} listFilter="[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]"> -<$reveal type="nomatch" state=<> text="expanded" tag="div"> -<$button set=<> setTo="expanded" class="tc-btn-invisible">{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Stylesheets/Expand/Caption}} - -<$reveal type="match" state=<> text="expanded" tag="div"> -<$button set=<> setTo="restored" class="tc-btn-invisible">{{$:/core/images/chevron-down}} {{$:/language/ControlPanel/Stylesheets/Restore/Caption}} - +<$transclude $variable="toggle-content" openImage="$:/core/images/chevron-right" closedImage="$:/core/images/chevron-down" openState=<> openCaption={{$:/language/ControlPanel/Stylesheets/Expand/Caption}} closedCaption={{$:/language/ControlPanel/Stylesheets/Restore/Caption}}/> -<$reveal type="nomatch" state=<> text="expanded" tag="div"> -<> - -<$reveal type="match" state=<> text="expanded" tag="div"> -<> - +<%if [match[expand]]%> +<$transclude $variable="expandable-list" filter=<> open="yes"/> +<%else%> +<$transclude $variable="expandable-list" filter=<> openState="$:/state/peek-tiddler/open/$(currentTiddler)$$(qualify)$"/> +<%endif%> - + \ No newline at end of file