mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-07 14:23:53 +00:00
Refactor $:/core/ui/TagTemplate using sub-tiddlers (#2477)
The Open All by tag feature should really be in a plugin.
This commit is contained in:
parent
a9c4f113a1
commit
f76c7e9560
@ -7,18 +7,18 @@ color:$(foregroundColor)$;
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
|
\define tag-body-inner(colour,fallbackTarget,colourA,colourB)
|
||||||
<$set name="foregroundColor" value=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">>>
|
<$vars foregroundColor=<<contrastcolour target:"""$colour$""" fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" colourB:"""$colourB$""">> backgroundColor="""$colour$""">
|
||||||
<$set name="backgroundColor" value="""$colour$""">
|
|
||||||
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>>
|
<$button popup=<<qualify "$:/state/popup/tag">> class="tc-btn-invisible tc-tag-label" style=<<tag-styles>>>
|
||||||
<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" />
|
<$transclude tiddler={{!!icon}}/> <$view field="title" format="text" />
|
||||||
</$button>
|
</$button>
|
||||||
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes"><div class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
<$reveal state=<<qualify "$:/state/popup/tag">> type="popup" position="below" animate="yes" class="tc-drop-down"><$transclude tiddler="$:/core/ui/ListItemTemplate"/>
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]" variable="listItem">
|
||||||
|
<$transclude tiddler=<<listItem>>/>
|
||||||
|
</$list>
|
||||||
<hr>
|
<hr>
|
||||||
<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
<$list filter="[all[current]tagging[]]" template="$:/core/ui/ListItemTemplate"/>
|
||||||
</div>
|
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$set>
|
</$vars>
|
||||||
</$set>
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define tag-body(colour,palette)
|
\define tag-body(colour,palette)
|
||||||
@ -27,4 +27,4 @@ color:$(foregroundColor)$;
|
|||||||
</span>
|
</span>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
|
<$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user