Difference between revisions of "Template:Tooltip"

From Hgames Wiki
Jump to: navigation, search
(Initial creation of template. Copied directly from Wikipedia.)
 
(Replace invocation of Lua module with #replace parser function)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<!-- <templatestyles src="Template:Tooltip/styles.css" /> -->{{#ifeq:{{yesno-no|{{{link}}}}}|yes
 
<!-- <templatestyles src="Template:Tooltip/styles.css" /> -->{{#ifeq:{{yesno-no|{{{link}}}}}|yes
  |[[{{{1}}}|<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>]]
+
  |[[{{{1}}}|<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#replace:{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>]]
  |<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#ifeq:{{yesno-yes|{{{dotted}}}}}{{{style|}}}|style="{{#if:{{yesno-yes|{{{dotted}}}}}|border-bottom: 1px dotted; cursor: help;}} {{{style|}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>
+
  |<span class="rt-commentedText tooltip {{#ifeq:{{yesno-yes|{{{dotted}}}}}|no||tooltip-dotted}} {{{class|}}}" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#ifeq:{{yesno-yes|{{{dotted}}}}}{{{style|}}}|style="{{#if:{{yesno-yes|{{{dotted}}}}}|border-bottom: 1px dotted; cursor: help;}} {{{style|}}}"}} title="{{#tag:nowiki|{{#replace:{{{2|}}}|"|&quot;}}}}">{{{1|}}}</span>
 
}}<noinclude>
 
}}<noinclude>
 
{{Documentation|Template:Abbr/doc}}
 
{{Documentation|Template:Abbr/doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 21:07, 4 October 2024

Template documentation (for the above template, sometimes hidden or invisible)
Icon msgbox notice.png This template's code was copied directly from Wikipedia. For more information, including more details on how to use this template in your articles, please see Wikipedia's Template:Abbr documentation.


Hgames Wiki uses two separate templates to generate tooltips. The {{abbr}} template is used to write an abbreviation (including an acronym or initialism) with its expanded meaning. It is a wrapper for the HTML element <abbr>...</abbr>. The {{tooltip}} template uses the <span>...</span> element to provide generic notes.

Only use {{abbr}} or <abbr> to mark up abbreviations (including acronyms and initialisms). Using it to generate tooltips elsewhere is a misuse of the underlying HTML and causes accessibility problems. For general–purpose tooltips, use {{tooltip}} instead.


Visit Template:Abbr/doc to edit this text! (How does this work?)