1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +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
<$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">
<$view field="title" format="link" />
----

View File

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

View File

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