2014-02-20 10:00:38 +00:00
|
|
|
title: $:/snippets/currpalettepreview
|
|
|
|
|
2020-07-15 11:23:13 +00:00
|
|
|
\whitespace trim
|
2024-10-25 08:28:33 +00:00
|
|
|
|
2024-11-07 18:30:39 +00:00
|
|
|
\procedure colour(name)
|
|
|
|
\whitespace trim
|
|
|
|
<$transclude $tiddler=<<currentTiddler>> $index=<<name>>>
|
|
|
|
<$transclude $tiddler="$:/palettes/Vanilla" $index=<<name>>>
|
|
|
|
<$transclude $tiddler={{{ [[$:/config/DefaultColourMappings/]addsuffix<name>] }}}/>
|
|
|
|
</$transclude>
|
|
|
|
</$transclude>
|
2024-10-25 08:28:33 +00:00
|
|
|
\end colour
|
|
|
|
|
2024-11-07 18:30:39 +00:00
|
|
|
\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
|
|
|
|
|
2024-10-25 08:28:33 +00:00
|
|
|
\procedure palette-preview-thumbnail()
|
2024-11-07 18:30:39 +00:00
|
|
|
<$colour.div class="tc-palette-preview-thumbnail" styleName="background-color" styleColour="page-background">
|
|
|
|
<$colour.div class="tc-palette-preview-thumbnail-story">
|
2024-11-08 09:12:48 +00:00
|
|
|
<$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>
|
2024-11-07 18:30:39 +00:00
|
|
|
</$colour.div>
|
|
|
|
<$colour.div class="tc-palette-preview-thumbnail-sidebar" styleName="color" styleColour="sidebar-foreground">
|
2024-11-08 09:12:48 +00:00
|
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Preview/SideBar]!has[draft.of]]" variable="componentTitle">
|
|
|
|
<$transclude $tiddler=<<componentTitle>> title=<<title>>/>
|
|
|
|
</$list>
|
2024-11-07 18:30:39 +00:00
|
|
|
</$colour.div>
|
|
|
|
</$colour.div>
|
2024-10-25 08:28:33 +00:00
|
|
|
\end palette-preview-thumbnail
|
|
|
|
|
|
|
|
<<palette-preview-thumbnail>>
|