mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Show tag-icons in tags edittemplate (#3447)
This commit is contained in:
parent
01407fa8f9
commit
cd0ce0cde5
@ -9,17 +9,17 @@ fill:$(foregroundColor)$;
|
|||||||
color:$(foregroundColor)$;
|
color:$(foregroundColor)$;
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
|
\define tag-body-inner(colour,fallbackTarget,colourA,colourB,icon)
|
||||||
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||||
<span style=<<tag-styles>> class="tc-tag-label">
|
<span style=<<tag-styles>> class="tc-tag-label">
|
||||||
<$view field="title" format="text" />
|
<$transclude tiddler="""$icon$"""/> <$view field="title" format="text" />
|
||||||
<$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible tc-remove-tag-button">×</$button>
|
<$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible tc-remove-tag-button">×</$button>
|
||||||
</span>
|
</span>
|
||||||
</$vars>
|
</$vars>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body(colour,palette)
|
\define tag-body(colour,palette,icon)
|
||||||
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
|
<$macrocall $name="tag-body-inner" colour="""$colour$""" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} icon="""$icon$"""/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-picker-actions()
|
\define tag-picker-actions()
|
||||||
@ -33,7 +33,7 @@ color:$(foregroundColor)$;
|
|||||||
<div class="tc-edit-tags">
|
<div class="tc-edit-tags">
|
||||||
<$fieldmangler>
|
<$fieldmangler>
|
||||||
<$list filter="[all[current]tags[]sort[title]]" storyview="pop">
|
<$list filter="[all[current]tags[]sort[title]]" storyview="pop">
|
||||||
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
|
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}} icon={{!!icon}}/>
|
||||||
</$list>
|
</$list>
|
||||||
</$fieldmangler>
|
</$fieldmangler>
|
||||||
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
<$macrocall $name="tag-picker" actions=<<tag-picker-actions>>/>
|
||||||
|
Loading…
Reference in New Issue
Block a user