Difference between revisions of "Template:Tlg"
Jump to navigation
Jump to search
imported>Zyxw (Add "kbd" parameter to display output wrapped in <kbd> tags, similar to output of Template:Tltt, Template:Tltt2, etc. See template documentation for example.) |
imported>Zyxw (add optional parameter "a" which if set to any value displays an asterisk before template code) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
-->{{#if:{{{code|{{{tt|}}}}}} |<code> |{{#if:{{{plaincode|}}}|<code style="border:none;background:transparent;">}} }}<!-- | -->{{#if:{{{code|{{{tt|}}}}}} |<code> |{{#if:{{{plaincode|}}}|<code style="border:none;background:transparent;">}} }}<!-- | ||
-->{{#if:{{{kbd|}}} |<kbd>}}<!-- | -->{{#if:{{{kbd|}}} |<kbd>}}<!-- | ||
− | -->{{#if:{{{braceinside|}}} | + | -->{{#if:{{{nowrapname|}}} |<span class="nowrap">}}<!-- |
+ | -->{{#if:{{{a|}}} |<nowiki>*</nowiki> }}<!-- | ||
+ | -->{{#if:{{{brace|}}}{{{braceinside|}}} | |<nowiki>{{</nowiki>}}<!-- | ||
-->{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- | -->{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!-- | ||
-->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- | -->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- | ||
-->{{#if:{{{nolink|}}} |<!--then omit template link, else: | -->{{#if:{{{nolink|}}} |<!--then omit template link, else: | ||
− | + | -->| {{#if:{{{braceinside|}}} |<nowiki>{</nowiki>}}<!-- | |
-->{{!((}}:<!--(start building link with "[[:") | -->{{!((}}:<!--(start building link with "[[:") | ||
-->{{#ifeq:{{padleft:|1|{{{1}}}}}|: <!--i.e. if {{{1}}}'s first character is a colon, | -->{{#ifeq:{{padleft:|1|{{{1}}}}}|: <!--i.e. if {{{1}}}'s first character is a colon, | ||
Line 18: | Line 20: | ||
-->{{!}}<!--(pipe between link and label, i.e. [[:link|label]]) | -->{{!}}<!--(pipe between link and label, i.e. [[:link|label]]) | ||
-->}}<!-- | -->}}<!-- | ||
+ | -->{{#if:{{{brace|}}} |<nowiki>{{</nowiki>}}<!-- | ||
-->{{#if:{{{braceinside|}}} |<nowiki>{</nowiki>}}<!-- | -->{{#if:{{{braceinside|}}} |<nowiki>{</nowiki>}}<!-- | ||
label / template name: | label / template name: | ||
-->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}<!-- | -->{{{alttext|{{#if:{{{1|}}}|{{{1}}}|{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|{{PAGENAME}}|{{FULLPAGENAME}}}}}}}}}<!-- | ||
+ | -->{{#if:{{{brace|}}} |<nowiki>}}</nowiki>}}<!-- | ||
-->{{#if:{{{braceinside|}}} |<nowiki>}</nowiki>}}<!-- | -->{{#if:{{{braceinside|}}} |<nowiki>}</nowiki>}}<!-- | ||
-->{{#if:{{{nolink|}}} | |<!-- | -->{{#if:{{{nolink|}}} | |<!-- | ||
− | -->{{ | + | -->{{))!}}<!--(end link) |
-->{{#if:{{{braceinside|}}} |<nowiki>}</nowiki>}}<!-- | -->{{#if:{{{braceinside|}}} |<nowiki>}</nowiki>}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
-->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- | -->{{#if:{{{bold|{{{boldlink|{{{boldname|}}}}}}}}} |'''}}<!-- | ||
+ | -->{{#if:{{{nowrapname|}}} |</span>}}<!-- | ||
-->{{#if:{{{italic|{{{italics|}}}}}} |<span style="font-style:italic;">}}<!-- | -->{{#if:{{{italic|{{{italics|}}}}}} |<span style="font-style:italic;">}}<!-- | ||
Line 42: | Line 47: | ||
-->{{#if:{{{italic|{{{italics|}}}}}} |</span>}}<!-- | -->{{#if:{{{italic|{{{italics|}}}}}} |</span>}}<!-- | ||
− | -->{{#if:{{{braceinside|}}} | |<nowiki>}}</nowiki>}}<!-- | + | -->{{#if:{{{brace|}}}{{{braceinside|}}} | |<nowiki>}}</nowiki>}}<!-- |
-->{{#if:{{{kbd|}}} |</kbd>}}<!-- | -->{{#if:{{{kbd|}}} |</kbd>}}<!-- | ||
-->{{#if:{{{code|{{{tt|}}}}}}{{{plaincode|}}} |</code>}}<!-- | -->{{#if:{{{code|{{{tt|}}}}}}{{{plaincode|}}} |</code>}}<!-- |