diff --git a/core/ui/Components/VisibleTransclude.tid b/core/ui/Components/VisibleTransclude.tid new file mode 100644 index 000000000..93b17f202 --- /dev/null +++ b/core/ui/Components/VisibleTransclude.tid @@ -0,0 +1,45 @@ +title: $:/core/ui/VisibleTransclude + + +\function <$transclude>(tiddler,$tiddler,mode,$mode) + +<$let + mode={{{ [[$mode]is[variable]then<$mode>!is[blank]] :else[[mode]is[variable]then!is[blank]] :else[match[yes]then[inline]else[block]] }}} + outputTag={{{ [match[inline]then[span]else[div]] }}} + outputColour={{{ [match[inline]then[green]else[red]] }}} +> + + <$genesis $type="element" $tag=<> style="color:white;padding:4px;" style.background=<>> + <$genesis $type="element" $tag=<> style="display: inline-block;"> +
+ + <$list filter="[enlist:raw]" counter="counter" emptyMessage="(none)"> +
+ <$text text=<>/><$text text=": "/><$text text={{{ [enlist:rawnth] }}}/> +
+ +
+ + <$genesis $type="element" $tag=<> style="background:white;color:black;padding:4px;"> + + <$list filter="[enlist:raw] :filter[prefix[$]] +[limit[1]]" variable="ignore" emptyMessage=""" + + <$genesis $type="transclude" $remappable="no" $names="[enlist:raw]" $values="[enlist:raw]" recursionMarker="no" mode=<>> + + <$slot $name="ts-raw" $depth="2"/> + + """> + + <$genesis $type="transclude" $remappable="no" $names="[enlist:raw]" $values="[enlist:raw]" $$recursionMarker="no" $$mode=<>> + + <$slot $name="ts-raw" $depth="2"/> + + + + +<$let> +\end diff --git a/editions/tw5.com/tiddlers/howtos/Visible Transclusions.tid b/editions/tw5.com/tiddlers/howtos/Visible Transclusions.tid new file mode 100644 index 000000000..6b7d26024 --- /dev/null +++ b/editions/tw5.com/tiddlers/howtos/Visible Transclusions.tid @@ -0,0 +1,11 @@ +title: Visible Transclusions +tags: Learning + +!! Visible Transclusions + +Block transclusions are shown in red, and inline transclusions are shown in green. + +<$button> +<$action-setfield $tiddler="$:/temp/VisibleTransclusions" tags="$:/tags/Macro/View/Body" text={{$:/core/ui/VisibleTransclude}}/> +Click here to make transclusions visible within story river tiddlers +