Difference between revisions of "Template:Tooltip hover box"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(made it smaller)
old>Realpsojed
(Tooltips look flattened, adding line-height styling)
Line 1: Line 1:
<div style="border: 20px solid transparent; border-image-width: 24px; background: #1b1926; width:300px; text-shadow: black 2px 1px 4px; font-size: 90%; color:#ffffff">
<div style="border: 20px solid transparent; border-image-width: 24px; background: #1b1926; width:300px; text-shadow: black 2px 1px 4px; font-size: 90%; color:#ffffff; line-height: 1.6;">
{{#if:{{{title|}}}|{{{title}}}|{{BASEPAGENAME}}}}
{{#if:{{{title|}}}|{{{title}}}|{{BASEPAGENAME}}}}
{{#if:{{{body|}}}|{{{body}}}|}}
{{#if:{{{body|}}}|{{{body}}}|}}

Revision as of 18:00, 31 March 2020

Tooltip hover box

Template-info.png Documentation

This is a template created for use anytime you want to produce a pop-up mouseover tooltip. The tooltip automatically provides CSS styling and border similar to the in-game windows. Tooltip can display anything you write into the template, but our most common usage is to load another template filled with formatted data.

Usage: Create a new page, 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=
}}



Examples

Simply adding text

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

will produce this result:

My page
Lorem ipsum dolor sit..


Loading another page's contents

Instead of writing text, links, etc. into the template, you can load the contents of an existing page. For example, to display whatever is written on the Vision/Tooltip page:

{{ {{{1|Tooltip hover box}}}
|title= {{:Vision/Tooltip}}
}}

Tooltip hover box

Loading a part from another page's data structure

If you have a page that uses our data structure, you can load only a certain part of it. For example, if I wanted to load the weapon's description from the Templar Sword page, then I can call for this page's description data by using the page name as in the previous example and providing the appropriate parameter. In this case, we can simply call for the Description parameter:

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

This article is a stub. You can help Stoneshard wiki by expanding it.

'

Acquired From

See also






Loading a Template

Another option is to fill the tooltip box with another template. In this example, we will use the Template:Quote and fill in the values Quote and Author.

{{ {{{1|Tooltip hover box}}}
|title={{Quote|Be yourself; everyone else is already taken.|Oscar Wilde}}
}}
Be yourself; everyone else is already taken.
~ Oscar Wilde


All of the above

Templates are very powerful tools that can do more fancy stuff. Check out these wiki pages where the above examples are fused together: Templar Sword, Cleaving Strike, Agrimony, Bleeding.


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