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
|
||||
|
||||
\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>]
|
||||
<$let colour-filter={{{ [<currentTiddler>getindex<styleColour>] }}}>
|
||||
<!-- Note the join, needed to cope with palette entries containing spaces -->
|
||||
<$let colour-result={{{ [subfilter<colour-filter>join[ ]] }}}>
|
||||
\function colour(name) [<colour-palette>getindex<name>] :else[<colour-palette>get[palette-import]getindex<name>] :else[[none]] :map[subfilter<currentTiddler>] +[join[ ]]
|
||||
<!-- Note the join, needed to cope with palette entries containing spaces -->
|
||||
<$let
|
||||
colour-palette=<<currentTiddler>>
|
||||
colour-result={{{ [function[colour],<styleColour>] +[join[ ]] }}}
|
||||
>
|
||||
<div class=<<class>> style={{{ [<styleName>addsuffix[:]addsuffix<colour-result>addsuffix[;]] }}}>
|
||||
<$slot $name="ts-raw" $depth="2"/>
|
||||
</div>
|
||||
</$let>
|
||||
</$let>
|
||||
\end colour-div-filtered
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user