mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-28 11:00:27 +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
21 lines
932 B
Plaintext
21 lines
932 B
Plaintext
title: $:/core/ui/Buttons/new-journal
|
|
tags: $:/tags/PageControls
|
|
caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}
|
|
description: {{$:/language/Buttons/NewJournal/Hint}}
|
|
|
|
\define journalButton()
|
|
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>
|
|
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags="$(journalTags)$"/>
|
|
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
|
{{$:/core/images/new-journal-button}}
|
|
</$list>
|
|
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
|
<span class="tc-btn-text"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>
|
|
</$list>
|
|
</$button>
|
|
\end
|
|
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
|
|
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
|
|
<<journalButton>>
|
|
</$set></$set>
|