1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-15 14:24:51 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/system/wikitext-macros.tid
Jeremy Ruston 47519b1703
Experiments: Refactoring HelloThere (#8664)
* Initial Commit

* Fix default tiddlers for prerelease

* Use parsermode: inline for tiddlers that don't semantically have paragraphs

* Tweak card styles

Cards can now grow slightly to fill the available space

* Rename "Community Links" to "TiddlyWiki on the Web", and excise the items to individual tiddlers

* Revert changes to core styles

* Introductory text for each welcome tiddler

* Colours for welcome tiddlers

* Simplify introduction of GettingStarted

* Update TiddlyFox information

* Move all the card related definitions into their own folder

Perhaps preparatory to making them into a plugin, or putting them into the core

* Add a hover effect for card icons

* Retract changes to GettingStarted and system fonts

We'll come back to that

* Revert properly
2024-10-08 17:11:30 +01:00

90 lines
2.4 KiB
Plaintext

code-body: yes
created: 20150117184156000
modified: 20240716181836632
tags: $:/tags/Macro
title: $:/editions/tw5.com/wikitext-macros
type: text/vnd.tiddlywiki
\whitespace trim
\procedure activatePluginTab()
<$action-setfield $tiddler="$:/state/tab-1749438307" text="$:/core/ui/ControlPanel/Plugins"/>
<$action-navigate $to="$:/ControlPanel"/>
\end
\procedure activateTiddlerWindow()
<$action-sendmessage $message="tm-open-window" $param=<<currentTiddler>> windowTitle="Side by Side View" width="800" height="600" />
\end
\procedure controlPanel-plugin-link()
<$button actions=<<activatePluginTab>> class="tc-btn-invisible tc-tiddlylink">
{{$:/core/images/options-button}} ~ControlPanel
</$button>
\end
\procedure open-tiddler-in-window()
\whitespace notrim
<$button actions=<<activateTiddlerWindow>> class="tc-btn-invisible tc-tiddlylink">
open ''this'' tiddler in a new window
</$button>
\end
\procedure activateEditionWindow(url)
<$action-sendmessage $message="tm-open-external-window" $param=<<url>> windowName="_edition" windowFeatures="width=800 height=600" />
\end
\procedure open-external-window(url)
\whitespace notrim
<$button actions=<<activateEditionWindow <<url>> class="tc-btn-invisible tc-tiddlylink">
open the ''example edition'' in a new window
</$button>
\end
\procedure wikitext-example(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
<$codeblock code=<<src>>/>
<p>
That renders as:
</p>
<$transclude $variable="src" $mode="block"/>
<p>
... and the underlying HTML is:
</p>
<$wikify name="html" text=<<src>> output="html">
<$codeblock code=<<html>>/>
</$wikify>
</div>
\end
\procedure wikitext-example-without-html(src)
<div class="doc-example">
<$macrocall $name="copy-to-clipboard-above-right" src=<<src>>/>
<$codeblock code=<<src>>/>
<p>
That renders as:
</p>
<$transclude $variable="src" $mode="block"/>
</div>
\end
\procedure wikitext-example-table-header() <thead><tr><th/><th>wiki text</th><th>renders as</th></tr></thead>
\procedure wikitext-example-table-row(id, code)
<tr>
<th><<id>></th>
<td><$codeblock code=<<code>>/></td>
<td><$transclude $variable="code" $mode="block"/></td>
</tr>
\end
\procedure tw-code(tiddler)
<$codeblock language={{{ [<tiddler>get[type]] }}} code={{{ [<tiddler>get[text]] }}}/>
\end
\procedure tw-code-link(tiddler)
<$link to=<<tiddler>>/>:
<$transclude $variable=tw-code tiddler=<<tiddler>> />
\end