1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Use match operator instead of prefix

Fixes #4407
This commit is contained in:
Jeremy Ruston 2020-01-05 13:54:06 +00:00
parent f59d044a8c
commit 6732b3c0d9
10 changed files with 38 additions and 38 deletions

View File

@ -40,10 +40,10 @@ Digamos que tienes un tiddler llamado <<.tid "Plantilla Recetas">> y quieres un
$param="TÍTULO DE LA PLANTILLA QUE QUIERES QUE ABRA"
title="New tiddler"
tags=<<newHereButtonTags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{NOMBRE DE LA IMAGEN DEL BOTÓN}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="NOMBRE DEL BOTÓN PARA MOSTRAR EN PANTALLA"/></span>
</$list>
</$button>

View File

@ -39,10 +39,10 @@ Imaginons que vous ayez un tiddler squelette appelé 'Modèle Recette', et que v
$param="TITLE DE VOTRE BOUTON SQUELETTE"
title="New tiddler"
tags=<<newHereButtonTags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{TITRE DE VOTRE TIDDLER IMAGE SVG}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="CAPTION DE VOTRE BOUTON"/></span>
</$list>
</$button>

View File

@ -37,10 +37,10 @@ Let's say you have a skeleton tiddler called 'Recipe template', and you want to
$param="TITLE OF YOUR SKELETON BUTTON"
title="New tiddler"
tags=<<newHereButtonTags>> />
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{TITLE OF YOUR SVG IMAGE TIDDLER}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text="CAPTION FOR YOUR BUTTON"/></span>
</$list>
</$button>

View File

@ -8,20 +8,20 @@ description: {{$:/language/Buttons/Help/Hint}}
\whitespace trim
<$reveal type="match" state="$:/config/ShowHelp" text="yes">
<$button set="$:/config/ShowHelp" setTo="no" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class="""$(tv-config-toolbar-class)$ tc-selected""">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/help}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span>
</$list>
</$button>
</$reveal>
<$reveal type="nomatch" state="$:/config/ShowHelp" text="yes">
<$button set="$:/config/ShowHelp" setTo="yes" tooltip={{$:/language/Buttons/Help/Hint}} aria-label={{$:/language/Buttons/Help/Caption}} class=<<tv-config-toolbar-class>>>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/core/images/help}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Help/Caption}}/></span>
</$list>
</$button>

View File

@ -7,10 +7,10 @@ list-after: $:/core/ui/Buttons/new-tiddler
\whitespace trim
<$button tooltip={{$:/language/Buttons/NewMarkdown/Hint}} aria-label={{$:/language/Buttons/NewMarkdown/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" type="text/x-markdown"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/plugins/tiddlywiki/markdown/images/new-markdown-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewMarkdown/Caption}}/></span>
</$list>
</$button>

View File

@ -8,10 +8,10 @@ description: Generate QR code for this tiddler
\whitespace trim
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/qrcode">> tooltip={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!description}} aria-label={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!short-caption}} class=<<tv-config-toolbar-class>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/plugins/tiddlywiki/qrcode/icon}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text=" "/>
<$text text={{$:/plugins/tiddlywiki/qrcode/ViewToolbarButton!!short-caption}}/>

View File

@ -7,12 +7,12 @@ $then$
\end
\define include-component(type)
<<if "[{!!toc-type}prefix[$type$]]" """
<<if "[{!!toc-type}match[$type$]]" """
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/interactive/$type$" mode="block"/>
""">>
\end
<$list filter="[<tv-show-toolbar>prefix[yes]]" variable="hasToolbar">
<$list filter="[<tv-show-toolbar>match[yes]]" variable="hasToolbar">
{{||$:/plugins/tiddlywiki/text-slicer/ui/tiddler/toolbar}}
</$list>

View File

@ -2,43 +2,43 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/plain/tiddler
<$vars toc-type={{!!toc-type}}>
<$list filter="[<toc-type>prefix[document]]" variable="item">
<$list filter="[<toc-type>match[document]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/document" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[heading]]" variable="item">
<$list filter="[<toc-type>match[heading]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/heading" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[paragraph]]" variable="item">
<$list filter="[<toc-type>match[paragraph]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/paragraph" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[note]]" variable="item">
<$list filter="[<toc-type>match[note]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/note" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[list]]" variable="item">
<$list filter="[<toc-type>match[list]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/list" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[item]]" variable="item">
<$list filter="[<toc-type>match[item]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/item" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[image]]" variable="item">
<$list filter="[<toc-type>match[image]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/image" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[def-list]]" variable="item">
<$list filter="[<toc-type>match[def-list]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/def-list" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[term]]" variable="item">
<$list filter="[<toc-type>match[term]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/term" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[definition]]" variable="item">
<$list filter="[<toc-type>match[definition]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/plain/definition" mode="block"/>
</$list>

View File

@ -2,61 +2,61 @@ title: $:/plugins/tiddlywiki/text-slicer/templates/static/tiddler
<$vars toc-type={{!!toc-type}}>
<$list filter="[<toc-type>prefix[document]]" variable="item">
<$list filter="[<toc-type>match[document]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/document" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[heading]]" variable="item">
<$list filter="[<toc-type>match[heading]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/heading" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[paragraph]]" variable="item">
<$list filter="[<toc-type>match[paragraph]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/paragraph" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[note]]" variable="item">
<$list filter="[<toc-type>match[note]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/note" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[list]]" variable="item">
<$list filter="[<toc-type>match[list]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/list" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[item]]" variable="item">
<$list filter="[<toc-type>match[item]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/item" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[image]]" variable="item">
<$list filter="[<toc-type>match[image]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/image" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[def-list]]" variable="item">
<$list filter="[<toc-type>match[def-list]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/def-list" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[term]]" variable="item">
<$list filter="[<toc-type>match[term]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/term" mode="block"/>
</$list>
<$list filter="[<toc-type>prefix[definition]]" variable="item">
<$list filter="[<toc-type>match[definition]]" variable="item">
<$transclude tiddler="$:/plugins/tiddlywiki/text-slicer/templates/static/definition" mode="block"/>

View File

@ -13,10 +13,10 @@ Slice this text tiddler into chunks
<$list filter="[<currentTiddler>!is[image]!is[binary]]" variable="ignore">
<$button tooltip=<<hint>> aria-label=<<hint>> class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-modal" $param="$:/plugins/tiddlywiki/text-slicer/ui/slice-modal" currentTiddler=<<currentTiddler>>/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
{{$:/plugins/tiddlywiki/text-slicer/images/text-slicer-icon}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"> Slice tiddler</span>
</$list>
</$button>