mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-02 14:29:55 +00:00
46 lines
1.6 KiB
Plaintext
46 lines
1.6 KiB
Plaintext
title: $:/snippets/currpalettepreview
|
|
|
|
\whitespace trim
|
|
|
|
\procedure colour(name)
|
|
\whitespace trim
|
|
<$transclude $tiddler=<<currentTiddler>> $index=<<name>>>
|
|
<$transclude $tiddler="$:/palettes/Vanilla" $index=<<name>>>
|
|
<$transclude $tiddler={{{ [[$:/config/DefaultColourMappings/]addsuffix<name>] }}}/>
|
|
</$transclude>
|
|
</$transclude>
|
|
\end colour
|
|
|
|
\widget $colour.div(class,styleName,styleColour)
|
|
<%if [<styleName>!match[]] %>
|
|
<$wikify name="colour-result" text={{{ [[<<colour ]addsuffix<styleColour>addsuffix[>>]] }}} mode="inline">
|
|
<div class=<<class>> style={{{ [<styleName>addsuffix[:]addsuffix<colour-result>addsuffix[;]] }}}>
|
|
<$slot $name="ts-raw"/>
|
|
</div>
|
|
</$wikify>
|
|
<%else%>
|
|
<div class=<<class>>>
|
|
<$slot $name="ts-raw"/>
|
|
</div>
|
|
<%endif%>
|
|
\end $colour.div
|
|
|
|
\procedure palette-preview-thumbnail()
|
|
<$colour.div class="tc-palette-preview-thumbnail" styleName="background-color" styleColour="page-background">
|
|
<$colour.div class="tc-palette-preview-thumbnail-story">
|
|
<$list filter="HelloThere GettingStarted" variable="title">
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Preview/Story]!has[draft.of]]" variable="componentTitle">
|
|
<$transclude $tiddler=<<componentTitle>> title=<<title>>/>
|
|
</$list>
|
|
</$list>
|
|
</$colour.div>
|
|
<$colour.div class="tc-palette-preview-thumbnail-sidebar" styleName="color" styleColour="sidebar-foreground">
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Preview/SideBar]!has[draft.of]]" variable="componentTitle">
|
|
<$transclude $tiddler=<<componentTitle>> title=<<title>>/>
|
|
</$list>
|
|
</$colour.div>
|
|
</$colour.div>
|
|
\end palette-preview-thumbnail
|
|
|
|
<<palette-preview-thumbnail>>
|