From 35d1609a2bc1e5555521a9f6eb29cf56e91be5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=A9lumire?= <31185220+Telumire@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:39:15 +0100 Subject: [PATCH 01/12] Add a warning for potential image map scaling issues + responsive alternative with SVG (#8044) * Add a warning for potential image map scaling issues + alternative with SVG * Update ImageWidget.tid fix phrasing --- .../tw5.com/tiddlers/widgets/ImageWidget.tid | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/editions/tw5.com/tiddlers/widgets/ImageWidget.tid b/editions/tw5.com/tiddlers/widgets/ImageWidget.tid index 0f4bd9012..105a71311 100644 --- a/editions/tw5.com/tiddlers/widgets/ImageWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/ImageWidget.tid @@ -25,6 +25,38 @@ Any content of the `<$image>` widget is ignored. The width and the height can be specified as pixel values (eg "23" or "23px") or percentages (eg "23%"). They are both optional; if not provided the browser will use CSS rules to size the image. +! Responsive images and `` + +[[Image maps area|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area]] coordinates are numbers of CSS pixels, therefore they do not scale. If you want to use responsive images, you can use a `svg` and `foreignObject`: + + + +[img[Tiddler Fishes.svg]] + + + +Orange fish + + + +Cyan fish + + + +Purple fish + + + +Green fish + + + +Blue fish + + + + + ! Image Status Classes <> The following CSS classes are automatically added to the `` element to indicate the status of the image. Note that only one of these classes will be added at the same time. From b22570a91f900093e73bbed370184f6c4f3d02b4 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 11:35:31 +0100 Subject: [PATCH 02/12] Doc-macros - variable-macros new v5.3.x syntax (#8031) * doc-macros - variable-macros new v5.3.x syntax * change modified back to old value --- .../tiddlers/system/variable-macros.tid | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/variable-macros.tid b/editions/tw5.com/tiddlers/system/variable-macros.tid index 313f065af..2abc5d083 100644 --- a/editions/tw5.com/tiddlers/system/variable-macros.tid +++ b/editions/tw5.com/tiddlers/system/variable-macros.tid @@ -1,21 +1,26 @@ created: 20150228114241000 modified: 20220227210136243 tags: $:/tags/Macro +code-body: yes title: $:/editions/tw5.com/variable-macros -\define .variable-examples(v,text:"Examples") <$link to="$v$ Variable (Examples)">$text$ -\define .macro-examples(m,text:"Examples") <$link to="$m$ Macro (Examples)">$text$ -\define .widget-examples(w,text:"Examples") <$link to="$w$ Widget (Examples)">$text$ +\procedure .variable-examples(v,text:"Examples") <$link to=`$(v)$ Variable (Examples)`><> +\procedure .macro-examples(m,text:"Examples") <$link to=`$(m)$ Macro (Examples)`><> +\procedure .widget-examples(w,text:"Examples") <$link to=`$(w)$ Widget (Examples)`><> -\define .js-macro-link(_) [[$_$|https://tiddlywiki.com/dev/index.html#JavaScript%20Macros]] - -\define .this-is-static-link-variable() <<.tip "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">> - -\define .this-is-toolbar-config-variable(configTiddler) - -It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button. - -The standard page template sets it to the value found in [[$configTiddler$]], with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]]. +\procedure .js-macro-link(_) +<$text text=<<_>>/> \end -
<$view field="text"/>
\ No newline at end of file +\procedure .this-is-static-link-variable() <<.note "This variable has no useful effect when ~TiddlyWiki is running in a browser, as the `href` attribute is ignored there -- links between tiddlers are performed by JavaScript instead. The variable comes into play when one is using the [[Node.js configuration|TiddlyWiki on Node.js]] to [[generate a static version|RenderTiddlersCommand]] of a wiki.">> + +\procedure .this-is-toolbar-config-variable(configTiddler) +\whitespace notrim +It can be set to <<.value yes>> or <<.value no>> prior to transcluding such a button. + +The standard page template sets it to the value found in <$link to=<>><>, with the result that this becomes the default for the whole page. The user can adjust this default by using a tickbox on the <<.controlpanel-tab Settings>> tab of the [[Control Panel|$:/ControlPanel]]. +\end From 0202d7b463040b04b33ff01f828d651678c74a05 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 11:36:49 +0100 Subject: [PATCH 03/12] Docs - make .from-version and .deprecated-since macros more readable (#8032) --- .../tiddlers/system/version-macros.tid | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/version-macros.tid b/editions/tw5.com/tiddlers/system/version-macros.tid index 9fd66f24f..55ef03687 100644 --- a/editions/tw5.com/tiddlers/system/version-macros.tid +++ b/editions/tw5.com/tiddlers/system/version-macros.tid @@ -1,21 +1,38 @@ code-body: yes created: 20161008085627406 -modified: 20231206135257498 +modified: 20240229155633000 tags: $:/tags/Macro title: $:/editions/tw5.com/version-macros type: text/vnd.tiddlywiki -\procedure .from-version-reference() 5.3.0 +\whitespace trim + +\function tf.from-version-reference() 5.3.0 \procedure .from-version-template(class, text) -<$link to={{{ [addprefix[Release ]] }}} class=<> >@@.tc-tiny-gap-right {{$:/core/images/info-button}}@@<><> +<$link to={{{ [addprefix[Release ]] }}} class=<> > + + {{$:/core/images/info-button}} + + <><> + \end \procedure .from-version(version) -<$list filter="[compare:version:gteq<.from-version-reference>]"><<.from-version-template "doc-from-version doc-from-version-new" "New in v">> -<$list filter="[compare:version:lt<.from-version-reference>]"><<.from-version-template "doc-from-version" "Introduced in v">> +<% if [compare:version:gteq] %> + <<.from-version-template "doc-from-version doc-from-version-new" "New in v">> +<% else %> + <<.from-version-template "doc-from-version" "Introduced in v">> +<% endif %> \end -\define .deprecated-since(version, superseded:"TODO-Link") -<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated since: <$text text=<<__version__>>/> (see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/>) +\procedure .deprecated-since(version, superseded:"TODO-Link") +<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible"> + {{$:/core/images/warning}} + Deprecated since: + <$text text=<>/> + + + (see <$link class="tc-tiny-gap-left" to=<>><$text text=<>/>) + \end From 0fb10da8b34202dcbd0e815fb45b106ac15a539c Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 11:37:26 +0100 Subject: [PATCH 04/12] Docs - wikitext-macros new v5.3.x syntax (#8033) --- .../tiddlers/system/wikitext-macros.tid | 116 ++++++++---------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/system/wikitext-macros.tid index 7db97bf50..89de7d022 100644 --- a/editions/tw5.com/tiddlers/system/wikitext-macros.tid +++ b/editions/tw5.com/tiddlers/system/wikitext-macros.tid @@ -1,104 +1,96 @@ code-body: yes created: 20150117184156000 -modified: 20220617122915793 +modified: 20240229155641000 tags: $:/tags/Macro title: $:/editions/tw5.com/wikitext-macros type: text/vnd.tiddlywiki -\define activatePluginTab() +\whitespace trim + +\procedure activatePluginTab() <$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/> <$action-navigate $to="$:/ControlPanel"/> \end -\define activateTiddlerWindow() -<$action-sendmessage $message="tm-open-window" - $param=<> windowTitle="Side by Side View" - width="800" height="600" /> +\procedure activateTiddlerWindow() +<$action-sendmessage $message="tm-open-window" $param=<> windowTitle="Side by Side View" width="800" height="600" /> \end -\define controlPanel-plugin-link() +\procedure controlPanel-plugin-link() <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> -{{$:/core/images/options-button}} ~ControlPanel + {{$:/core/images/options-button}} ~ControlPanel \end -\define open-tiddler-in-window() +\procedure open-tiddler-in-window() +\whitespace notrim <$button actions=<> class="tc-btn-invisible tc-tiddlylink"> -open ''this'' tiddler in a new window + open ''this'' tiddler in a new window \end -\define activateEditionWindow(url) -<$action-sendmessage $message="tm-open-external-window" - $param="""$url$""" windowName="_edition" - windowFeatures="width=800 height=600" /> +\procedure activateEditionWindow(url) +<$action-sendmessage $message="tm-open-external-window" $param=<> windowName="_edition" windowFeatures="width=800 height=600" /> \end -\define open-external-window(url) -<$button actions=<> class="tc-btn-invisible tc-tiddlylink"> -open the ''example edition'' in a new window +\procedure open-external-window(url) +\whitespace notrim +<$button actions=<> class="tc-btn-invisible tc-tiddlylink"> + open the ''example edition'' in a new window \end -\define wikitext-example(src) +\procedure wikitext-example(src)
- -<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> - -<$codeblock code=<<__src__>>/> - -That renders as: - -<$macrocall $name="__src__"/> - -... and the underlying HTML is: - -<$wikify name="html" text=<<__src__>> output="html"> -<$codeblock code=<>/> - + <$macrocall $name="copy-to-clipboard-above-right" src=<>/> + <$codeblock code=<>/> +

+ That renders as: +

+ <$transclude $variable="src" $mode="block"/> +

+ ... and the underlying HTML is: +

+ <$wikify name="html" text=<> output="html"> + <$codeblock code=<>/> +
\end -\define wikitext-example-without-html(src) +\procedure wikitext-example-without-html(src)
- -<$macrocall $name="copy-to-clipboard-above-right" src=<<__src__>>/> - -<$codeblock code=<<__src__>>/> - -That renders as: - -<$macrocall $name="__src__"/> - + <$macrocall $name="copy-to-clipboard-above-right" src=<>/> + <$codeblock code=<>/> +

+ That renders as: +

+ <$macrocall $name="src"/>
\end -\define wikitext-example-table-header() wiki textrenders as +\procedure wikitext-example-table-header() wiki textrenders as -\define wikitext-example-table-row(id, code) - -<<__id__>><$codeblock code=<<__code__>>/> - -<<__code__>> - +\procedure wikitext-example-table-row(id, code) + + <> + <$codeblock code=<>/> + <> \end -\define tw-code(tiddler) +\procedure tw-code(tiddler) <$codeblock language={{$tiddler$!!type}} code={{$tiddler$}}/> \end -\define tw-code-link(tiddler) +\procedure tw-code-link(tiddler) [[$tiddler$]]: - <> \end -\define flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description",linkField:"link") -\whitespace trim -<$link class={{{ [<__class__>addprefix[tc-card ]] }}} to={{{ [get<__linkField__>else] }}}> -
!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<<__backgroundcolor__>> style.color=<<__textcolor__>> style.fill=<<__textcolor__>>> +\procedure flex-card(class,bordercolor:"",backgroundcolor:"",textcolor:"",imageField:"image",captionField:"caption",subtitle:"",descriptionField:"description", inkField:"link") +<$link class={{{ [addprefix[tc-card ]] }}} to={{{ [getelse] }}}> +
!is[blank]addprefix[5px solid ]] }}} style.background={{!!background}} style.backgroundColor=<> style.color=<> style.fill=<>> <$list filter="[has[ribbon-text]]" variable="ignore">
get[ribbon-color]else[red]] }}}> @@ -108,21 +100,21 @@ That renders as:
- <$list filter="[has<__imageField__>]" variable="ignore"> + <$list filter="[has]" variable="ignore">
- <$image source={{{ [get<__imageField__>] }}}/> + <$image source={{{ [get] }}}/>
-
<$transclude field=<<__captionField__>>><$view field="title"/>
- <$list filter="[<__subtitle__>!is[blank]]" variable="ignore"> +
<$transclude field=<>><$view field="title"/>
+ <$list filter="[!is[blank]]" variable="ignore">
- <$text text=<<__subtitle__>>/> + <$text text=<>/>
<$transclude tiddler={{!!icon}}/>
- <$transclude field=<<__descriptionField__>> mode="block"/> + <$transclude field=<> mode="block"/>
From a75d4ca003b1ed6d6f721a4bae8f546d7f15e067 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 11:39:16 +0100 Subject: [PATCH 05/12] Docs - operator macros, templates and filter-run template (#8035) --- .../tiddlers/system/filter-run-template.tid | 31 ++++---- .../tiddlers/system/operator-macros.tid | 78 +++++++++++-------- .../tiddlers/system/operator-template.tid | 30 +++---- 3 files changed, 77 insertions(+), 62 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/filter-run-template.tid b/editions/tw5.com/tiddlers/system/filter-run-template.tid index f812cdb96..73b4a2510 100644 --- a/editions/tw5.com/tiddlers/system/filter-run-template.tid +++ b/editions/tw5.com/tiddlers/system/filter-run-template.tid @@ -1,27 +1,28 @@ code-body: yes created: 20230316112235083 list-before: $:/core/ui/ViewTemplate/body -modified: 20230326145802667 +modified: 20240229161432000 tags: $:/tags/ViewTemplate title: $:/editions/tw5.com/filter-run-template type: text/vnd.tiddlywiki -\define .op-place() -<$macrocall $name=".if" - cond="""$(op-name)$""" - then="<<.place '$(op-name)$'>> = " - else=""/> -\end - -\define .op-row() -<$macrocall $name=".if" - cond="""$(op-body)$""" - then="""$(op-head)$<<.op-place>>$(op-body)$""" - else=""/> -\end - \whitespace trim +\procedure .op-place() +<% if [!is[blank]] %> + <$macrocall $name=".place" _=<> />= +<% endif %> +\end + +\procedure .op-row() +<% if [!is[blank]] %> + + <> + <<.op-place>><> + +<% endif %> +\end + <$list filter="[all[current]tag[Named Filter Run Prefix]]"> <$let op-head="" op-body="" op-name=""> diff --git a/editions/tw5.com/tiddlers/system/operator-macros.tid b/editions/tw5.com/tiddlers/system/operator-macros.tid index afa0593b1..2b19d56db 100644 --- a/editions/tw5.com/tiddlers/system/operator-macros.tid +++ b/editions/tw5.com/tiddlers/system/operator-macros.tid @@ -1,52 +1,66 @@ created: 20150117152607000 -modified: 20230617183916622 +modified: 20240229132501000 tags: $:/tags/Macro +code-body: yes title: $:/editions/tw5.com/operator-macros -\define .operator-examples(op,text:"Examples") <$link to="$op$ Operator (Examples)">$text$ + +\whitespace trim + +\procedure .operator-examples(op,text:"Examples") <$link to=`$(op)$ Operator (Examples)`><> \procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<>/> + \procedure .operator-example(n,eg,ie)
-<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix]" variable=".state"> -<$reveal state=<<.state>> type="nomatch" text="show"> - <$text text=<>/> - <$macrocall $name=".if" cond=<> then={{{[[
→ ]addsuffixaddsuffix[
]]}}}/> -
-
<$button actions=<<.operator-example-tryit-actions>>>Try it
-
- -<$reveal state=<<.state>> type="match" text="show"> - <$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/> -
-
- <$button set=<<.state>> setTo="">Hide - <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<>> - <$button actions=<<.operator-example-tryit-actions>>>Reset - -
-
-
-
    <$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)"> -
  • <$link><$view field="title"/>
  • -
