mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 05:19:57 +00:00
Fix previews of filtered palettes
This commit is contained in:
parent
c2ee0727a5
commit
3faf9bae5c
@ -3,14 +3,15 @@ title: $:/snippets/currpalettepreview
|
|||||||
\whitespace trim
|
\whitespace trim
|
||||||
|
|
||||||
\procedure colour-div-filtered(class,styleName,styleColour)
|
\procedure colour-div-filtered(class,styleName,styleColour)
|
||||||
\function colour(name) [<currentTiddler>getindex<name>] :else[<currentTiddler>get[palette-import]getindex<name>] :else[[none]] :map[subfilter<currentTiddler>]
|
\function colour(name) [<colour-palette>getindex<name>] :else[<colour-palette>get[palette-import]getindex<name>] :else[[none]] :map[subfilter<currentTiddler>] +[join[ ]]
|
||||||
<$let colour-filter={{{ [<currentTiddler>getindex<styleColour>] }}}>
|
<!-- Note the join, needed to cope with palette entries containing spaces -->
|
||||||
<!-- Note the join, needed to cope with palette entries containing spaces -->
|
<$let
|
||||||
<$let colour-result={{{ [subfilter<colour-filter>join[ ]] }}}>
|
colour-palette=<<currentTiddler>>
|
||||||
<div class=<<class>> style={{{ [<styleName>addsuffix[:]addsuffix<colour-result>addsuffix[;]] }}}>
|
colour-result={{{ [function[colour],<styleColour>] +[join[ ]] }}}
|
||||||
<$slot $name="ts-raw" $depth="2"/>
|
>
|
||||||
</div>
|
<div class=<<class>> style={{{ [<styleName>addsuffix[:]addsuffix<colour-result>addsuffix[;]] }}}>
|
||||||
</$let>
|
<$slot $name="ts-raw" $depth="2"/>
|
||||||
|
</div>
|
||||||
</$let>
|
</$let>
|
||||||
\end colour-div-filtered
|
\end colour-div-filtered
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user