Відмінності між версіями «Шаблон:HoverImage»

Матеріал з Аероскан Сервіс
Перейти до: навігація, пошук
 
(не показані 37 проміжних версій 6 учасників)
Рядок 1: Рядок 1:
 
<div class="hoverbox">
 
<div class="hoverbox">
<div class="hoveritem{{#if:{{{overlay|}}}| selected}}"{{#if:{{{Overlay|}}}| style="visibility:visible; position:relative;"}}>
+
<div {{#if:{{{style|}}}|style="{{{style}}}"&nbsp;|}}class="hoveritem selected">
[[Image:{{{1}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{alt|}}}|{{!}}alt={{{alt}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}]]
+
[[File:{{{1}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{alt|}}}|{{!}}alt={{{alt}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}]]
 
</div>
 
</div>
<div class="hoveritem" style="{{#if:{{{HoverPosLeft|}}}|left: {{{HoverPosLeft}}};}} {{#if:{{{HoverPosTop|}}}|top: {{{HoverPosTop}}};}}"}}>
+
<div {{#if:{{{style|}}}|style="{{{style}}}"&nbsp;|}}class="hoveritem">
[[Image:{{{2}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{alt|}}}|{{!}}alt={{{alt}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}]]
+
[[File:{{{2}}}|link={{{L}}}{{#if:{{{link|}}}|{{!}}link={{{link}}}}}{{#if:{{{alt|}}}|{{!}}alt={{{alt}}}}}{{#if:{{{3|}}}|{{!}}{{{3}}}}}{{#if:{{{4|}}}|{{!}}{{{4}}}}}{{#if:{{{5|}}}|{{!}}{{{5}}}}}{{#if:{{{6|}}}|{{!}}{{{6}}}}}{{#if:{{{7|}}}|{{!}}{{{7}}}}}{{#if:{{{8|}}}|{{!}}{{{8}}}}}{{#if:{{{9|}}}|{{!}}{{{9}}}}}{{#if:{{{10|}}}|{{!}}{{{10}}}}}]]
 
</div>
 
</div>
 
</div>
 
</div>
<noinclude>
 
<!-- Note for template editors: The order of parameters is reversed when calling the first image so that if there are two captions given, the first is placed after the second in the parameter list. This is a trick to force to the first caption to be associated with the first image, and the second with the second -->
 
{{clear}}
 
== Documentation ==
 
This template displays an image which is replaced by another, previously hidden image when the reader hovers over it (e.g. if visual users place their mouse over the image).
 
 
Bear in mind that the casual reader may not see the hidden image, so use of this template may result in hiding information from the reader (usually a '''bad''' thing!). so this template should be used sparingly. In particular, you should avoid superimposing two completely unrelated images, as the hidden image
 
 
A reasonable use is to have two very similar images: a conventional one, and one with a particular part of the image highlighted. In this instance, a casual reader will see the normal image, but closer inspection will
 
It is intended
 
=== Examples ===
 
{| class="wikitable"
 
! Markup || Display
 
|-
 
| <nowiki>The famous picture of
 
{{HoverImage|Lenin_addressing_the_troops_-_May_5_1920_-_Altered.jpg|RedSqlenintrotsky.jpg|200px|HoverPosTop=20px}}
 
Hover over the image to see the
 
</nowiki>
 
|Here is some surrounding text
 
{{HoverImage|Lenin_addressing_the_troops_-_May_5_1920_-_Altered.jpg|RedSqlenintrotsky.jpg|200px|HoverPosTop=20px}}
 
{{Lorem}}
 
|-
 
| <pre>Here is some surrounding text
 
{{HoverImage|Gerbera_pink.jpg|Nymphaea tetragona.jpg|200px|Pink|Waterlily|thumb}}
 
{{Lorem}}</pre>
 
|Here is some surrounding text
 
{{HoverImage|Gerbera_pink.jpg|Nymphaea tetragona.jpg|200px|Pink|Waterlily|thumb}}
 
{{Lorem}}
 
|-
 
| <pre>Here is some surrounding text
 
{{HoverImage|Gerbera_pink.jpg|Nymphaea tetragona.jpg|200px|Pink|Waterlily|thumb|none}}
 
{{Lorem}}</pre>
 
|Here is some surrounding text
 
{{HoverImage|Gerbera_pink.jpg|Nymphaea tetragona.jpg|200px|Pink|Waterlily|thumb|none}}
 
{{Lorem}}
 
|}
 
=== Limitations ===
 
* No more than 8 additional parameters after the image names. This should be enough for all the [[mw:Help:images|image options]]
 
* This template my need updating if the image syntax changes (e.g. more named parameters allowed)
 
[[Category:Image Templates]]
 
</noinclude>
 

Поточна версія на 20:31, 25 травня 2015

[[File:{{{1}}}]]

[[File:{{{2}}}|link={{{L}}}]]