1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-09 08:50:26 +00:00
TiddlyWiki5/core/wiki/macros/translink.tid
Leilei332 2801eee905
Migrate some old macros to new syntax (#8768)
* Migrate some old macros to new syntax

* Rewrite more macros.

* Update image-picker

* Rewrite tabs macro

* Use more new syntax

* Revert thumbnail macro

* Avoid duplicated whitespace pragma

* Revert tabs macro
2024-12-05 12:40:13 +00:00

29 lines
760 B
Plaintext

title: $:/core/macros/translink
tags: $:/tags/Macro
\procedure translink(title,mode:"block")
\whitespace trim
<%if [<mode>match[block]] %>
<div class="tc-translink">
<div>
<$link to=<<title>>>
<h1><$text text=<<title>>/></h1>
</$link>
<$transclude tiddler=<<title>> mode="block">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude>
</div>
</div>
<%endif%>
<%if [<mode>match[inline]] %>
<span class="tc-translink">
<$link to=<<title>> class="tc-tiny-gap-right">
<$text text=<<title>>/>
</$link>
(<$transclude tiddler=<<title>> mode="inline">
<$set name="currentTiddler" value=<<title>>><$transclude tiddler="$:/language/MissingTiddler/Hint"/></$set>
</$transclude>)
</span>
<%endif%>
\end