Template:Tooltip: Difference between revisions

387 bytes added ,  19:13, 16 December 2021
support "nosearch" parameter
No edit summary
(support "nosearch" parameter)
Line 1: Line 1:
<includeonly><span class="qud-tooltip mobile-visible">{{#if: {{{2|}}} |<span class="qud-tooltip-ulabel">{{{2}}}</span>|<sup>?</sup>}}<span class="qud-tooltip-text {{#switch: {{{3|extend-line}}} | centered = centered-content | extend-line }} {{#ifeq: {{{4|}}} | wide | qud-tooltip-wide}}">{{{1}}}</span></span></includeonly><noinclude>[[Category:Shorthand Templates]]
<includeonly><span class="qud-tooltip mobile-visible">{{#if: {{{2|}}} |<span class="qud-tooltip-ulabel">{{{2}}}</span>|<sup>?</sup>}}<span class="qud-tooltip-text {{#switch: {{{3|extend-line}}} | centered = centered-content | nosearch = navigation-not-searchable | extend-line }} {{#ifeq: {{{4|}}} | wide | qud-tooltip-wide | {{#ifeq: {{{4|}}} | nosearch | navigation-not-searchable}} }}">{{{1}}}</span></span></includeonly><noinclude>[[Category:Shorthand Templates]]
Usage: <code><nowiki>{{Tooltip |(hover text)|(description text to be hovered over)}}</nowiki></code>
Usage: <code><nowiki>{{Tooltip |(hover text)|(description text to be hovered over)}}</nowiki></code>


Line 17: Line 17:
| 3
| 3
| optional
| optional
| specify <code>centered</code> for this parameter to make the tooltip centered over the description/qmark. This option also forces the tooltip content to be fixed-width (120px)
|
* specify <code>centered</code> for this parameter to make the tooltip centered over the description/qmark. This option also forces the tooltip content to be fixed-width (120px)
* specify <code>nosearch</code> to exclude the tooltip text from search indexing on the wiki. Good for infobox tooltip text that is repeated on many pages.
|-
|-
| 4
| 4
| optional
| optional
| specify <code>wide</code> to make a slightly wider tooltip (160px). Only works in combination with <code>centered</code> - non-centered tooltips don't have a fixed width.
|
* specify <code>wide</code> to make a slightly wider tooltip (160px). Only works in combination with <code>centered</code> - non-centered tooltips don't have a fixed width.
* specify <code>nosearch</code> to exclude the tooltip text from search indexing on the wiki. (works as 3rd or 4th parameter)
|}
|}