1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-28 11:00:27 +00:00

Make export macros code readable without changing any functionality (#8513)

This commit is contained in:
Mario Pietsch 2024-09-08 16:57:55 +02:00 committed by GitHub
parent 7f2ab57f78
commit d827c57dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,27 +7,44 @@ $baseFilename$$(extension)$
\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers") \define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,baseFilename:"tiddlers")
\whitespace trim \whitespace trim
<$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}} caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}> <$vars hint={{{ [<__lingoBase__>addsuffix[Hint]get[text]] }}}
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export">> tooltip=<<hint>> aria-label=<<caption>> class=<<tv-config-toolbar-class>> selectedClass="tc-selected"> caption={{{ [<__lingoBase__>addsuffix[Caption]get[text]] }}}
<$list filter="[<tv-config-toolbar-icons>match[yes]]"> >
{{$:/core/images/export-button}} <span class="tc-popup-keep">
</$list> <$button popup=<<qualify "$:/state/popup/export">>
<$list filter="[<tv-config-toolbar-text>match[yes]]"> tooltip=<<hint>>
<span class="tc-btn-text"><$text text=<<caption>>/></span> aria-label=<<caption>>
</$list> class=<<tv-config-toolbar-class>>
</$button></span></$vars><$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes"> selectedClass="tc-selected"
<div class="tc-drop-down"> >
<$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]"> {{$:/core/images/export-button}}
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]" variable="ignore"> </$list>
<$button class="tc-btn-invisible"> <$list filter="[<tv-config-toolbar-text>match[yes]]">
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> exportFilter=<<__exportFilter__>> filename={{{ [<__baseFilename__>addsuffix{!!extension}] }}}/> <span class="tc-btn-text"><$text text=<<caption>>/></span>
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/> </$list>
<$transclude field="description"/> </$button>
</$button> </span>
</$list> </$vars>
</$list> <$reveal state=<<qualify "$:/state/popup/export">> type="popup" position="below" animate="yes">
</$set> <div class="tc-drop-down">
</div> <$set name="count" value={{{ [subfilter<__exportFilter__>count[]] }}}>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
<$list filter="[<currentTiddler>has[condition]subfilter{!!condition}limit[1]] ~[<currentTiddler>!has[condition]then[true]]"
variable="ignore"
>
<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file"
$param=<<currentTiddler>>
exportFilter=<<__exportFilter__>>
filename={{{ [<__baseFilename__>addsuffix{!!extension}] }}}
/>
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
<$transclude field="description"/>
</$button>
</$list>
</$list>
</$set>
</div>
</$reveal> </$reveal>
\end \end