mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-04 09:06:18 +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
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
title: $:/core/ui/Buttons/new-journal-here
|
|
tags: $:/tags/ViewToolbar
|
|
caption: {{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalHere/Caption}}
|
|
description: {{$:/language/Buttons/NewJournalHere/Hint}}
|
|
|
|
\define journalButtonTags()
|
|
[[$(currentTiddlerTag)$]] $(journalTags)$
|
|
\end
|
|
\define journalButton()
|
|
<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>
|
|
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags=<<journalButtonTags>>/>
|
|
<$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/NewJournalHere/Caption}}/></span>
|
|
</$list>
|
|
</$button>
|
|
\end
|
|
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
|
|
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
|
|
<$set name="currentTiddlerTag" value=<<currentTiddler>>>
|
|
<<journalButton>>
|
|
</$set></$set></$set>
|