diff --git a/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid b/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid index bfeec398c..edbf3f283 100644 --- a/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid +++ b/editions/tw5.com/tiddlers/Colour Handling Improvements Preview Build.tid @@ -10,9 +10,8 @@ modified: 20250204130756749 * Inspect the new palettes: ** $:/palettes/AutoToggle automatically switches between two user selected palettes according to the current operating system dark/light mode setting ** $:/palettes/TwentyTwenties derives all its colours from a small set of base colours, and provides a custom editor for tweaking those colours -** $:/palettes/TwentyTwenties/Dark is a variant of the TwentyTwenties palette with a dark colour scheme -** $:/palettes/TwentyTwenties/Green is a variant of the TwentyTwenties palette with a greenish colour scheme -* [[SampleBackgroundAction: Story Change]] is a sample background action that displays a notification whenever the contents of the story river changes +** $:/palettes/TwentyTwenties/Dark is a variant of the ~TwentyTwenties palette with a dark colour scheme +** $:/palettes/TwentyTwenties/Green is a variant of the ~TwentyTwenties palette with a greenish colour scheme ! New and Revised Documentation @@ -30,6 +29,7 @@ modified: 20250204130756749 The following features are required for the new colour handling system, but are general purpose, and may be cherry picked for earlier merging: +* [[Background Actions]] * MediaQueryTrackerMechanism * [[changecount Operator]] * [[Apply Filter Run Prefix]] diff --git a/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid index 19ae159ce..fdb9b1ea3 100644 --- a/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid +++ b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid @@ -36,13 +36,56 @@ type: text/vnd.tiddlywiki - <$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> + <$list filter="[all[current]fields[]sort[title]] -title -text" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
+ <$codeblock code={{{ [get[text]] }}}/> \end +\procedure .demo-tiddler(tidText) + \procedure create-tiddler-actions() + <$action-setmultiplefields $tiddler=<> $fields="[<jsonTiddler>jsonindexes[0]sort[]]" $values="[<jsonTiddler>jsonindexes[0]sort[]] :map[<jsonTiddler>jsonget[0],<currentTiddler>]"/> + \end create-tiddler-actions + <$let + jsonTiddler={{{ [<tidText>deserialize[application/x-tiddler]] }}} + title={{{ [<jsonTiddler>jsonget[0],[title]] }}} + > + <div class="doc-tiddler-fields"> + <h2> + <$link to=<<title>>> + <$text text=<<title>>/> + </$link> + </h2> + <table class="tc-view-field-table"> + <tbody> + <$list filter="[<jsonTiddler>jsonindexes[0]sort[]] -title -text" variable="listItem"> + <tr class="tc-view-field"> + <td class="tc-view-field-name"> + <$text text=<<listItem>>/> + </td> + <td class="tc-view-field-value"> + <$text text={{{ [<jsonTiddler>jsonget[0],<listItem>] }}}/> + </td> + </tr> + </$list> + </tbody> + </table> + <$codeblock code={{{ [<jsonTiddler>jsonget[0],[text]] }}}/> + <div> + <%if [<title>has[title]] %> + The tiddler '<$link to=<<title>>><$text text=<<title>>/></$link>' already exists + <%else%> + <$button actions=<<create-tiddler-actions>> class="tc-btn-big-green"> + Create this tiddler + </$button> + <%endif%> + </div> + </div> + </$let> +\end + \function .mtitle(_) [<_>] Macro +[join[ ]] \function .otitle(_) [<_>] Operator +[join[ ]] \function .vtitle(_) [<_>] Variable +[join[ ]] diff --git a/editions/tw5.com/tiddlers/SampleBackgroundAction Story Change.tid b/editions/tw5.com/tiddlers/mechanisms/Background Actions.tid similarity index 76% rename from editions/tw5.com/tiddlers/SampleBackgroundAction Story Change.tid rename to editions/tw5.com/tiddlers/mechanisms/Background Actions.tid index 6066650b4..1a8722d17 100644 --- a/editions/tw5.com/tiddlers/SampleBackgroundAction Story Change.tid +++ b/editions/tw5.com/tiddlers/mechanisms/Background Actions.tid @@ -1,3 +1,8 @@ +title: Background Actions +created: 20250212154426403 +modified: 20250212154426403 + +<<.demo-tiddler """ title: SampleBackgroundAction: Story Change tags: $:/tags/BackgroundAction track-filter: [list[$:/StoryList]] @@ -13,3 +18,4 @@ Story List: </li> </$list> </ol> +""">> \ No newline at end of file