mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Add "new here" button
This is a basic “new here” tiddler toolbar button that just creates a new tiddler tagged with the title of the current tiddler. @pmario is there anything else required?
This commit is contained in:
parent
c322dc82c3
commit
70984aa39f
9
core/images/new-here-button.tid
Normal file
9
core/images/new-here-button.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/images/new-here-button
|
||||
tags: $:/tags/Image
|
||||
|
||||
<svg class="tc-image-new-here-button tc-image-button" width="22pt" height="22pt" viewBox="0 0 128 128">
|
||||
<g fill-rule="evenodd">
|
||||
<path d="M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,118 C93.8233765,118 118,93.8233765 118,64 C118,34.1766235 93.8233765,10 64,10 C34.1766235,10 10,34.1766235 10,64 C10,93.8233765 34.1766235,118 64,118 Z M64,108 C88.300529,108 108,88.300529 108,64 C108,39.699471 88.300529,20 64,20 C39.699471,20 20,39.699471 20,64 C20,88.300529 39.699471,108 64,108 Z M64,98 C82.7776815,98 98,82.7776815 98,64 C98,45.2223185 82.7776815,30 64,30 C45.2223185,30 30,45.2223185 30,64 C30,82.7776815 45.2223185,98 64,98 Z"></path>
|
||||
<path d="M56.9090909,72.4545455 L56.9090909,87.9090909 L56.9090909,87.9090909 L56.9090909,87.9090909 C56.9090909,89.6161485 58.3200768,91 60.0606061,91 L67.9393939,91 C69.6799232,91 71.0909091,89.6161485 71.0909091,87.9090909 L71.0909091,72.4545455 L86.8484848,72.4545455 C88.5890141,72.4545455 90,71.0707455 90,69.3636364 L90,61.6363636 C90,59.9292545 88.5890141,58.5454545 86.8484848,58.5454545 L71.0909091,58.5454545 L71.0909091,43.0909091 C71.0909091,41.3838 69.6799232,40 67.9393939,40 L60.0606061,40 L60.0606061,40 C58.3200768,40 56.9090909,41.3838 56.9090909,43.0909091 L56.9090909,58.5454545 L41.1515152,58.5454545 L41.1515152,58.5454545 C39.4109817,58.5454545 38,59.9292545 38,61.6363636 L38,69.3636364 L38,69.3636364 L38,69.3636364 C38,71.0707455 39.4109817,72.4545455 41.1515152,72.4545455 L56.9090909,72.4545455 Z"></path>
|
||||
</g>
|
||||
</svg>
|
@ -34,12 +34,14 @@ Home/Caption: home
|
||||
Home/Hint: Open the default tiddlers
|
||||
Language/Caption: language
|
||||
Language/Hint: Choose the user interface language
|
||||
More/Caption: more
|
||||
More/Hint: More actions
|
||||
NewHere/Caption: new here
|
||||
NewHere/Hint: Create a new tiddler tagged with "<$text text=<<currentTiddler>>"
|
||||
NewJournal/Caption: new journal
|
||||
NewJournal/Hint: Create a new journal tiddler
|
||||
NewTiddler/Caption: new tiddler
|
||||
NewTiddler/Hint: Create a new tiddler
|
||||
More/Caption: more
|
||||
More/Hint: More actions
|
||||
Permalink/Caption: permalink
|
||||
Permalink/Hint: Set browser address bar to a direct link to this tiddler
|
||||
Permaview/Caption: permaview
|
||||
|
14
core/ui/ViewToolbar/new-here.tid
Normal file
14
core/ui/ViewToolbar/new-here.tid
Normal file
@ -0,0 +1,14 @@
|
||||
title: $:/core/ui/Buttons/new-here
|
||||
tags: $:/tags/ViewToolbar
|
||||
caption: {{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}
|
||||
description: {{$:/language/Buttons/NewHere/Hint}}
|
||||
|
||||
<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>
|
||||
<$action-sendmessage $message="tm-new-tiddler" tags=<<currentTiddler>>/>
|
||||
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
|
||||
{{$:/core/images/new-here-button}}
|
||||
</$list>
|
||||
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
||||
<$text text={{$:/language/Buttons/NewHere/Caption}}/>
|
||||
</$list>
|
||||
</$button>
|
@ -3,5 +3,6 @@ title: $:/config/ViewToolbarButtons/Visibility/$:/
|
||||
core/ui/Buttons/clone: hide
|
||||
core/ui/Buttons/close-others: hide
|
||||
core/ui/Buttons/more-tiddler-actions: hide
|
||||
core/ui/Buttons/new-here: hide
|
||||
core/ui/Buttons/permalink: hide
|
||||
core/ui/Buttons/permaview: hide
|
||||
|
@ -1,2 +1,2 @@
|
||||
title: $:/tags/ViewToolbar
|
||||
list: [[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]]
|
||||
list: [[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/new-here]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]]
|
||||
|
Loading…
Reference in New Issue
Block a user