From 59548f066a48b0440e7cf6364a1907ab5555c979 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Thu, 5 Dec 2024 13:05:17 +0100 Subject: [PATCH] [DOCS] Update dev edition to use shared utilities (#8803) * prepare dev-edition to use _tw_shared doc utilities * prepare for future dev-edition "private" styles * move tw5.com documentation utility files to _tw_shared directory --- editions/dev/tiddlers/system/doc-macros.tid | 114 ------------------ editions/dev/tiddlers/system/doc-styles.tid | 40 ------ .../tiddlers/system/tw5.com-dev-styles.tid | 2 + .../dev/tiddlers/system/version-macros.tid | 14 --- .../doc-utilities}/doc-macros.tid | 0 .../doc-utilities}/doc-styles.tid | 0 .../doc-utilities}/version-macros.tid | 0 .../doc-utilities}/wikitext-macros.tid | 0 8 files changed, 2 insertions(+), 168 deletions(-) delete mode 100644 editions/dev/tiddlers/system/doc-macros.tid delete mode 100644 editions/dev/tiddlers/system/doc-styles.tid delete mode 100644 editions/dev/tiddlers/system/version-macros.tid rename editions/tw5.com/tiddlers/{system => _tw_shared/doc-utilities}/doc-macros.tid (100%) rename editions/tw5.com/tiddlers/{system => _tw_shared/doc-utilities}/doc-styles.tid (100%) rename editions/tw5.com/tiddlers/{system => _tw_shared/doc-utilities}/version-macros.tid (100%) rename editions/tw5.com/tiddlers/{system => _tw_shared/doc-utilities}/wikitext-macros.tid (100%) diff --git a/editions/dev/tiddlers/system/doc-macros.tid b/editions/dev/tiddlers/system/doc-macros.tid deleted file mode 100644 index dc30efd1e..000000000 --- a/editions/dev/tiddlers/system/doc-macros.tid +++ /dev/null @@ -1,114 +0,0 @@ -created: 20150117152607000 -modified: 201804111739 -tags: $:/tags/Macro -title: $:/editions/dev/doc-macros -type: text/vnd.tiddlywiki - -\define .concat(1,2,3,4,5) $1$$2$$3$$4$$5$ - -\define .def(_) $_$ -\define .em(_) $_$ -\define .strong(_) $_$ -\define .place(_) $_$ -\define .word(_) "$_$" - -\define .preamble(_) :.doc-preamble $_$ -\define .note(_) -@@.doc-note -;Note -: $_$ -@@ -\end - -\define .tid(_) $_$ -\define .tag(_) $_$ -\define .field(_) $_$ -\define .value(_) $_$ -\define .op(_) $_$ -\define .var(_) $_$ -\define .wid(_) $$_$ -\define .attr(_) $_$ -\define .param(_) $_$ - -\define .mtitle(_) $_$ Macro -\define .otitle(_) $_$ Operator -\define .vtitle(_) $_$ Variable - -\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$"/> - -\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$">> - -\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(_) $_$ - -\define .button(_) {{$:/core/ui/Buttons/$_$!!caption}} - -\define .tip(_)
{{$:/core/images/tip}}
$_$
-\define .warning(_)
{{$:/core/images/warning}}
$_$
- -\define .state-prefix() $:/state/editions/tw5.com/ - -\define .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() -This is an example tiddler. See [[Table-of-Contents Macros (Examples)]]. - -<<.lorem>> -\end - -\define .example(n,eg,egvar:NO-SUCH-VAR) -
-<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - <$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/> - <$codeblock code="""$eg$"""/> - -<$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - - <$macrocall $name="copy-to-clipboard-above-right" src=<<$egvar$>>/> - <$codeblock code=<<$egvar$>>/> - -<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix[$n$]]" variable=".state"> -<$reveal state=<<.state>> type="nomatch" text="show"> -
-
<$button set=<<.state>> setTo="show">Try it
-
- -<$reveal state=<<.state>> type="match" text="show"> -
-
<$button set=<<.state>> setTo="">Hide
-
-
- <$reveal default="$egvar$" type="match" text="NO-SUCH-VAR"> - $eg$ - - <$reveal default="$egvar$" type="nomatch" text="NO-SUCH-VAR"> - <<$egvar$>> - -
- - -\end - -
<$view field="text"/>
\ No newline at end of file diff --git a/editions/dev/tiddlers/system/doc-styles.tid b/editions/dev/tiddlers/system/doc-styles.tid deleted file mode 100644 index 24234d47a..000000000 --- a/editions/dev/tiddlers/system/doc-styles.tid +++ /dev/null @@ -1,40 +0,0 @@ -created: 20150117152612000 -modified: 20230325101137075 -tags: $:/tags/Stylesheet -title: $:/editions/tw5.com/doc-styles -type: text/vnd.tiddlywiki - -a.doc-from-version.tc-tiddlylink { - display: inline-block; - border-radius: 1em; - background: <>; - color: <>; - fill: <>; - padding: 0 0.4em; - font-size: 0.7em; - text-transform: uppercase; - font-weight: bold; - line-height: 1.5; - vertical-align: text-bottom; -} - -a.doc-deprecated-version.tc-tiddlylink { - display: inline-block; - border-radius: 1em; - background: red; - color: <>; - fill: <>; - padding: 0 0.4em; - font-size: 0.7em; - text-transform: uppercase; - font-weight: bold; - line-height: 1.5; - vertical-align: text-bottom; -} - -.doc-deprecated-version svg, -.doc-from-version svg { - width: 1em; - height: 1em; - vertical-align: text-bottom; -} diff --git a/editions/dev/tiddlers/system/tw5.com-dev-styles.tid b/editions/dev/tiddlers/system/tw5.com-dev-styles.tid index 0320b7d05..489df5709 100644 --- a/editions/dev/tiddlers/system/tw5.com-dev-styles.tid +++ b/editions/dev/tiddlers/system/tw5.com-dev-styles.tid @@ -1,3 +1,5 @@ title: $:/_tw5.com-dev-styles tags: $:/tags/Stylesheet +list-after: $:/editions/tw5.com/doc-styles + \ No newline at end of file diff --git a/editions/dev/tiddlers/system/version-macros.tid b/editions/dev/tiddlers/system/version-macros.tid deleted file mode 100644 index 205ac37a3..000000000 --- a/editions/dev/tiddlers/system/version-macros.tid +++ /dev/null @@ -1,14 +0,0 @@ -code-body: yes -created: 20161008085627406 -modified: 20221007122259593 -tags: $:/tags/Macro -title: $:/editions/tw5.com/version-macros -type: text/vnd.tiddlywiki - -\define .from-version(version) -<$link to={{{ [<__version__>addprefix[Release ]] }}} class="doc-from-version">{{$:/core/images/warning}} New in: <$text text=<<__version__>>/> -\end - -\define .deprecated-since(version, superseded:"") -<$link to="Deprecated - What does it mean" class="doc-deprecated-version tc-btn-invisible">{{$:/core/images/warning}} Deprecated from v<$text text=<<__version__>>/> <%if [<__superseded__>else[]!match[]] %>(see <$link to=<<__superseded__>>><$text text=<<__superseded__>>/>)<%endif%> -\end diff --git a/editions/tw5.com/tiddlers/system/doc-macros.tid b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid similarity index 100% rename from editions/tw5.com/tiddlers/system/doc-macros.tid rename to editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-macros.tid diff --git a/editions/tw5.com/tiddlers/system/doc-styles.tid b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-styles.tid similarity index 100% rename from editions/tw5.com/tiddlers/system/doc-styles.tid rename to editions/tw5.com/tiddlers/_tw_shared/doc-utilities/doc-styles.tid diff --git a/editions/tw5.com/tiddlers/system/version-macros.tid b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/version-macros.tid similarity index 100% rename from editions/tw5.com/tiddlers/system/version-macros.tid rename to editions/tw5.com/tiddlers/_tw_shared/doc-utilities/version-macros.tid diff --git a/editions/tw5.com/tiddlers/system/wikitext-macros.tid b/editions/tw5.com/tiddlers/_tw_shared/doc-utilities/wikitext-macros.tid similarity index 100% rename from editions/tw5.com/tiddlers/system/wikitext-macros.tid rename to editions/tw5.com/tiddlers/_tw_shared/doc-utilities/wikitext-macros.tid