Difference between revisions of "Template:Tooltip/doc"

From EVE University Wiki
Jump to: navigation, search
m
m (Add dependencies. Add sample. Refactor)
Line 1: Line 1:
<noinclude>{{main|Template:Tooltip}}</noinclude>
+
; Description
Generic tooltip template.
+
: Generic tooltip template.
==Usage==
 
  
{{code|<nowiki>{{tooltip|displayed_text|tooltip_text}}</nowiki>}}
+
; Depedendencies
 +
:; Uses
 +
:: Class .uniwiki-tooltip in [[MediaWiki:Common.css]]
 +
:: Class .uniwiki-tooltip-frame in [[MediaWiki:Common.css]]
 +
:; Used by
 +
:: {{T|ShipBoxTooltip}}
  
*displayed_text : text you want to display, can be a wiki link or normal text.
+
; Syntax
*tooltip_text : text you want to display on the tooltip. There's a maximum width if you want to include images.
+
: {{T|Tooltip|displayed text|tool-tip content}}
 +
:; displayed text
 +
:: The visual text which, when hovered over, triggers the tool-tip. Can be a link.
 +
:; tool-tip content
 +
:: The contents of the tool-tip
  
==Example==
+
; Sample
 +
: {{Code|<nowiki>{{tooltip|sample display|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}</nowiki>}} gives...
 +
: {{Tooltip|sample display|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
  
{{code|<nowiki>{{tooltip|Sample Display|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}</nowiki>}}
 
will produce : {{Tooltip|Sample Display|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
 
  
==Inline Example==
+
: {{code|<nowiki>This is a sample {{Tooltip|display|Sample tool-tip content}} which is inline.</nowiki>}} gives...
 +
: This is a sample {{Tooltip|display|Sample tooltip content.}} which is inline.
  
{{code|<nowiki>This is a sample {{Tooltip|Sample Display|Sample tooltip details}} which is inline.</nowiki>}}
 
  
Will produce:
+
: {{Code|<nowiki>This is a link to the {{Tooltip|[[Venture]]|The Ventures is an {{Co|yellow|ORE}} mining frigate}}, which also has a tool-tip with some formatting.</nowiki>}} gives...
 +
: This is a link to the {{Tooltip|[[Venture]]|The Ventures is an {{Co|yellow|ORE}} mining frigate}}, which also has a tool-tip with some formatting.
  
This is a sample {{Tooltip|Sample Display|Sample tooltip details}} which is inline.
 
  
 
<includeonly>[[Category:Formatting templates]]</includeonly>
 
<includeonly>[[Category:Formatting templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 17:41, 30 April 2022

Description
Generic tooltip template.
Depedendencies
Uses
Class .uniwiki-tooltip in MediaWiki:Common.css
Class .uniwiki-tooltip-frame in MediaWiki:Common.css
Used by
{{ShipBoxTooltip}}
Syntax
{{Tooltip|<displayed text>|<tool-tip content>}}
displayed text
The visual text which, when hovered over, triggers the tool-tip. Can be a link.
tool-tip content
The contents of the tool-tip
Sample
{{tooltip|sample display|Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}}
gives...
sample displayLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


This is a sample {{Tooltip|display|Sample tool-tip content}} which is inline.
gives...
This is a sample displaySample tooltip content. which is inline.


This is a link to the {{Tooltip|[[Venture]]|The Ventures is an {{Co|yellow|ORE}} mining frigate}}, which also has a tool-tip with some formatting.
gives...
This is a link to the VentureThe Ventures is an ORE mining frigate, which also has a tool-tip with some formatting.