Jump to content

Template:Hover: Difference between revisions

m
divhides hate this one weird "center"!
m (docs: you can use the named colors too, so let's reflect that in the sample usage)
m (divhides hate this one weird "center"!)
 
Line 1: Line 1:
<includeonly><span class="has_popup" style="border-bottom:{{#ifeq:{{{secret|no}}}|yes|none|1px dotted}};">{{{1}}}<span class="popup" style="z-index:5; width:{{{width|{{#if:{{{text|}}}|150px|-1px}} }}}; padding:{{{padding|5px}}}; background-color:{{{bgcolor|#FFFFFF}}}; border:1px solid #DDDDDD; top:14px; text-align:center;">{{#if:{{{image|}}}|[[Image:{{{image|Buramu!.jpg}}}|{{{width|-1px}}}|center|{{#if:{{{link|}}}|{{#ifeq:{{{link|}}}|&empty;|link=|link={{{link}}} }} }}]]|{{{text|No text supplied!}}} }}</span></span></includeonly><noinclude>The '''Hover''' template is for popping up text or an image under the cursor when some text is hovered over by the reader. The text which should be hovered over is given first as an unnamed parameter. Then you pass either the parameter "text" with the desired popup text or "image" with the name of an image (no "<nowiki>[[Image:__]]</nowiki>" wrapper, just the file name). You cannot use both parameters. You can also control the padding with "padding" (specify the units, e.g. "5px") and background color with "bgcolor" (e.g. "#0C0C0C" or "purple").
<includeonly><span class="has_popup" style="border-bottom:{{#ifeq:{{{secret|no}}}|yes|none|1px dotted}};">{{{1}}}<span class="popup" style="z-index:5; width:{{{width|{{#if:{{{text|}}}|150px|-1px}} }}}; padding:{{{padding|5px}}}; background-color:{{{bgcolor|#FFFFFF}}}; border:1px solid #DDDDDD; top:14px; text-align:center;">{{#if:{{{image|}}}|[[Image:{{{image|Buramu!.jpg}}}|{{{width|-1px}}}|{{#if:{{{link|}}}|{{#ifeq:{{{link|}}}|&empty;|link=|link={{{link}}} }} }}]]|{{{text|No text supplied!}}} }}</span></span></includeonly><noinclude>
The '''Hover''' template is for popping up text or an image under the cursor when some text is hovered over by the reader. The text which should be hovered over is given first as an unnamed parameter. Then you pass either the parameter "text" with the desired popup text or "image" with the name of an image (no "<nowiki>[[Image:__]]</nowiki>" wrapper, just the file name). You cannot use both parameters. You can also control the padding with "padding" (specify the units, e.g. "5px") and background color with "bgcolor" (e.g. "#0C0C0C" or "purple").


You have the following additional options if providing a text popup:
You have the following additional options if providing a text popup: