Template:Tooltip: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (m - quote fix)
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><abbr title="{{{1}}}">{{{2|<sup><span style="display:inline-block;width:1.8ex;height:1.8ex;line-height:1.8ex;border-radius:1.4ex;margin-left:4px;border:1px solid #cccccc;text-align:center;padding:1px;font-family:'Source Code Pro','Lucida Console',Monaco,'Courier New',Courier;font-size:1.8ex;font-weight:100;">?</span></sup>}}}</abbr></includeonly>
<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 | extend-line }} {{#ifeq: {{{4|}}} | wide | qud-tooltip-wide | {{#ifeq: {{{4|}}} | nosearch | navigation-not-searchable}} }}">{{{1}}}</span></span></includeonly><noinclude>[[Category:Shorthand Templates]]
<noinclude>[[Category: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>


Example 1 - description text specified: {{Tooltip |(hover text)|(example description text)}}
{| class="wikitable"
Example 2 - no description text specified:{{Tooltip |(hover text)}}</noinclude>
! Parameter
! Required?
! Description
|-
| 1
| required
| hover tooltip text
|-
| 2
| optional
| description to be hovered over. If not specified, a circled question mark symbol will be used instead of text.
|-
| 3
| 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>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
| 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>nosearch</code> to exclude the tooltip text from search indexing on the wiki. (works as 3rd or 4th parameter)
|}
 
Example 1 - description text specified: {{Tooltip |(hover text)|text}}
 
Example 2 - no description text specified: {{Tooltip |(hover text)}}
 
Example 3 - centered content: {{Tooltip|(hover text)|text|centered}}
 
Example 4 - centered content w/ qmark: {{Tooltip|(hover text)||centered}}
 
</noinclude>

Latest revision as of 19:29, 16 December 2021

Usage: {{Tooltip |(hover text)|(description text to be hovered over)}}

Parameter Required? Description
1 required hover tooltip text
2 optional description to be hovered over. If not specified, a circled question mark symbol will be used instead of text.
3 optional
  • specify centered 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 nosearch to exclude the tooltip text from search indexing on the wiki. Good for infobox tooltip text that is repeated on many pages.
4 optional
  • specify wide to make a slightly wider tooltip (160px). Only works in combination with centered - non-centered tooltips don't have a fixed width.
  • specify nosearch to exclude the tooltip text from search indexing on the wiki. (works as 3rd or 4th parameter)

Example 1 - description text specified: text(hover text)

Example 2 - no description text specified: ?(hover text)

Example 3 - centered content: text(hover text)

Example 4 - centered content w/ qmark: ?(hover text)