Template:Tt: Difference between revisions

From Elwiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><div data-tippy-content="x" data-tippy-placement="{{{pos|}}}" style="display: inline-block; {{#ifeq:{{{line|}}}|false||border-bottom: 1px dotted black;}} {{{style|}}}" class="tippy-btn"><span class="content">{{#if:{{{align|}}}|<div style="text-align: {{{align|}}}">}}{{{2|}}}{{#if:{{{align|}}}|</div>}}</span><div>{{{1|}}}</div></div></includeonly><noinclude>
<includeonly><div data-tippy-content="x" data-tippy-placement="{{{pos|}}}" style="display: inline-block; {{#ifeq:{{{line|}}}|false||border-bottom: 1px dotted black;}} {{{style|}}}" class="tippy-btn"><span class="content">{{#if:{{{align|}}}|<div style="text-align: {{{align|}}}">}}{{{2|}}}{{#if:{{{align|}}}|</div>}}</span><div>{{{1|}}}</div></div></includeonly><noinclude>{{Doc}}</noinclude>
== Usage & Examples ==
<code><nowiki>{{tt|Normal text|Tooltip text}}</nowiki></code>
{{tt|Normal text|Tooltip text}}
<br>
<code><nowiki>{{tt|Normal text without underline|Tooltip text|line=false}}</nowiki></code>
{{tt|Normal text without underline|Tooltip text|line=false}}
<br>
<code><nowiki>{{tt|Tooltip text with horizontal rule|Tooltip<hr>Text}}</nowiki></code>
{{tt|Tooltip text with horizontal rule|Tooltip<hr>Text}}
<br>
<code><nowiki>{{tt|{{tt|Nested tooltip|Bottom text}}|Top text}}</nowiki></code>
{{tt|{{tt|Nested tooltip|Bottom text}}|Top text|line=false|pos=bottom}}
<br>
<code><nowiki>{{tt|left-aligned text|Tooltip text|text-align=left}}</nowiki></code>
{{tt|left-aligned text|Tooltip text|text-align=left}}
 
[[Category:Code templates]][[Category:Templates]]
<templatedata>
{
"params": {
"1": {
"label": "Tooltipped element",
"type": "string"
},
"2": {
"label": "Tooltip content",
"type": "string"
},
"pos": {
"label": "Position",
"type": "string",
"default": "auto"
},
"line": {
"label": "Line",
"type": "boolean",
"default": "true"
},
"style": {
"label": "Style",
"type": "string"
},
"align": {
"label": "Align",
"default": "left"
}
},
"description": "A template to spawn tooltipped content."
}
</templatedata></noinclude>