mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
* Fix #4755 - Indirect colours not shown in palette switcher * Update currpalettepreview.tid * Update currpalettepreview.tid
This commit is contained in:
parent
00ff0d6fa0
commit
484c9e986f
@ -1,11 +1,40 @@
|
|||||||
title: $:/snippets/currpalettepreview
|
title: $:/snippets/currpalettepreview
|
||||||
|
|
||||||
|
\define resolve-colour(macrocall)
|
||||||
|
\import $:/core/macros/utils
|
||||||
|
\whitespace trim
|
||||||
|
<$wikify name="name" text="""$macrocall$""">
|
||||||
|
<<name>>
|
||||||
|
</$wikify>
|
||||||
|
\end
|
||||||
\define swatchStyle()
|
\define swatchStyle()
|
||||||
background-color: $(swatchColour)$;
|
background-color: $(swatchColour)$;
|
||||||
\end
|
\end
|
||||||
|
\define swatch-inner()
|
||||||
|
<$set name="swatchColour" value={{##$(colourResolved)$}}>
|
||||||
|
<$list filter="[<swatchColour>!prefix[<<colour ]!suffix[>>]]" variable="ignore">
|
||||||
|
<div class="tc-swatch" style=<<swatchStyle>> title=<<swatchTitle>>/>
|
||||||
|
</$list>
|
||||||
|
<$list filter="[<swatchColour>prefix[<<colour ]suffix[>>]]" variable="ignore">
|
||||||
|
<$wikify name="colourResolved" text="""<$macrocall $name="resolve-colour" macrocall=<<swatchColour>>/>""">
|
||||||
|
<<swatch-inner>>
|
||||||
|
</$wikify>
|
||||||
|
</$list>
|
||||||
|
</$set>
|
||||||
|
\end
|
||||||
\define swatch()
|
\define swatch()
|
||||||
<$set name="swatchColour" value={{##$(colour)$}}
|
<$set name="swatchColour" value={{##$(colour)$}}>
|
||||||
><div class="tc-swatch" style=<<swatchStyle>> title=<<colour>>/></$set>
|
<$set name="swatchTitle" value=<<colour>>>
|
||||||
|
<$list filter="[<swatchColour>!prefix[<<colour ]!suffix[>>]]" variable="ignore">
|
||||||
|
<div class="tc-swatch" style=<<swatchStyle>> title=<<swatchTitle>>/>
|
||||||
|
</$list>
|
||||||
|
<$list filter="[<swatchColour>prefix[<<colour ]suffix[>>]]" variable="ignore">
|
||||||
|
<$wikify name="colourResolved" text="""<$macrocall $name="resolve-colour" macrocall=<<swatchColour>>/>""">
|
||||||
|
<<swatch-inner>>
|
||||||
|
</$wikify>
|
||||||
|
</$list>
|
||||||
|
</$set>
|
||||||
|
</$set>
|
||||||
\end
|
\end
|
||||||
<div class="tc-swatches-horiz"><$list filter="
|
<div class="tc-swatches-horiz"><$list filter="
|
||||||
foreground
|
foreground
|
||||||
@ -15,4 +44,4 @@ primary
|
|||||||
page-background
|
page-background
|
||||||
tab-background
|
tab-background
|
||||||
tiddler-info-background
|
tiddler-info-background
|
||||||
" variable="colour"><<swatch>></$list></div>
|
" variable="colour"><<swatch>></$list></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user