Template:Hover info: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(minor corrections on examples)
(reworked the template)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{link}}}|yes|[[{{{2}}}|<span title="{{{1}}}" {{#ifeq:{{{dotted|yes}}}|no||style="border-bottom:1px dotted"}}>{{{2}}}</span>]]|<span title="{{{1}}}" {{#ifeq:{{{dotted|yes}}}|no||style="border-bottom:1px dotted"}}>{{{2}}}</span>}}</includeonly><noinclude>This template takes two parameters (link=yes/no and dotted=yes/no), and creates underlined text with a hover box for many modern browsers supporting CSS.
<onlyinclude><includeonly>{{#if:{{{link|}}}|[[{{{link}}}|<span style="border-bottom:1px {{{line|}}}" title="{{{1}}}">{{{2|{{{link}}}}}}</span>]]|<span style="border-bottom:1px {{{line|}}}" title="{{{1}}}">{{{2}}}</span>}}</includeonly></onlyinclude>


'''Examples:'''
==Examples==
Example: <nowiki>{{Hover info|This is mouse-over text|Hover here}}</nowiki>


Default
Result: {{Hover info|This is mouse-over text|Hover here}}


''Syntax:'' <nowiki>{{Hover info|This is mouse-over text|Hover here}}</nowiki>


Result: {{Hover info|This is mouse-over text|Hover here}}
Example: <nowiki>{{Hover info|line=dashed|This is mouse-over text|Hover here}}</nowiki>
 
Result: {{Hover info|line=dashed|This is mouse-over text|Hover here}}




''Syntax:'' <nowiki>{{Hover info|link=yes|This link will take you to the Main page|Main_Page}}</nowiki>
Example: <nowiki>{{Hover info|line=dotted|link=Main Page|This is mouse-over text}}</nowiki>


Result: {{Hover info|link=yes|This link will take you to the Main page|Main_Page}}
Result: {{Hover info|line=dotted|link=Main Page|This is mouse-over text}}




''Syntax:'' <nowiki>{{Hover info|dotted=no|This is mouse-over text|Hover here}}</nowiki>
Example: <nowiki>{{Hover info|line=dotted|link=Main Page|This is mouse-over text|Hover here}}</nowiki>


Result: {{Hover info|dotted=no|This is mouse-over text|Hover here}}
Result: {{Hover info|line=dotted|link=Main Page|This is mouse-over text|Hover here}}




''Syntax:'' <nowiki>{{Hover info|link=yes|dotted=no|This link will take you to the Main page|Main_Page}}</nowiki>
Example: <nowiki>{{Hover info|line=solid|This is mouse-over text|Hover here}}</nowiki>


Result: {{Hover info|link=yes|dotted=no|This link will take you to the Main page|Main_Page}} (with link)
Result: {{Hover info|line=solid|This is mouse-over text|Hover here}}




Note: Who ever made it that the (with link) right there doesn't work how I wanted it to be, could you please fix it and tell me what the issue was because, I was trying to find out, please help!!
Example: <nowiki>{{Hover info|line=; border:2px solid #BD0; color:orange|This is mouse-over text|Hover here}}</nowiki>


</noinclude>
Result: {{Hover info|line=; border:2px solid #BD0; color:orange|This is mouse-over text|Hover here}}

Revision as of 11:25, 18 May 2022


Examples

Example: {{Hover info|This is mouse-over text|Hover here}}

Result: Hover here


Example: {{Hover info|line=dashed|This is mouse-over text|Hover here}}

Result: Hover here


Example: {{Hover info|line=dotted|link=Main Page|This is mouse-over text}}

Result: Main Page


Example: {{Hover info|line=dotted|link=Main Page|This is mouse-over text|Hover here}}

Result: Hover here


Example: {{Hover info|line=solid|This is mouse-over text|Hover here}}

Result: Hover here


Example: {{Hover info|line=; border:2px solid #BD0; color:orange|This is mouse-over text|Hover here}}

Result: Hover here