mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-25 23:22:23 +00:00
doc-macros new v5.3.x syntax
This commit is contained in:
parent
ba7cef14e6
commit
25145271a4
@ -4,78 +4,107 @@ tags: $:/tags/Macro
|
|||||||
title: $:/editions/tw5.com/doc-macros
|
title: $:/editions/tw5.com/doc-macros
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\define .concat(1,2,3,4,5) $1$$2$$3$$4$$5$
|
\whitespace trim
|
||||||
|
|
||||||
\define .def(_) <dfn class="doc-def">$_$</dfn>
|
\function .concat(1,2,3,4,5) [[$(1)$$(2)$$(3)$$(4)$$(5)$]substitute[]]
|
||||||
\define .em(_) <em class="doc-em">$_$</em>
|
|
||||||
\define .strong(_) <strong class="doc-strong">$_$</strong>
|
|
||||||
\define .place(_) <code class="doc-place">$_$</code>
|
|
||||||
\define .word(_) "$_$"
|
|
||||||
|
|
||||||
\define .preamble(_) :.doc-preamble $_$
|
\procedure .def(_) <dfn class="doc-def"><<_>></dfn>
|
||||||
\define .note(_)
|
|
||||||
|
\procedure .em(_) <em class="doc-em"><<_>></em>
|
||||||
|
\procedure .strong(_) <strong class="doc-strong"><<_>></strong>
|
||||||
|
\procedure .place(_) <code class="doc-place"><<_>></code>
|
||||||
|
\function .word(_) [["]] [<_>] =[["]] +[join[]]
|
||||||
|
|
||||||
|
\procedure .preamble(_) <dl><dd class="doc-preamble"><<_>></dd></dl>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Replaced by a new .note box with icon. Notes should _not_ be definition lists -->
|
||||||
|
<!-- For HTML that's semantically wrong -->
|
||||||
|
\procedure .note(_)
|
||||||
@@.doc-note
|
@@.doc-note
|
||||||
;Note
|
; Note
|
||||||
: $_$
|
: <<_>>
|
||||||
@@
|
@@
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .tid(_) <code class="doc-tiddler">$_$</code>
|
\procedure .tid(_) <code class="doc-tiddler"><<_>></code>
|
||||||
\define .tag(_) <code class="doc-tag">$_$</code>
|
\procedure .tag(_) <code class="doc-tag"><<_>></code>
|
||||||
\define .field(_) <code class="doc-field">$_$</code>
|
\procedure .field(_) <code class="doc-field"><<_>></code>
|
||||||
\define .value(_) <code class="doc-value">$_$</code>
|
\procedure .value(_) <code class="doc-value"><<_>></code>
|
||||||
\define .op(_) <code class="doc-operator">$_$</code>
|
\procedure .op(_) <code class="doc-operator"><<_>></code>
|
||||||
\define .var(_) <code class="doc-var">$_$</code>
|
\procedure .var(_) <code class="doc-var"><<_>></code>
|
||||||
\define .wid(_) <code class="doc-widget">$$_$</code>
|
\procedure .wid(_) <code class="doc-widget"><$macrocall $name=".concat" 1="$" 2=<<_>>/></code>
|
||||||
\define .attr(_) <code class="doc-attr">$_$</code>
|
\procedure .attr(_) <code class="doc-attr"><<_>></code>
|
||||||
\define .param(_) <code class="doc-param">$_$</code>
|
\procedure .param(_) <code class="doc-param"><<_>></code>
|
||||||
|
|
||||||
\define .mtitle(_) $_$ Macro
|
\procedure .tiddler-fields(tiddler)
|
||||||
\define .otitle(_) $_$ Operator
|
<$tiddler tiddler=<<tiddler>>>
|
||||||
\define .vtitle(_) $_$ Variable
|
<div class="doc-tiddler-fields">
|
||||||
|
<h2>
|
||||||
\define .link(_,to) <$link to="$to$">$_$</$link>
|
<$link>
|
||||||
\define .clink(_,to) <span class="doc-clink"><<.link """$_$""" "$to$">></span>
|
<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/>
|
||||||
\define .dlink(_,to) <$macrocall $name=".link" _=<<.def "$_$">> to="$to$">/>
|
</$link>
|
||||||
\define .dlink-ex(_,to) <a href="$to$" class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><<.def "$_$">></a>
|
</h2>
|
||||||
\define .flink(to) <$macrocall $name=".link" _=<<.field {{$to$!!caption}}>> to="$to$"/>
|
<table class="tc-view-field-table">
|
||||||
\define .mlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.mtitle "$_$">>/>
|
<tbody>
|
||||||
\define .mlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/>
|
<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||||
\define .olink(_) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$_$">>/>
|
</tbody>
|
||||||
\define .olink2(_,to) <$macrocall $name=".link" _=<<.op "$_$">> to=<<.otitle "$to$">>/>
|
</table>
|
||||||
\define .vlink(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to=<<.vtitle "$_$">>/>
|
</div>
|
||||||
\define .vlink2(_,to) <$macrocall $name=".link" _=<<.var "$_$">> to="$to$"/>
|
</$tiddler>
|
||||||
\define .wlink(to) <$macrocall $name=".link" _=<<.wid {{$to$!!caption}}>> to="$to$"/>
|
|
||||||
\define .wlink2(_,to) <$macrocall $name=".link" _="$_$" to="$to$"/>
|
|
||||||
|
|
||||||
\define .key(_) <span class="doc-key">$_$</span>
|
|
||||||
\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(_) <span class="doc-tab">{{$_$!!caption}}</span>
|
|
||||||
\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(_) <span class="doc-tab">$_$</span>
|
|
||||||
|
|
||||||
\define .doc-tabs()
|
|
||||||
<$macrocall $name="tabs"
|
|
||||||
tabsList="[tag<currentTiddler>description[tab]]"
|
|
||||||
default={{{ [tag<currentTiddler>first[]] }}}
|
|
||||||
explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
|
||||||
class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} />
|
|
||||||
\end
|
\end
|
||||||
\define .doc-tab-link(text, target, tooltip:"", class:"")
|
|
||||||
|
\function .mtitle(_) [<_>] Macro +[join[ ]]
|
||||||
|
\function .otitle(_) [<_>] Operator +[join[ ]]
|
||||||
|
\function .vtitle(_) [<_>] Variable +[join[ ]]
|
||||||
|
|
||||||
|
\procedure .link(_,to) <$link to=<<to>> ><<_>></$link>
|
||||||
|
\procedure .clink(_,to) <span class="doc-clink"><$link to=<<to>>><<_>></$link></span>
|
||||||
|
|
||||||
|
\procedure .dlink(_,to) <$link to=<<to>>><$macrocall $name=".def" _=<<_>>/></$link>
|
||||||
|
|
||||||
|
\procedure .dlink-ex(_,to) <a href=<<to>> class="tc-tiddlylink-external" target="_blank" rel="noopener noreferrer"><$macrocall $name=".def" _=<<_>>/></a>
|
||||||
|
\procedure .flink(to) <$macrocall $name=".link" _=`<<.field {{$(to)$!!caption}}>>` to=<<to>>/>
|
||||||
|
|
||||||
|
\procedure .mlink(_) <$link to={{{ [.mtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link>
|
||||||
|
\procedure .mlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/> </$link>
|
||||||
|
|
||||||
|
\procedure .olink(_) <$link to={{{ [.otitle<_>] }}}><$macrocall $name=".op" _=<<_>>/> </$link>
|
||||||
|
\procedure .olink2(_,to) <$link to={{{ [.otitle<to>] }}}><$macrocall $name=".op" _=<<_>>/> </$link>
|
||||||
|
|
||||||
|
\procedure .vlink(_) <$link to={{{ [.vtitle<_>] }}}><$macrocall $name=".var" _=<<_>>/> </$link>
|
||||||
|
\procedure .vlink2(_,to) <$link to=<<to>>><$macrocall $name=".var" _=<<_>>/></$link>
|
||||||
|
|
||||||
|
\procedure .wlink(to) <$link to=<<to>> > <$macrocall $name=".wid" _={{{ [<to>get[caption]] }}}> </$link>
|
||||||
|
\procedure .wlink2(_,to) <$link to=<<to>> ><<_>></$link>
|
||||||
|
|
||||||
|
\procedure .key(_) <span class="doc-key"><<_>></span>
|
||||||
|
\procedure .keys(_) <span class="doc-key"><<_>></span>
|
||||||
|
|
||||||
|
\procedure .tab(_) <span class="doc-tab"><$transclude $tiddler=<<_>> $field=caption ><<_>></$transclude></span>
|
||||||
|
\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(_) <span class="doc-tab"><<_>></span>
|
||||||
|
|
||||||
|
\procedure .doc-tabs()
|
||||||
|
<$macrocall $name="tabs"
|
||||||
|
tabsList="[tag<currentTiddler>description[tab]]"
|
||||||
|
default={{{ [tag<currentTiddler>first[]] }}}
|
||||||
|
explicitState={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
||||||
|
class={{{ [[doc-tabs]] [<currentTiddler>encodeuricomponent[]escapecss[]addprefix[doc-tabs-]] +[join[ ]] }}} />
|
||||||
|
\end
|
||||||
|
\procedure .doc-tab-link(text, target, tooltip:"", class:"")
|
||||||
<!-- figure out where the addressed doc-tabs are -->
|
<!-- figure out where the addressed doc-tabs are -->
|
||||||
<$tiddler tiddler={{{ [<currentTiddler>search:text[.doc-tabs]] :else[<currentTiddler>tags[]search:text[.doc-tabs]first[]] :else[<currentTiddler>] }}} >
|
<$tiddler tiddler={{{ [<currentTiddler>search:text[.doc-tabs]] :else[<currentTiddler>tags[]search:text[.doc-tabs]first[]] :else[<currentTiddler>] }}} >
|
||||||
<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<__class__>] +[join[ ]] }}}
|
<$button class={{{ [[tc-btn-invisible tc-tiddlylink]] [<class>] +[join[ ]] }}}
|
||||||
set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
set={{{ [<currentTiddler>addprefix[$:/state/tab/]] }}}
|
||||||
setTo=<<__target__>>
|
setTo=<<target>>
|
||||||
tooltip=<<__tooltip__>>>
|
tooltip=<<tooltip>>>
|
||||||
<<__text__>>
|
<<text>>
|
||||||
<!-- if tiddler with tabs is open, scroll to tabs, otherwise open that tiddler (relevant from within tab subtiddlers) -->
|
<!-- if tiddler with tabs is open, scroll to tabs, otherwise open that tiddler (relevant from within tab subtiddlers) -->
|
||||||
<$list filter="[[$:/StoryList]contains<currentTiddler>]" variable="ignore" emptyMessage="<$action-navigate />">
|
<$list filter="[[$:/StoryList]contains<currentTiddler>]" variable="ignore" emptyMessage="<$action-navigate />">
|
||||||
<$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]addprefix[.doc-tabs-]] }}} />
|
<$action-sendmessage $message="tm-scroll" selector={{{ [<currentTiddler>encodeuricomponent[]addprefix[.doc-tabs-]] }}} />
|
||||||
@ -84,34 +113,53 @@ type: text/vnd.tiddlywiki
|
|||||||
</$button>
|
</$button>
|
||||||
</$tiddler>
|
</$tiddler>
|
||||||
\end
|
\end
|
||||||
\define .widget-attr-link(text, target)
|
\procedure .widget-attr-link(text, target)
|
||||||
<$macrocall $name=".doc-tab-link"
|
<$macrocall $name=".doc-tab-link"
|
||||||
text={{{ [[<code class="doc-attr">]] [<__text__>] [[</code>]] +[join[]] }}}
|
text={{{ [[<code class="doc-attr">]] [<text>] [[</code>]] +[join[]] }}}
|
||||||
class="doc-tab-link"
|
class="doc-tab-link"
|
||||||
target=<<__target__>>
|
target=<<target>>
|
||||||
tooltip={{{ [[Show more information about the ']] [<__text__>] [[' attribute]] +[join[]] }}} />
|
tooltip={{{ [[Show more information about the ']] [<text>] [[' attribute]] +[join[]] }}} />
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .button(_) <span class="doc-button">{{$:/core/ui/Buttons/$_$!!caption}}</span>
|
\procedure .button(_) <span class="doc-button"><$transclude $tiddler=`$:/core/ui/Buttons/$(_)$` $field="caption" ><<_>></$transclude></span>
|
||||||
|
|
||||||
\define .icon(_) <span class="doc-icon">{{$_$}}</span>
|
\procedure .icon(_) <span class="doc-icon"><$transclude $tiddler=<<_>>/></span>
|
||||||
|
|
||||||
\define .tip(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/tip}}</div> $_$</div>
|
\procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem")
|
||||||
\define .warning(_) <div class="doc-icon-block"><div class="doc-block-icon">{{$:/core/images/warning}}</div> $_$</div>
|
\function _f.tipClass() [[doc-icon-block]] [<class>!is[blank]then<class>] +[join[ ]]
|
||||||
|
<$log/>
|
||||||
|
<div class=<<_f.tipClass>>>
|
||||||
|
<%if [<title>!is[blank]] %><div>''<<title>>''</div><% endif %>
|
||||||
|
<div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div>
|
||||||
|
<<text>>
|
||||||
|
</div><br/>
|
||||||
|
\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(text:"", title:"Tip" , icon:"$:/core/images/tip", class:"doc-tip", iconSize:"22pt")
|
||||||
|
<$macrocall $name=".infoBox" text=<<text>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/>
|
||||||
|
\end
|
||||||
|
|
||||||
|
\procedure .warning(text:"", title:"Warning", icon:"$:/core/images/warning", class:"doc-warning", iconSize:"22pt")
|
||||||
|
<$macrocall $name=".infoBox" text=<<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.
|
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
|
\end
|
||||||
|
|
||||||
\define .toc-lorem()
|
\procedure .toc-lorem()
|
||||||
This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
|
This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
|
||||||
|
|
||||||
<<.lorem>>
|
<<.lorem>>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .example(n,eg,egvar:NO-SUCH-VAR)
|
\procedure .example(n,eg,egvar:NO-SUCH-VAR)
|
||||||
<div class="doc-example">
|
<div class="doc-example">
|
||||||
<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR">
|
<$reveal default="$egvar$" type="match" text="NO-SUCH-VAR">
|
||||||
<$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/>
|
<$macrocall $name="copy-to-clipboard-above-right" src="""$eg$"""/>
|
||||||
@ -148,7 +196,7 @@ $$$
|
|||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .bad-example(eg)
|
\procedure .bad-example(eg)
|
||||||
<table class="doc-bad-example">
|
<table class="doc-bad-example">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="evenRow">
|
<tr class="evenRow">
|
||||||
@ -162,42 +210,27 @@ $eg$
|
|||||||
</table>
|
</table>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .link-badge(text,link,colour)
|
\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>
|
<a href=<<link>> class="doc-link-badge" style="background-color:$colour$;" target="_blank" rel="noopener noreferrer"><$text text=<<text>>/></a>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
|
||||||
\define .link-badge-added(link,colour:#ffe246) <<.link-badge "added" """$link$""" """$colour$""">>
|
\procedure .link-badge-added(link,colour:#ffe246) <<.link-badge "added" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-addendum(link,colour:#fcc84a) <<.link-badge "addendum" """$link$""" """$colour$""">>
|
\procedure .link-badge-addendum(link,colour:#fcc84a) <<.link-badge "addendum" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-extended(link,colour:#f9a344) <<.link-badge "extended" """$link$""" """$colour$""">>
|
\procedure .link-badge-extended(link,colour:#f9a344) <<.link-badge "extended" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-fixed(link,colour:#ffa86d) <<.link-badge "fixed" """$link$""" """$colour$""">>
|
\procedure .link-badge-fixed(link,colour:#ffa86d) <<.link-badge "fixed" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-here(link,colour:#d88e63) <<.link-badge "here" """$link$""" """$colour$""">>
|
\procedure .link-badge-here(link,colour:#d88e63) <<.link-badge "here" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-hide(link,colour:#9d959f) <<.link-badge "hide" """$link$""" """$colour$""">>
|
\procedure .link-badge-hide(link,colour:#9d959f) <<.link-badge "hide" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-improved(link,colour:#7593c7) <<.link-badge "improved" """$link$""" """$colour$""">>
|
\procedure .link-badge-improved(link,colour:#7593c7) <<.link-badge "improved" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-modified(link,colour:#7f99c9) <<.link-badge "modified" """$link$""" """$colour$""">>
|
\procedure .link-badge-modified(link,colour:#7f99c9) <<.link-badge "modified" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-removed(link,colour:#a9aabc) <<.link-badge "removed" """$link$""" """$colour$""">>
|
\procedure .link-badge-removed(link,colour:#a9aabc) <<.link-badge "removed" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">>
|
\procedure .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">>
|
\procedure .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>
|
|
||||||
\end
|
|
||||||
|
|
||||||
\define .banner-credits(credit,url)
|
|
||||||
<img src=<<__url__>> width="140" style="float:left;margin-right:0.5em;"/>
|
\procedure .banner-credits(credit,url)
|
||||||
|
<img src=<<url>> width="140" style="float:left;margin-right:0.5em;"/>
|
||||||
|
|
||||||
$credit$
|
$credit$
|
||||||
|
|
||||||
@ -206,9 +239,9 @@ $credit$
|
|||||||
</div>
|
</div>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define .contributors(usernames)
|
\procedure .contributors(usernames)
|
||||||
<ol class="doc-github-contributors">
|
<ol class="doc-github-contributors">
|
||||||
<$list filter="[enlist<__usernames__>sort[]]" variable="username">
|
<$list filter="[enlist<usernames>sort[]]" variable="username">
|
||||||
<li>
|
<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>
|
<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>
|
</li>
|
||||||
|
@ -85,7 +85,6 @@ td svg {
|
|||||||
.doc-preamble {
|
.doc-preamble {
|
||||||
border: 2px solid <<colour code-border>>;
|
border: 2px solid <<colour code-border>>;
|
||||||
color: <<colour very-muted-foreground>>;
|
color: <<colour very-muted-foreground>>;
|
||||||
font-size: 90%;
|
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
padding: 0.5em 0.7em;
|
padding: 0.5em 0.7em;
|
||||||
}
|
}
|
||||||
@ -112,7 +111,7 @@ td svg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.doc-example input[type=search] {
|
.doc-example input[type=search] {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
.doc-example pre:first-child {
|
.doc-example pre:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
@ -138,7 +137,7 @@ td svg {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
|
.doc-bad-example code, .doc-bad-example pre, table.doc-bad-example {
|
||||||
background-color:#ffff80;
|
background-color:#ffff80;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc-table th, .doc-table tr {
|
.doc-table th, .doc-table tr {
|
||||||
@ -164,19 +163,37 @@ tr.doc-table-subheading {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.doc-icon-block {
|
.doc-icon-block {
|
||||||
border-left: 2px solid <<colour code-border>>;
|
border-left: 4px solid <<colour blockquote-bar>>;
|
||||||
margin-left: 3em;
|
margin-left: 3em;
|
||||||
padding-left: 0.6em;
|
padding-left: 0.6em;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc-block-icon {
|
.doc-block-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -3em;
|
left: -3em;
|
||||||
top: 0.2em;
|
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 {
|
.doc-block-icon .tc-image-tip {
|
||||||
fill: <<colour primary>>;
|
fill: <<colour primary>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
.doc-block-icon .tc-image-warning {
|
.doc-block-icon .tc-image-warning {
|
||||||
fill: <<colour alert-highlight>>;
|
fill: <<colour alert-highlight>>;
|
||||||
}
|
}
|
||||||
@ -241,7 +258,6 @@ a.doc-deprecated-version.tc-tiddlylink {
|
|||||||
height: 1em;
|
height: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.doc-tiddler-fields table,
|
.doc-tiddler-fields table,
|
||||||
.doc-tiddler-fields h2 {
|
.doc-tiddler-fields h2 {
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
@ -294,13 +310,13 @@ ol.doc-github-contributors li {
|
|||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.doc-tabs.tc-tab-buttons button {
|
.doc-tabs.tc-tab-buttons button {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
}
|
}
|
||||||
.doc-tabs button .doc-attr {
|
.doc-tabs button .doc-attr {
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
.doc-tab-link .doc-attr {
|
.doc-tab-link .doc-attr {
|
||||||
color: unset;
|
color: unset;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user