1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-10 11:59:58 +00:00

Allow tag tiddlers to specify the title of an icon tiddler

Demonstrated on the "done" tag
This commit is contained in:
Jeremy Ruston 2013-07-05 08:53:09 +01:00
parent f7539ca794
commit 08f278624b
3 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
title: $:/core/ui/TagTemplate title: $:/core/ui/TagTemplate
<$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible"><$setstyle name="background-color" value={{!!color}} class="tw-tag-label"><$view field="title" format="text" /></$setstyle></$button> <$button popup="$:/state/tagpopup" qualifyTiddlerTitles="yes" class="btn-invisible"><$setstyle name="background-color" value={{!!color}} class="tw-tag-label"><$transclude target={{!!icon}}/> <$view field="title" format="text" /></$setstyle></$button>
<$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes" ><div class="tw-drop-down"> <$reveal state="$:/state/tagpopup" type="popup" position="below" qualifyTiddlerTitles="yes" ><div class="tw-drop-down">
<$view field="title" format="link" /> <$view field="title" format="link" />
---- ----

View File

@ -1,4 +1,5 @@
color: #3ae745 color: #3ae745
modified: 201306131058 modified: 201306131058
title: done title: done
icon: $:/core/images/done-button

View File

@ -264,6 +264,12 @@ a.tw-tiddlylink-external {
<<border-radius 8px>> <<border-radius 8px>>
} }
.tw-tag-label svg {
height: 1em;
width: 1em;
fill: #fff;
}
/* /*
** Page layout ** Page layout
*/ */
@ -541,6 +547,7 @@ canvas.tw-edit-bitmapeditor {
.tw-add-tag svg { .tw-add-tag svg {
height: 1em; height: 1em;
width: 1em;
fill: #999; fill: #999;
} }
@ -591,6 +598,7 @@ canvas.tw-edit-bitmapeditor {
.tw-edit-field-remove svg { .tw-edit-field-remove svg {
height: 1em; height: 1em;
width: 1em;
fill: #888; fill: #888;
vertical-align: middle; vertical-align: middle;
} }