Difference between revisions of "Template:Tooltip hover box/doc"

From Stoneshard wiki
Jump to navigation Jump to search
old>TheSatanicSanta
(Created page with "{{Doc/start|nodoc=1}} {{Doc/end}}")
 
old>Realpsojed
(Added some documentation)
Line 1: Line 1:
{{Doc/start|nodoc=1}}
{{Doc/start}}
This is a template created for use anytime you want to produce a pop-up mouseover tooltip. To see how this works, try to mouseover this link: [[Templar Sword]]. The tooltip automatically provides CSS styling and border similar to the in-game windows. Tooltip can display anything you write into the template, but the most common usage is to provide another template filled with data.
 
Usage: Create a new page with the name '''<something>/Tooltip'''. For example [[Templar Sword/Tooltip]]. Copy this code to the created page and fill in the parameters (or delete if you don't need both):
 
<nowiki>{{ {{{1|Tooltip hover box}}}
|title=
|body=
}}</nowiki>
 
For example, filling it like so
 
<nowiki>{{ {{{1|Tooltip hover box}}}
|title= My page
|body= <br>Lorem ipsum dolor sit..
}}</nowiki>
 
will produce this result:
 
{{ {{{1|Tooltip hover box}}}
|title= My page
|body= <br>Lorem ipsum dolor sit..
}}
 
If you already have a page with data, you can load that data into the tooltip. For example, on the page [[Templar Sword]] the item stats are already displayed. We can call for this page's data by using
 
<nowiki>{{ {{{1|Tooltip hover box}}}
|title= {{:Templar Sword}}
}}</nowiki>
 
Another option is to fill the data you want to see directly into the tooltip. In this example, we can use the [[Template:Weapon]] (or any other) and fill in the values.
 
<nowiki>{{ {{{1|Tooltip hover box}}}
|title= {{Weapon
|WeaponType=Sword
|Damage=37 Slashing<br> 2 Sacred
|Properties=Armor Damage:<br> Armor Piercing:<br> Bodypart Damage:<br> Block Chance:<br> Fumble Chance:<br> Accuracy:<br> Crit Chance:<br> Skills Energy Cost:
|Values= <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+20%'''</span><br> <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+10%'''</span><br> <span style="color:green;">'''-5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:darkred;">'''+15%'''</span>
|Durability=150
|Description=There is a faint etching on the surface of the blade, pledging loyalty to the Host and the court... the common kind of court.
|Price=6500
}} }}</nowiki>
 
Both will produce this tooltip. Template:Weapon automatically sets the headline to the current page name, hence the "{{ROOTPAGENAME}}".
 
{{ {{{1|Tooltip hover box}}}
|title= {{Weapon
|WeaponType=Sword
|Damage=37 Slashing<br> 2 Sacred
|Properties=Armor Damage:<br> Armor Piercing:<br> Bodypart Damage:<br> Block Chance:<br> Fumble Chance:<br> Accuracy:<br> Crit Chance:<br> Skills Energy Cost:
|Values= <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+20%'''</span><br> <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+10%'''</span><br> <span style="color:green;">'''-5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:darkred;">'''+15%'''</span>
|Durability=150
|Description=There is a faint etching on the surface of the blade, pledging loyalty to the Host and the court... the common kind of court.
|Price=6500
}} }}
 
For more help, please use the discussion for this template [[:Template_talk:Tooltip hover box]].
 
{{Doc/end}}
{{Doc/end}}

Revision as of 04:50, 4 April 2020

Template-info.png Documentation

This is a template created for use anytime you want to produce a pop-up mouseover tooltip. To see how this works, try to mouseover this link: Templar Sword. The tooltip automatically provides CSS styling and border similar to the in-game windows. Tooltip can display anything you write into the template, but the most common usage is to provide another template filled with data.

Usage: Create a new page with the name <something>/Tooltip. For example Templar Sword/Tooltip. Copy this code to the created page and fill in the parameters (or delete if you don't need both):

{{ {{{1|Tooltip hover box}}}
|title=
|body=
}}

For example, filling it like so

{{ {{{1|Tooltip hover box}}}
|title= My page
|body= <br>Lorem ipsum dolor sit..
}}

will produce this result:

My page
Lorem ipsum dolor sit..

If you already have a page with data, you can load that data into the tooltip. For example, on the page Templar Sword the item stats are already displayed. We can call for this page's data by using

{{ {{{1|Tooltip hover box}}}
|title= {{:Templar Sword}}
}}

Another option is to fill the data you want to see directly into the tooltip. In this example, we can use the Template:Weapon (or any other) and fill in the values.

{{ {{{1|Tooltip hover box}}}
|title= {{Weapon
|WeaponType=Sword
|Damage=37 Slashing<br> 2 Sacred
|Properties=Armor Damage:<br> Armor Piercing:<br> Bodypart Damage:<br> Block Chance:<br> Fumble Chance:<br> Accuracy:<br> Crit Chance:<br> Skills Energy Cost:
|Values= <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+20%'''</span><br> <span style="color:green;">'''+15%'''</span><br> <span style="color:green;">'''+10%'''</span><br> <span style="color:green;">'''-5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:green;">'''+5%'''</span><br> <span style="color:darkred;">'''+15%'''</span>
|Durability=150
|Description=There is a faint etching on the surface of the blade, pledging loyalty to the Host and the court... the common kind of court.
|Price=6500
}} }}

Both will produce this tooltip. Template:Weapon automatically sets the headline to the current page name, hence the "Tooltip hover box".

Tooltip hover box
Common

Durability: /

Tooltip hover box
Price

Tooltip hover box

For more help, please use the discussion for this template Template_talk:Tooltip hover box.