-
- - + <$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix]" variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> + <$text text=<>/> + <% if [!is[blank]] %> +
→ <>
+ <% endif %> +
+
<$button actions=<<.operator-example-tryit-actions>>>Try it
+
+ + <$reveal state=<<.state>> type="match" text="show"> + <$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/> +
+
+ <$button set=<<.state>> setTo="">Hide + <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<>> + <$button actions=<<.operator-example-tryit-actions>>>Reset + +
+
+
+
    + <$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)"> +
  • <$link><$view field="title"/>
  • + +
+
+ + +
\end -\define .inline-operator-example(eg) -<$text text=<<__eg__>>/> evaluates to <$list filter=<<__eg__>> emptyMessage="(empty)"> <$text text=<>/> +\procedure .inline-operator-example(eg) + + <$text text=<>/> + +evaluates to +<$list filter=<> emptyMessage="(empty)"> + <$text text=<>/> + \end \define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]]. \define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler. \define .s-matching-is-case-sensitive() In looking for matches for <<.place S>>, capital and lowercase letters are treated as different. -\define .node-only-operator() +\procedure .node-only-operator() <$macrocall $name=".note" _="This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser."/> \end - -
<$view field="text"/>
\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/system/operator-template.tid b/editions/tw5.com/tiddlers/system/operator-template.tid index 88bee6a24..f4f3e08ef 100644 --- a/editions/tw5.com/tiddlers/system/operator-template.tid +++ b/editions/tw5.com/tiddlers/system/operator-template.tid @@ -1,26 +1,26 @@ created: 20150203173506000 +modified: 20240229155612000 list-before: $:/core/ui/ViewTemplate/body -modified: 20230602181119360 tags: $:/tags/ViewTemplate code-body: yes title: $:/editions/tw5.com/operator-template -\define .op-place() -<$macrocall $name=".if" - cond="""$(op-name)$""" - then="<<.place '$(op-name)$'>> = " - else=""/> -\end - -\define .op-row() -<$macrocall $name=".if" - cond="""$(op-body)$""" - then="""
""" - else=""/> -\end - \whitespace trim +\procedure .op-place() +<% if [!is[blank]] %> + <$macrocall $name=".place" _=<> />= +<% endif %> +\end + +\procedure .op-row() +<% if [!is[blank]] %> + + + +<% endif %> +\end + <$list filter="[all[current]tag[Filter Operators]]"> <$let op-head="" op-body="" op-name="">
$(op-head)$<<.op-place>>$(op-body)$
<><<.op-place>><>
From 24e474bd724f6f7fb80cec271d4c8a225a1a63f0 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sun, 10 Mar 2024 11:41:09 +0100 Subject: [PATCH 06/12] Doc-macros, styles and documentation overview tiddler (#8037) --- .../styleguide/Documentation Macros.tid | 291 ++++++++------- .../tw5.com/tiddlers/system/doc-macros.tid | 337 +++++++++--------- .../tw5.com/tiddlers/system/doc-styles.tid | 39 +- 3 files changed, 360 insertions(+), 307 deletions(-) diff --git a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid index ac5d4ea19..3c0a113e7 100644 --- a/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid +++ b/editions/tw5.com/tiddlers/styleguide/Documentation Macros.tid @@ -1,174 +1,199 @@ created: 20150110182600000 -modified: 20230325161424684 +modified: 20240224170607731 tags: [[Improving TiddlyWiki Documentation]] title: Documentation Macros type: text/vnd.tiddlywiki The following macros are used throughout ~TiddlyWiki's documentation. Their names start with a dot to keep them out of the way of names that a user might try experimenting with. -!General +! General -|!Macro |!Used for |!Example | -|.def |the defining instance of a term |<<.def widget>> | -|.em |minor emphasis within a sentence |<<.em not>> | -|.place |a placeholder for the user to fill in |<<.place tagname>> | -|.strong |major emphasis within a tiddler |<<.strong Important!>> | -|.word |a mention of an ordinary word or phrase |<<.word "hello world">> | -|.icon |an icon, sized to match the surrounding text |<<.icon "$:/core/images/globe">> | +|Macro |Used for |Example |Rendered|h +|.def |the defining instance of a term |`<<.def widget>>` |<<.def widget>> | +|.em |minor emphasis within a sentence |`<<.em not>>` |<<.em not>> | +|.place |a placeholder for the user to fill in |`<<.place tagname>>` |<<.place tagname>> | +|.strong |major emphasis within a tiddler |`<<.strong Important!>>` |<<.strong Important!>> | +|.word |a mention of an ordinary word or phrase |`<<.word "hello world">>` |<<.word "hello world">> | +|.icon |an icon, sized to match the surrounding text |`<<.icon "$:/core/images/globe">>` |<<.icon "$:/core/images/globe">> | -!Advice +! Textboxes -|!Macro |!Used for |!Example | -|^.tip |^hints and tips |<<.tip "Turn your screen on, otherwise
you won't be able to see much.">> | -|^.warning |^warning advice |<<.warning "Make a backup of your file
before you upgrade.">> | +!! Textbox Parameters -!Blocks -|!Macro |!Used for | -|.preamble |an introductory sentence that stands apart from the rest of the tiddler | +; text +: Text to be shown in the box -!Tiddlers and fields +; title +: A title shown as an HTML STRONG element -|!Macro |!Used for |!Example | -|.tid |a tiddler title |<<.tid Example>> | -|.tag |a tag |<<.tag Example>> | -|.field |a field name |<<.field example>> | -|.value |a field value |<<.value "example value">> | -|.op |a filter operator |<<.op backlinks>> | -|.var |a variable or macro name |<<.var currentTiddler>> | -|.wid |a widget name |<<.wid list>> | -|.attr |an attribute name |<<.attr filter>> | -|.param |a macro parameter name |<<.param text>> | -|.tiddler-fields |a list of tiddler fields |<<.tiddler-fields "Monday">> | +; icon +: Core icons can be found at [[Icon Gallery]] + +; class +: An optional custom class can be added to the text block. It will overwrite the defaults. To keep the defaults, ''add them'' to the custom class settings. +: ''.note''-macro defaults to `doc-note` +: ''.tip''-macro defaults to `doc-tip` +: ''.warning''-macro defaults to `doc-warning` + +!! Textbox Examples + +|Macro |Used for |Example |Renderd |h +|^.infoBox |^Text-box with an icon |`<<.infoBox text:"A generic ...">>` |<<.infoBox "A generic text box, with an optional title and a custom icon">> | +|^.note|^Infos with a title |`<<.note text:"Some text ...">>` |<<.note "Some text in a box with a title by default">> | +|^.tip |^hints and tips |`<<.tip text:"Eg: Turn ...">>` |<<.tip "Eg: Turn your screen on, otherwise
you won't be able to see much.">> | +|^.warning |^warning advice |`<<.warning text:"Eg: Make a backup ...">>` |<<.warning "Eg: Make a backup of your file
before you upgrade.">> | -!Links -|!Macro |!Used for |!Example | -|.link |a link containing WikiText |<<.link "^^an^^ ~~example~~" Example>> | -|.clink |a code link |<<.clink `<$list>` ListWidget>> | -|.dlink |a link on a defining instance of a term |<<.dlink widget Widgets>> | -|.dlink-ex |an external link on a defining instance of a term |<<.dlink-ex Example "http://example.com/">> | -|.flink |a link to a field |<<.flink ListField>> | -|.mlink |a link to a macro |<<.mlink qualify>> | -|.mlink2 |a link to a macro, with specified target |<<.mlink2 foo "Examples of Macros">> | -|.olink |a link to an operator |<<.olink prefix>> | -|.olink2 |a link to an operator, with specified target |<<.olink2 foo prefix>> | -|.vlink |a link to a variable |<<.vlink currentTiddler>> | -|.vlink2 |a link to a variable, with specified target |<<.vlink2 foo "Examples of Variables">> | -|.wlink |a link to a widget |<<.wlink ButtonWidget>> | -|.wlink2 |a link to a widget, with specified text |<<.wlink2 foo ButtonWidget>> | +! Blocks -!Tabs -|!Macro |!Used for |!Example | +|Macro |Example |Used for |h +|.preamble |`<<.preamble "your text comes here">>` |<<.preamble "an introductory sentence that stands apart from the rest of the tiddler">> | + +! Tiddlers and Fields + +|Macro |Used for |Example |Rendered |h +|.tid |a tiddler title |`<<.tid Example>>` |<<.tid Example>> | +|.tag |a tag |`<<.tag Example>>` |<<.tag Example>> | +|.field |a field name |`<<.field example>>` |<<.field example>> | +|.value |a field value |`<<.value "example value">>` |<<.value "example value">> | +|.op |a filter operator |`<<.op backlinks>>` |<<.op backlinks>> | +|.var |a variable or macro name |`<<.var currentTiddler>>` |<<.var currentTiddler>> | +|.wid |a widget name |`<<.wid list>>` |<<.wid list>> | +|.attr |an attribute name |`<<.attr filter>>` |<<.attr filter>> | +|.param |a macro parameter name |`<<.param text>>` |<<.param text>> | +|.tiddler-fields |a list of tiddler fields |`<<.tiddler-fields "Monday">>` |<<.tiddler-fields "Monday">> | + +! Links + +|!Macro |Used for |Example |Renderd |h +|.link |link containing WikiText |`<<.link "^^an^^ ~~example~~" Example>>` |<<.link "^^an^^ ~~example~~" Example>> | +|.clink |code link |``<<.clink `<$list>` ListWidget>>`` |<<.clink `<$list>` ListWidget>> | +|.dlink |definition link for a instance of a term |`<<.dlink widget Widgets>>` |<<.dlink widget Widgets>> | +|.dlink-ex |external link to a defining instance of a term |`<<.dlink-ex Example "http://example.com/">>` |<<.dlink-ex Example "http://example.com/">> | +|.flink |field link |`<<.flink ListField>>` |<<.flink ListField>> | +|.mlink |macro link |`<<.mlink qualify>>` |<<.mlink qualify>> | +|.mlink2 |macro link with a specified target |`<<.mlink2 foo "Examples of Macros">>` |<<.mlink2 foo "Examples of Macros">> | +|.olink |operator link |`<<.olink prefix>>` |<<.olink prefix>> | +|.olink2 |operator link with specified target |`<<.olink2 foo prefix>>` |<<.olink2 foo prefix>> | +|.vlink |variable link |`<<.vlink currentTiddler>>` |<<.vlink currentTiddler>> | +|.vlink2 |variable link with specified target |`<<.vlink2 foo "Examples of Variables">>` |<<.vlink2 foo "Examples of Variables">> | +|.wlink |widget link |`<<.wlink ButtonWidget>>` |<<.wlink ButtonWidget>> | +|.wlink2 |widget link with specified text |`<<.wlink2 foo ButtonWidget>>` |<<.wlink2 foo ButtonWidget>> | + +! Keyboard Shortcuts + +|Macro |Used for |Example |Rendered |h +|.key |a key on the keyboard |`<<.key Escape>>` |<<.key Escape>> | +|.keys |a key combination |`<<.keys Ctrl+Enter>>` |<<.keys Ctrl+Enter>> | + +! Doc-Tabs + +See: [[CheckboxWidget]] + +|Macro |Used for |Example |h |.doc-tabs |showing a tab set in a documentation tiddler | -- | |.doc-tab-link |button to activate a tab | -- | |.widget-attr-link |button with a widget attribute name to activate a tab | -- | +! Sidebar Tabs -!User interface +|Macro |Used for |Example |Rendered |h +|.sidebar-tab |the name of a sidebar tab |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> | +|.more-tab |the name of a subtab of the More tab |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> | +|.info-tab |the name of a tiddler info tab |`<<.info-tab Fields>>` |<<.info-tab Fields>> | +|.controlpanel-tab |the name of a Control Panel tab |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> | +|.advancedsearch-tab |the name of an Advanced Search tab |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> | +|.toc-tab |name of the tw5.com TOC tab |`<<.toc-tab>>` |<<.toc-tab>> | +|.example-tab |an example tab name |`<<.example-tab "Notes">>` |<<.example-tab "Notes">> | -|!Macro |!Used for |!Example | -|.key |a key on the keyboard |<<.key Escape>> | -|.keycombo |a key combination |<<.keycombo Ctrl Enter>> | +!! Parameters for .sidebar-tab -!Tabs +|Open |`<<.sidebar-tab Open>>` |<<.sidebar-tab Open>> | +|Recent |`<<.sidebar-tab Recent>>` |<<.sidebar-tab Recent>> | +|Tools |`<<.sidebar-tab Tools>>` |<<.sidebar-tab Tools>> | +|More |`<<.sidebar-tab More>>` |<<.sidebar-tab More>> | -|!Macro |!Used for |!Example | -|.sidebar-tab |the name of a sidebar tab |<<.sidebar-tab More>> | -|.more-tab |the name of a subtab of the More tab |<<.more-tab Shadows>> | -|.info-tab |the name of a tiddler info tab |<<.info-tab Fields>> | -|.controlpanel-tab |the name of a Control Panel tab |<<.controlpanel-tab Settings>> | -|.advancedsearch-tab |the name of an Advanced Search tab |<<.advancedsearch-tab Filter>> | -|.toc-tab |name of the tw5.com TOC tab |<<.toc-tab>> | -|.example-tab |an example tab name |<<.example-tab "Notes">> | +!! Parameters for .more-tab -!!Parameters for .sidebar-tab +|All |`<<.more-tab All>>` |<<.more-tab All>> | +|Recent |`<<.more-tab Recent>>` |<<.more-tab Recent>> | +|Tags |`<<.more-tab Tags>>` |<<.more-tab Tags>> | +|Missing |`<<.more-tab Missing>>` |<<.more-tab Missing>> | +|Drafts |`<<.more-tab Drafts>>` |<<.more-tab Drafts>> | +|Orphans |`<<.more-tab Orphans>>` |<<.more-tab Orphans>> | +|Types |`<<.more-tab Types>>` |<<.more-tab Types>> | +|System |`<<.more-tab System>>` |<<.more-tab System>> | +|Shadows |`<<.more-tab Shadows>>` |<<.more-tab Shadows>> | -|Open |<<.sidebar-tab Open>> | -|Recent |<<.sidebar-tab Recent>> | -|Tools |<<.sidebar-tab Tools>> | -|More |<<.sidebar-tab More>> | +!! Parameters for .info-tab -!!Parameters for .more-tab +|Tools |`<<.info-tab Tools>>` |<<.info-tab Tools>> | +|References |`<<.info-tab References>>` |<<.info-tab References>> | +|Tagging |`<<.info-tab Tagging>>` |<<.info-tab Tagging>> | +|List |`<<.info-tab List>>` |<<.info-tab List>> | +|Listed |`<<.info-tab Listed>>` |<<.info-tab Listed>> | +|Fields |`<<.info-tab Fields>>` |<<.info-tab Fields>> | +|Advanced |`<<.info-tab Advanced>>` |<<.info-tab Advanced>> | -|All |<<.more-tab All>> | -|Recent |<<.more-tab Recent>> | -|Tags |<<.more-tab Tags>> | -|Missing |<<.more-tab Missing>> | -|Drafts |<<.more-tab Drafts>> | -|Orphans |<<.more-tab Orphans>> | -|Types |<<.more-tab Types>> | -|System |<<.more-tab System>> | -|Shadows |<<.more-tab Shadows>> | +!! Parameters for .controlpanel-tab -!!Parameters for .info-tab +|Info |`<<.controlpanel-tab Info>>` |<<.controlpanel-tab Info>> | +|Appearance |`<<.controlpanel-tab Appearance>>` |<<.controlpanel-tab Appearance>> | +|Settings |`<<.controlpanel-tab Settings>>` |<<.controlpanel-tab Settings>> | +|Saving |`<<.controlpanel-tab Saving>>` |<<.controlpanel-tab Saving>> | +|Plugins |`<<.controlpanel-tab Plugins>>` |<<.controlpanel-tab Plugins>> | -|Tools |<<.info-tab Tools>> | -|References |<<.info-tab References>> | -|Tagging |<<.info-tab Tagging>> | -|List |<<.info-tab List>> | -|Listed |<<.info-tab Listed>> | -|Fields |<<.info-tab Fields>> | -|Advanced |<<.info-tab Advanced>> | +!! Parameters for .advancedsearch-tab -!!Parameters for .controlpanel-tab +|Standard |`<<.advancedsearch-tab Standard>>` |<<.advancedsearch-tab Standard>> | +|System |`<<.advancedsearch-tab System>>` |<<.advancedsearch-tab System>> | +|Shadows |`<<.advancedsearch-tab Shadows>>` |<<.advancedsearch-tab Shadows>> | +|Filter |`<<.advancedsearch-tab Filter>>` |<<.advancedsearch-tab Filter>> | -|Info |<<.controlpanel-tab Info>> | -|Appearance |<<.controlpanel-tab Appearance>> | -|Settings |<<.controlpanel-tab Settings>> | -|Saving |<<.controlpanel-tab Saving>> | -|Plugins |<<.controlpanel-tab Plugins>> | +! Buttons -!!Parameters for .advancedsearch-tab +|Macro |Used for |Example |Rendered |h +|.button |a standard button name and icon |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> | -|Standard |<<.advancedsearch-tab Standard>> | -|System |<<.advancedsearch-tab System>> | -|Shadows |<<.advancedsearch-tab Shadows>> | -|Filter |<<.advancedsearch-tab Filter>> | +!! Parameters for .button -!Buttons +!!! Tiddler toolbar -|!Macro |!Used for |!Example | -|.button |a standard button name and icon |<<.button "new-tiddler">> | +|clone |`<<.button "clone">>` |<<.button "clone">> | +|close |`<<.button "close">>` |<<.button "close">> | +|close-others |`<<.button "close-others">>` |<<.button "close-others">> | +|edit |`<<.button "edit">>` |<<.button "edit">> | +|export-tiddler |`<<.button "export-tiddler">>` |<<.button "export-tiddler">> | +|info |`<<.button "info">>` |<<.button "info">> | +|more-tiddler-actions |`<<.button "more-tiddler-actions">>` |<<.button "more-tiddler-actions">> | +|new-here |`<<.button "new-here">>` |<<.button "new-here">> | +|new-journal-here |`<<.button "new-journal-here">>` |<<.button "new-journal-here">> | +|permalink |`<<.button "permalink">>` |<<.button "permalink">> | -!!Parameters for .button +!!! Edit-mode toolbar -!!!Tiddler toolbar +|cancel |`<<.button "cancel">>` |<<.button "cancel">> | +|delete |`<<.button "delete">>` |<<.button "delete">> | +|save |`<<.button "save">>` |<<.button "save">> | -|clone |<<.button "clone">> | -|close |<<.button "close">> | -|close-others |<<.button "close-others">> | -|edit |<<.button "edit">> | -|export-tiddler |<<.button "export-tiddler">> | -|info |<<.button "info">> | -|more-tiddler-actions |<<.button "more-tiddler-actions">> | -|new-here |<<.button "new-here">> | -|new-journal-here |<<.button "new-journal-here">> | -|permalink |<<.button "permalink">> | +!!! Page toolbar -!!!Edit-mode toolbar - -|cancel |<<.button "cancel">> | -|delete |<<.button "delete">> | -|save |<<.button "save">> | - -!!!Page toolbar - -|advanced-search |<<.button "advanced-search">> | -|close-all |<<.button "close-all">> | -|control-panel |<<.button "control-panel">> | -|encryption |<<.button "encryption">> | -|export-page |<<.button "export-page">> | -|full-screen |<<.button "full-screen">> | -|home |<<.button "home">> | -|import |<<.button "import">> | -|language |<<.button "language">> | -|more-page-actions |<<.button "more-page-actions">> | -|new-journal |<<.button "new-journal">> | -|new-tiddler |<<.button "new-tiddler">> | -|permaview |<<.button "permaview">> | -|refresh |<<.button "refresh">> | -|save-wiki |<<.button "save-wiki">> | -|storyview |<<.button "storyview">> | -|tag-manager |<<.button "tag-manager">> | -|theme |<<.button "theme">> | +|advanced-search |`<<.button "advanced-search">>` |<<.button "advanced-search">> | +|close-all |`<<.button "close-all">>` |<<.button "close-all">> | +|control-panel |`<<.button "control-panel">>` |<<.button "control-panel">> | +|encryption |`<<.button "encryption">>` |<<.button "encryption">> | +|export-page |`<<.button "export-page">>` |<<.button "export-page">> | +|full-screen |`<<.button "full-screen">>` |<<.button "full-screen">> | +|home |`<<.button "home">>` |<<.button "home">> | +|import |`<<.button "import">>` |<<.button "import">> | +|language |`<<.button "language">>` |<<.button "language">> | +|more-page-actions |`<<.button "more-page-actions">>` |<<.button "more-page-actions">> | +|new-journal |`<<.button "new-journal">>` |<<.button "new-journal">> | +|new-tiddler |`<<.button "new-tiddler">>` |<<.button "new-tiddler">> | +|permaview |`<<.button "permaview">>` |<<.button "permaview">> | +|refresh |`<<.button "refresh">>` |<<.button "refresh">> | +|save-wiki |`<<.button "save-wiki">>` |<<.button "save-wiki">> | +|storyview |`<<.button "storyview">>` |<<.button "storyview">> | +|tag-manager |`<<.button "tag-manager">>` |<<.button "tag-manager">> | +|theme |`<<.button "theme">>` |<<.button "theme">> | diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/system/doc-macros.tid index e4a425f9a..5f83c75a8 100644 --- a/editions/tw5.com/tiddlers/system/doc-macros.tid +++ b/editions/tw5.com/tiddlers/system/doc-macros.tid @@ -1,81 +1,100 @@ created: 20150117152607000 -modified: 20230325141733992 +modified: 20240229155550000 tags: $:/tags/Macro title: $:/editions/tw5.com/doc-macros +code-body: yes type: text/vnd.tiddlywiki -\define .concat(1,2,3,4,5) $1$$2$$3$$4$$5$ +\whitespace trim -\define .def(_) $_$ -\define .em(_) $_$ -\define .strong(_) $_$ -\define .place(_) $_$ -\define .word(_) "$_$" +\function .concat(1,2,3,4,5) [[$(1)$$(2)$$(3)$$(4)$$(5)$]substitute[]] +\function .word(_) [["]] [<_>] =[["]] +[join[]] -\define .preamble(_) :.doc-preamble $_$ -\define .note(_) -@@.doc-note -;Note -: $_$ -@@ +\procedure .def(_) <<_>> +\procedure .em(_) <<_>> +\procedure .strong(_) <<_>> +\procedure .place(_) <<_>> +\procedure .preamble(_)
<<_>>
+ +\procedure .tid(_) <<_>> +\procedure .tag(_) <<_>> +\procedure .field(_) <<_>> +\procedure .value(_) <<_>> +\procedure .op(_) <<_>> +\procedure .var(_) <<_>> +\procedure .wid(_) <$macrocall $name=".concat" 1="$" 2=<<_>>/> +\procedure .attr(_) <<_>> +\procedure .param(_) <<_>> + +\procedure .tiddler-fields(tiddler) +<$tiddler tiddler=<>> +
+

+ <$link> + {{||$:/core/ui/TiddlerIcon}}<$text text=<>/> + +

+
+ + <$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> + +
+
+ \end -\define .tid(_) $_$ -\define .tag(_) $_$ -\define .field(_) $_$ -\define .value(_) $_$ -\define .op(_) $_$ -\define .var(_) $_$ -\define .wid(_) $$_$ -\define .attr(_) $_$ -\define .param(_) $_$ +\function .mtitle(_) [<_>] Macro +[join[ ]] +\function .otitle(_) [<_>] Operator +[join[ ]] +\function .vtitle(_) [<_>] Variable +[join[ ]] -\define .mtitle(_) $_$ Macro -\define .otitle(_) $_$ Operator -\define .vtitle(_) $_$ Variable +\procedure .link(_,to) <$link to=<> ><<_>> +\procedure .clink(_,to) <$link to=<>><<_>> -\define .link(_,to) <$link to="$to$">$_$ -\define .clink(_,to) <<.link """$_$""" "$to$">> -\define .dlink(_,to) <$macrocall $name=".link" _=<<.def "$_$">> to="$to$">/> -\define .dlink-ex(_,to) <<.def "$_$">> -\define .flink(to) <$macrocall $name=".link" _=<<.field {{$to$!!caption}}>> to="$to$"/> -\define .mlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.mtitle "$_$">>/> -\define .mlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/> -\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/> -\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/> -\define .vlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.vtitle "$_$">>/> -\define .vlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/> -\define .wlink(to) <$macrocall $name=".link" _=<<.wid {{$to$!!caption}}>> to="$to$"/> -\define .wlink2(_,to) <$macrocall $name=".link" _="$_$" to="$to$"/> +\procedure .dlink(_,to) <$link to=<>><$macrocall $name=".def" _=<<_>>/> -\define .key(_) $_$ -\define .combokey(_) <$macrocall $name=".if" cond="$_$" then=<<.key '$_$'>>/> -\define .keycombo(1,2,3,4) <<.combokey "$1$">><<.if "$2$" +>><<.combokey "$2$">><<.if "$3$" +>><<.combokey "$3$">><<.if "$4$" +>><<.combokey "$4$">> +\procedure .dlink-ex(_,to) > class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$macrocall $name=".def" _=<<_>>/> +\procedure .flink(to) <$macrocall $name=".link" _=`<<.field {{$(to)$!!caption}}>>` to=<>/> -\define .tab(_) {{$_$!!caption}} -\define .sidebar-tab(_) <<.tab "$:/core/ui/SideBar/$_$">> -\define .more-tab(_) <<.tab "$:/core/ui/MoreSideBar/$_$">> -\define .info-tab(_) <<.tab "$:/core/ui/TiddlerInfo/$_$">> -\define .controlpanel-tab(_) <<.tab "$:/core/ui/ControlPanel/$_$">> -\define .advancedsearch-tab(_) <<.tab "$:/core/ui/AdvancedSearch/$_$">> -\define .toc-tab() <<.tab "TableOfContents">> -\define .example-tab(_) $_$ +\procedure .mlink(_) <$link to={{{ [.mtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> +\procedure .mlink2(_,to) <$link to=<>><$macrocall $name=".var" _=<<_>>/> -\define .doc-tabs() +\procedure .olink(_) <$link to={{{ [.otitle<_>] }}}><$macrocall $name=".op" _=<<_>>/> +\procedure .olink2(_,to) <$link to={{{ [.otitle] }}}><$macrocall $name=".op" _=<<_>>/> + +\procedure .vlink(_) <$link to={{{ [.vtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> +\procedure .vlink2(_,to) <$link to=<>><$macrocall $name=".var" _=<<_>>/> + +\procedure .wlink(to) <$link to=<> > <$macrocall $name=".wid" _={{{ [get[caption]] }}}> +\procedure .wlink2(_,to) <$link to=<> ><<_>> + +\procedure .key(_) <<_>> +\procedure .keys(_) <<_>> + +\procedure .tab(_) <$transclude $tiddler=<<_>> $field=caption ><<_>> +\procedure .sidebar-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/SideBar/$(_)$`/> +\procedure .more-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/MoreSideBar/$(_)$`/> +\procedure .info-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/TiddlerInfo/$(_)$`/> +\procedure .controlpanel-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/ControlPanel/$(_)$`/> +\procedure .advancedsearch-tab(_) <$macrocall $name=".tab" _=`$:/core/ui/AdvancedSearch/$(_)$`/> +\procedure .toc-tab() <$macrocall $name=".tab" _="TableOfContents"/> +\procedure .example-tab(_) <<_>> + +\procedure .doc-tabs() <$macrocall $name="tabs" - tabsList="[tagdescription[tab]]" - default={{{ [tagfirst[]] }}} - explicitState={{{ [addprefix[$:/state/tab/]] }}} - class={{{ [[doc-tabs]] [encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} /> + tabsList="[tagdescription[tab]]" + default={{{ [tagfirst[]] }}} + explicitState={{{ [addprefix[$:/state/tab/]] }}} + class={{{ [[doc-tabs]] [encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} /> \end -\define .doc-tab-link(text, target, tooltip:"", class:"") + +\procedure .doc-tab-link(text, target, tooltip:"", class:"") <$tiddler tiddler={{{ [search:text[.doc-tabs]] :else[tags[]search:text[.doc-tabs]first[]] :else[] }}} > -<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<__class__>] +[join[ ]] }}} - set={{{ [addprefix[$:/state/tab/]] }}} - setTo=<<__target__>> - tooltip=<<__tooltip__>>> - <<__text__>> +<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [] +[join[ ]] }}} + set={{{ [addprefix[$:/state/tab/]] }}} + setTo=<> + tooltip=<>> + <> <$list filter="[[$:/StoryList]contains]" variable="ignore" emptyMessage="<$action-navigate />"> <$action-sendmessage $message="tm-scroll" selector={{{ [encodeuricomponent[]addprefix[.doc-tabs-]] }}} /> @@ -84,136 +103,128 @@ type: text/vnd.tiddlywiki \end -\define .widget-attr-link(text, target) + +\procedure .widget-attr-link(text, target) <$macrocall $name=".doc-tab-link" - text={{{ [[]] [<__text__>] [[]] +[join[]] }}} - class="doc-tab-link" - target=<<__target__>> - tooltip={{{ [[Show more information about the ']] [<__text__>] [[' attribute]] +[join[]] }}} /> + text={{{ [[]] [] [[]] +[join[]] }}} + class="doc-tab-link" + target=<> + tooltip={{{ [[Show more information about the ']] [] [[' attribute]] +[join[]] }}} /> \end -\define .button(_) {{$:/core/ui/Buttons/$_$!!caption}} +\procedure .button(_) <$transclude $tiddler=`$:/core/ui/Buttons/$(_)$` $field="caption" ><<_>> -\define .icon(_) {{$_$}} +\procedure .icon(_) <$transclude $tiddler=<<_>>/> -\define .tip(_)
{{$:/core/images/tip}}
$_$
-\define .warning(_)
{{$:/core/images/warning}}
$_$
+\procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem") +\function _f.tipClass() [[doc-icon-block]] [!is[blank]then] +[join[ ]] +
>> + <%if [!is[blank]] %><div>''<<title>>''</div><% endif %> + <div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div> + <<text>> +</div> +\end -\define .state-prefix() $:/state/editions/tw5.com/ +\procedure .note(_:"", title:"Note", icon:"$:/core/images/info-button", class:"doc-note", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end -\define .lorem() +\procedure .tip(_:"", title:"Tip" , icon:"$:/core/images/tip", class:"doc-tip", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end + +\procedure .warning(_:"", title:"Warning", icon:"$:/core/images/warning", class:"doc-warning", iconSize:"22pt") +<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/> +\end + +\procedure .state-prefix() $:/state/editions/tw5.com/ + +\procedure .lorem() Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \end -\define .toc-lorem() +\procedure .toc-lorem() This is an example tiddler. See [[Table-of-Contents Macros (Examples)]]. <<.lorem>> \end -\define .example(n,eg,egvar:NO-SUCH-VAR) +\procedure .example(n,eg,egvar) +<$let eg={{{ [<egvar>!is[blank]getvariable[]] :else[<eg>] }}}> <div class="doc-example"> -<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - <$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/> - <$codeblock code="""$eg$"""/> -</$reveal> -<$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - <!-- allow an example to contain """ --> - <$macrocall $name="copy-to-clipboard-above-right" src=<<$egvar$>>/> - <$codeblock code=<<$egvar$>>/> -</$reveal> -<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> -<$reveal state=<<.state>> type="nomatch" text="show"> - <dl> - <dd><$button set=<<.state>> setTo="show">Try it</$button></dd> - </dl> -</$reveal> -<$reveal state=<<.state>> type="match" text="show"> - <dl> - <dd><$button set=<<.state>> setTo="">Hide</$button></dd> - </dl> - <blockquote class="doc-example-result"> - <$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - -$$$text/vnd.tiddlywiki -$eg$ -$$$ - - </$reveal> - <$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - <<$egvar$>> - </$reveal> - </blockquote> -</$reveal> -</$list> + <$macrocall $name="copy-to-clipboard-above-right" src=<<eg>>/> + <$codeblock code=<<eg>>/> + <$list filter=`[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$(n)$]]` variable=".state"> + <$reveal state=<<.state>> type="nomatch" text="show"> + <dl> + <dd><$button set=<<.state>> setTo="show">Try it</$button></dd> + </dl> + </$reveal> + <$reveal state=<<.state>> type="match" text="show"> + <dl> + <dd><$button set=<<.state>> setTo="">Hide</$button></dd> + </dl> + <blockquote class="doc-example-result"> + <<eg>> + </blockquote> + </$reveal> + </$list> +</div> +</$let> \end -\define .bad-example(eg) +\procedure .bad-example(eg) <table class="doc-bad-example"> -<tbody> -<tr class="evenRow"> -<td><span style="font-size:1.5em;">⚠</span> Warning:<br> Don't do it this way!</td> -<td> - -$eg$ -</td> -</tr> -</tbody> + <tbody> + <tr class="evenRow"> + <td> + <span class="tc-small-gap-right" style="font-size:1.5em;">⚠</span> + Warning:<br> Don't do it this way! + </td> + <td> + <$transclude $variable="eg" $mode="block"/> + </td> + </tr> + </tbody> </table> \end -\define .link-badge(text,link,colour) -<a href=<<__link__>> class="doc-link-badge" style="background-color:$colour$;" target="_blank" rel="noopener noreferrer"><$text text=<<__text__>>/></a> +\procedure .link-badge(text,link,colour) +<a href=<<link>> class="doc-link-badge" style.background-color=<<colour>> target="_blank" rel="noopener noreferrer"> + <$text text=<<text>>/> +</a> \end +<!-- TODO use $:/palette colour settings --> +\procedure .link-badge-added(link,colour:#ffe246) <$macrocall $name=".link-badge" text="added" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-addendum(link,colour:#fcc84a) <$macrocall $name=".link-badge" text="addendum" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-extended(link,colour:#f9a344) <$macrocall $name=".link-badge" text="extended" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-fixed(link,colour:#ffa86d) <$macrocall $name=".link-badge" text="fixed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-here(link,colour:#d88e63) <$macrocall $name=".link-badge" text="here" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-hide(link,colour:#9d959f) <$macrocall $name=".link-badge" text="hide" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-improved(link,colour:#7593c7) <$macrocall $name=".link-badge" text="improved" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-modified(link,colour:#7f99c9) <$macrocall $name=".link-badge" text="modified" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-removed(link,colour:#a9aabc) <$macrocall $name=".link-badge" text="removed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-renamed(link,colour:#b4b995) <$macrocall $name=".link-badge" text="renamed" link=<<link>> colour=<<colour>>/> +\procedure .link-badge-updated(link,colour:#91ba66) <$macrocall $name=".link-badge" text="updated" link=<<link>> colour=<<colour>>/> -\define .link-badge-added(link,colour:#ffe246) <<.link-badge "added" """$link$""" """$colour$""">> -\define .link-badge-addendum(link,colour:#fcc84a) <<.link-badge "addendum" """$link$""" """$colour$""">> -\define .link-badge-extended(link,colour:#f9a344) <<.link-badge "extended" """$link$""" """$colour$""">> -\define .link-badge-fixed(link,colour:#ffa86d) <<.link-badge "fixed" """$link$""" """$colour$""">> -\define .link-badge-here(link,colour:#d88e63) <<.link-badge "here" """$link$""" """$colour$""">> -\define .link-badge-hide(link,colour:#9d959f) <<.link-badge "hide" """$link$""" """$colour$""">> -\define .link-badge-improved(link,colour:#7593c7) <<.link-badge "improved" """$link$""" """$colour$""">> -\define .link-badge-modified(link,colour:#7f99c9) <<.link-badge "modified" """$link$""" """$colour$""">> -\define .link-badge-removed(link,colour:#a9aabc) <<.link-badge "removed" """$link$""" """$colour$""">> -\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">> -\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">> - -\define .tiddler-fields(tiddler) -<$tiddler tiddler=<<__tiddler__>>> -<div class="doc-tiddler-fields"> -<h2> -<$link> -<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/> -</$link> -</h2> -<table class="tc-view-field-table"> -<tbody> -<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/> -</tbody> -</table> -</div> -</$tiddler> +\procedure .banner-credits(credit,url) +<img src=<<url>> width="140" style="float:left;margin-right:0.5em;"/> +<<credit>> +<div style="clear:both;"/> \end -\define .banner-credits(credit,url) -<img src=<<__url__>> width="140" style="float:left;margin-right:0.5em;"/> - -$credit$ - -<div style="clear:both;"> - -</div> -\end - -\define .contributors(usernames) +\procedure .contributors(usernames) <ol class="doc-github-contributors"> -<$list filter="[enlist<__usernames__>sort[]]" variable="username"> -<li> -<a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/><span class="doc-github-contributor-username">@<$text text=<<username>>/></span></a> -</li> -</$list> + <$list filter="[enlist<usernames>sort[]]" variable="username"> + <li> + <a href={{{ [[https://github.com/]addsuffix<username>] }}} class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"> + <img src={{{ [[https://github.com/]addsuffix<username>addsuffix[.png?size=64]] }}} width="64" height="64"/> + <span class="doc-github-contributor-username"> + @<$text text=<<username>>/> + </span> + </a> + </li> + </$list> </ol> \end - -<pre><$view field="text"/></pre> diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/system/doc-styles.tid index 0e7bb977c..31fe9249e 100644 --- a/editions/tw5.com/tiddlers/system/doc-styles.tid +++ b/editions/tw5.com/tiddlers/system/doc-styles.tid @@ -31,6 +31,7 @@ type: text/vnd.tiddlywiki color: <<color very-muted-foreground>>; font-style: normal; font-weight: bold; + padding: 0; } .doc-button, @@ -85,7 +86,6 @@ td svg { .doc-preamble { border: 2px solid <<colour code-border>>; color: <<colour very-muted-foreground>>; - font-size: 90%; margin-left: 0; padding: 0.5em 0.7em; } @@ -112,7 +112,7 @@ td svg { } .doc-example input[type=search] { - width: 95%; + width: 95%; } .doc-example pre:first-child { margin-top: 0; @@ -138,7 +138,7 @@ td svg { } .doc-bad-example code, .doc-bad-example pre, table.doc-bad-example { - background-color:#ffff80; + background-color:#ffff80; } .doc-table th, .doc-table tr { @@ -164,19 +164,37 @@ tr.doc-table-subheading { } .doc-icon-block { - border-left: 2px solid <<colour code-border>>; - margin-left: 3em; + border-left: 4px solid <<colour blockquote-bar>>; + margin: 15px 0 15px 3em; padding-left: 0.6em; position: relative; } + .doc-block-icon { position: absolute; left: -3em; top: 0.2em; } + +.doc-icon-block.doc-note { + border-left: 4px solid <<colour blockquote-bar>>; + background: <<colour blockquote-bar>>11; +} + +.doc-icon-block.doc-tip { + border-left: 4px solid <<colour primary>>; + background: <<colour primary>>11; +} + +.doc-icon-block.doc-warning { + border-left: 4px solid <<colour alert-highlight>>; + background: <<colour alert-highlight>>11; +} + .doc-block-icon .tc-image-tip { fill: <<colour primary>>; } + .doc-block-icon .tc-image-warning { fill: <<colour alert-highlight>>; } @@ -246,7 +264,6 @@ a.doc-deprecated-version.tc-tiddlylink { height: 1em; } - .doc-tiddler-fields table, .doc-tiddler-fields h2 { margin: 0.5em 0; @@ -299,13 +316,13 @@ ol.doc-github-contributors li { color: #666; } .doc-tabs.tc-tab-buttons button { - font-size: 1rem; - padding: 0.5em; + font-size: 1rem; + padding: 0.5em; } .doc-tabs button .doc-attr { - background-color: unset; - color: #666; + background-color: unset; + color: #666; } .doc-tab-link .doc-attr { - color: unset; + color: unset; } From c2b436371bd235eb77fd038e0955d405e02218c4 Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 12:08:00 +0100 Subject: [PATCH 07/12] Docs: tiddler-info-source - change sources tab to new syntax and add link to pr-creator (#8029) * tiddler-info-source - change sources tab to new syntax and add link to pr-creator * remove class from plain text elements as requested --- editions/tw5.com/tiddlers/system/Sources.tid | 38 ++++++++++++-------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/Sources.tid b/editions/tw5.com/tiddlers/system/Sources.tid index c251f7a4f..d28d9fc05 100644 --- a/editions/tw5.com/tiddlers/system/Sources.tid +++ b/editions/tw5.com/tiddlers/system/Sources.tid @@ -1,26 +1,36 @@ title: $:/editions/tw5.com/TiddlerInfo/Sources tags: $:/tags/TiddlerInfo caption: Sources +code-body: yes -\define static-link-base() -https://tiddlywiki.com/static/$(title)$.html +\function static-link-base() [[https://tiddlywiki.com/static/$(title)$.html]substitute[]] + +\function github-link-base() +[[https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$]substitute[]] \end -\define make-static-link() +\procedure make-static-link() +\whitespace trim <$set name="title" filter="[<currentTiddler>encodeuricomponent[]encodeuricomponent[]]" select="0"> -<a href=<<static-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<static-link-base>>/></a> + <a href=<<static-link-base>> + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" + > + <$text text=<<static-link-base>>/> + </a> </$set> \end -\define github-link-base() -https://github.com/Jermolene/TiddlyWiki5/blob/tiddlywiki-com/editions/tw5.com/tiddlers/$(title)$ -\end - -\define make-github-link() -<$set name="title" value={{$:/config/OriginalTiddlerPaths##$(currentTiddler)$}}> -<$set name="title" filter="[<title>encodeuricomponent[]]" select="0"> -<a href=<<github-link-base>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$text text=<<github-link-base>>/></a> -</$set> +\procedure make-github-link() +<$set name="title" value={{{ [[$:/config/OriginalTiddlerPaths]getindex<currentTiddler>] }}}> + <$set name="title" filter="[<title>encodeuricomponent[]]" select="0"> + <a href=<<github-link-base>> + class="tc-tiddlylink-external" + target="_blank" + rel="noopener noreferrer" + >Direct link to <$text text=<<currentTiddler>>/> on github.com</a> + </$set> </$set> \end @@ -30,7 +40,7 @@ A static HTML representation of this tiddler is available at the URL: * <<make-static-link>> -Help us to improve the documentation by sending a ~GitHub pull request for this tiddler: +Help us to improve the documentation by suggesting changes to this tiddler using the [[TiddlyWiki Docs PR Maker|https://saqimtiaz.github.io/tw5-docs-pr-maker/]] * <<make-github-link>> From 8d36ecd6bcbc24abcdc4b6681cd0afa9d65748a3 Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 15:30:21 +0100 Subject: [PATCH 08/12] Add list-links to $:/deprecated tag (#8053) --- editions/tw5.com/tiddlers/system/Deprecated.tid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/system/Deprecated.tid b/editions/tw5.com/tiddlers/system/Deprecated.tid index 9d85bd185..d363f07ed 100644 --- a/editions/tw5.com/tiddlers/system/Deprecated.tid +++ b/editions/tw5.com/tiddlers/system/Deprecated.tid @@ -1,8 +1,12 @@ created: 20170126143833588 -modified: 20220704174221300 +modified: 20240310123352998 title: $:/deprecated type: text/vnd.tiddlywiki Deprecated features of TiddlyWiki are those that have been superseded by newer, improved ways of doing the same thing. Deprecated features will still work, but are not recommended for new content. + +Tiddlers tagged $:/deprecated: + +<<list-links filter:"[tag[$:/deprecated]]">> \ No newline at end of file From 0b7914785cf50406a6b0761afe07eaa469579d40 Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 16:05:26 +0100 Subject: [PATCH 09/12] Minor adjustments to existing doc tiddlers without changing modified date (#8057) --- ...enating text and variables using macro substitution.tid | 6 ++++++ editions/tw5.com/tiddlers/variables/Variables.tid | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid b/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid index 77090609a..933e1e80e 100644 --- a/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid +++ b/editions/tw5.com/tiddlers/howtos/Concatenating text and variables using macro substitution.tid @@ -4,10 +4,16 @@ tags: Learning title: Concatenating text and variables using macro substitution type: text/vnd.tiddlywiki +!! Important + <<.from-version "5.3.0">> It is recommended to use [[substituted attributes|Substituted Attribute Values]] or the [[substitute filter operator|substitute Operator]] to concatenate text and variables. It's a frequent use case in ~TiddlyWiki that you will want to put the results of variables together with various bits of strings of text. This process in some programming languages is often referred to as "concatenating" text. +--- + +!! What is Wrong + You might, for instance want to set up a template for your customer database, where links will automatically refer to additional contact information about your customer. Inside your tiddler, you might try something like this: <<.bad-example "`[[Additional Info|<<currentTiddler>>-Contact]]`">> diff --git a/editions/tw5.com/tiddlers/variables/Variables.tid b/editions/tw5.com/tiddlers/variables/Variables.tid index 65ad96b31..116f3c9a0 100644 --- a/editions/tw5.com/tiddlers/variables/Variables.tid +++ b/editions/tw5.com/tiddlers/variables/Variables.tid @@ -6,11 +6,12 @@ type: text/vnd.tiddlywiki !! Introduction -A <<.def variable>> is a snippet of text that can be accessed by name. The text is referred to as the variable's <<.def value>>. +* A <<.def variable>> is a ''snippet of text'' that can be accessed by name. +* The text is referred to as the variable's <<.def value>>. -Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink SetWidget>>, <<.wlink LetWidget>> and <<.wlink ListWidget>> widgets. +Variables are defined by [[widgets|Widgets]]. Several core widgets define variables, the most common being the <<.wlink LetWidget>>, <<.wlink SetWidget>> and <<.wlink ListWidget>> widgets. -The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable "currentTiddler" is set to the title of the tiddler. +The values of variables are available to descendant widgets, including transcluded content. For example, within each tiddler in the main story river the variable <<.var currentTiddler>> is set to the title of the tiddler. Variables can also be overwritten by descendent widgets defining variables of the same name, thus binding a different snippet to that name for the scope of the children of the widget. From b28f42043020aac7b51fe16dba0dc43244a159c0 Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 16:06:04 +0100 Subject: [PATCH 10/12] Some more tv-macros changed to new syntax. Plus adjusted doc tiddlers (#8056) --- .../macros/import/tags-of-current-tiddler.tid | 3 ++- .../macros/import/tv-get-export-image-link.tid | 5 +++-- .../tiddlers/macros/import/tv-wikilink-tooltip.tid | 3 ++- .../variables/examples/tv-get-export-image-link.tid | 8 +++++++- .../tiddlers/variables/tv-get-export-image-link.tid | 12 ++++++------ 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid b/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid index 860ad33db..da7214b0c 100644 --- a/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid +++ b/editions/tw5.com/tiddlers/macros/import/tags-of-current-tiddler.tid @@ -1,6 +1,7 @@ code-body: yes created: 20150221145803000 +modified: 20240310124126491 title: $:/editions/tw5.com/macro-examples/tags-of-current-tiddler type: text/vnd.tiddlywiki -\define tags-of-current-tiddler() {{!!tags}} +\procedure tags-of-current-tiddler() {{!!tags}} diff --git a/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid index 56a3b9dd7..ebf879fa9 100644 --- a/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/macros/import/tv-get-export-image-link.tid @@ -1,6 +1,7 @@ +code-body: yes created: 20150228123855000 -modified: 20150228123921000 +modified: 20240310133309881 title: $:/editions/tw5.com/macro-examples/tv-get-export-image-link type: text/vnd.tiddlywiki -\define tv-get-export-image-link(src) https://www.tiddlywiki.com/$src$ +\function tv-get-export-image-link(src) [[https://www.tiddlywiki.com/$(src)$]substitute[]] diff --git a/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid b/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid index 9687f4b15..e4884c95d 100644 --- a/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid +++ b/editions/tw5.com/tiddlers/macros/import/tv-wikilink-tooltip.tid @@ -1,8 +1,9 @@ code-body: yes created: 20150228120252000 +modified: 20240310124217005 title: $:/editions/tw5.com/macro-examples/tv-wikilink-tooltip type: text/vnd.tiddlywiki -\define tv-wikilink-tooltip() +\procedure tv-wikilink-tooltip() <$transclude field="tooltip">(<$transclude field="caption"/>)</$transclude> \end diff --git a/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid index 36e151b44..2cafd8f08 100644 --- a/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/variables/examples/tv-get-export-image-link.tid @@ -1,11 +1,17 @@ created: 20150228124038000 +modified: 20240310134432122 tags: [[tv-get-export-image-link Variable]] [[Variable Examples]] title: tv-get-export-image-link Variable (Examples) type: text/vnd.tiddlywiki -This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]]: +This example fetches [[the TiddlyWiki icon|https://www.tiddlywiki.com/favicon.ico]] <$importvariables filter="$:/editions/tw5.com/macro-examples/tv-get-export-image-link"> <$codeblock code={{$:/editions/tw5.com/macro-examples/tv-get-export-image-link}}/> <$macrocall $name=".example" n="1" eg="""[img[favicon.ico]]"""/> </$importvariables> + +Also see: + +* [[substitute Operator]] +* [[Substituted Attribute Values]] diff --git a/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid b/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid index 84837b907..cb7f38e47 100644 --- a/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid +++ b/editions/tw5.com/tiddlers/variables/tv-get-export-image-link.tid @@ -1,13 +1,13 @@ -created: 20150228122257000 -modified: 20150228130940000 -title: tv-get-export-image-link Variable -tags: Variables [[Core Variables]] [[Configuration Variables]] -type: text/vnd.tiddlywiki caption: tv-get-export-image-link +created: 20150228122257000 +modified: 20240310133708578 +tags: Variables [[Core Variables]] [[Configuration Variables]] +title: tv-get-export-image-link Variable +type: text/vnd.tiddlywiki The <<.def tv-get-export-image-link>> [[variable|Variables]] controls the value of the `src` attribute on the HTML `img` element generated by the <<.wlink ImageWidget>> widget when the value of its `source` attribute is not the title of a tiddler. -The variable should be a [[macro|Macros]] with the following parameter: +The variable should be a [[function|Functions]] with the following parameter: ;src : The value of the `source` attribute -- equivalent to the image name specified in <$link to="Images in WikiText">the shorthand syntax</$link> `[img[source]]` From 0f395ce81df41cbf4c9dbc5c1c6283a99d1fdbf7 Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 16:07:28 +0100 Subject: [PATCH 11/12] Add code-body field to doc-styles tiddler (#8054) --- editions/tw5.com/tiddlers/system/doc-styles.tid | 1 + 1 file changed, 1 insertion(+) diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/system/doc-styles.tid index 31fe9249e..2bd2f9ed3 100644 --- a/editions/tw5.com/tiddlers/system/doc-styles.tid +++ b/editions/tw5.com/tiddlers/system/doc-styles.tid @@ -1,3 +1,4 @@ +code-body: yes created: 20150117152612000 modified: 20240223123123497 tags: $:/tags/Stylesheet From 78a09fcf562e19caf5ebbcd2fba938c36b55869b Mon Sep 17 00:00:00 2001 From: Mario Pietsch <pmariojo@gmail.com> Date: Sun, 10 Mar 2024 16:07:56 +0100 Subject: [PATCH 12/12] Docs - download empty button new syntax - v5.3.x (#8034) * docs - download empty button new syntax - want to keep stuff like this for the time beeing * use \procedure instead of \define for consistency --- editions/tw5.com/tiddlers/system/download-empty.tid | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editions/tw5.com/tiddlers/system/download-empty.tid b/editions/tw5.com/tiddlers/system/download-empty.tid index 055fa2022..f49b9b794 100644 --- a/editions/tw5.com/tiddlers/system/download-empty.tid +++ b/editions/tw5.com/tiddlers/system/download-empty.tid @@ -1,10 +1,10 @@ title: $:/editions/tw5.com/download-empty code-body: yes -\define saveTiddlerFilter() +\procedure saveTiddlerFilter() [[$:/core]] [[$:/isEncrypted]] [[$:/themes/tiddlywiki/snowwhite]] [[$:/themes/tiddlywiki/vanilla]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \end -\define savingEmpty() -yes -\end + +\procedure savingEmpty() yes + {{$:/core/templates/tiddlywiki5.html}}