mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
0671e59fed
Reasons: - can show or hide the button text with CSS (assuming tv-config-toolbar-text is yes). - can have different looking buttons in the page controls versus the view toolbar, etc - more flexibility styling the button appearance, for example you can change the text size compared to the icon size - button appearance is more themeable
20 lines
776 B
Plaintext
20 lines
776 B
Plaintext
title: $:/core/ui/Buttons/new-here
|
|
tags: $:/tags/ViewToolbar
|
|
caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}
|
|
description: {{$:/language/Buttons/NewHere/Hint}}
|
|
|
|
\define newHereButtonTags()
|
|
[[$(currentTiddler)$]]
|
|
\end
|
|
\define newHereButton()
|
|
<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
|
|
<$action-sendmessage $message="tm-new-tiddler" tags=<<newHereButtonTags>>/>
|
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
|
{{$:/core/images/new-here-button}}
|
|
</$list>
|
|
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewHere/Caption}}/></span>
|
|
</$list>
|
|
</$button>
|
|
\end
|
|
<<newHereButton>> |