Difference between revisions of "Template:Imagepair"

From blackwiki
Jump to navigation Jump to search
imported>Pee Tern
m (→‎Example 2: Removed extraneous new line / break.)
imported>Pee Tern
(Sub paged documentation.)
 
Line 1: Line 1:
−
<noinclude>
+
<includeonly>{| style="float:{{{float|right}}}; cellpadding:0px; cellspacing:0px; border:solid 1px #aaa;"
−
{{TOCright}}
 
−
==Purpose==
 
−
Alows a pair of images to be presented to the reader, but one at a time to save page space where there is a main image of interest, and there is typically always a second but less interesting image associated which can be optionally looked at if the reader wants to.
 
−
==Usage==
 
−
<pre>
 
−
{{imagepair
 
−
|mainimage    =
 
−
|reverseimage =
 
−
|caption      =
 
−
|float        =
 
−
|size        =
 
−
|reverse      =
 
−
}}
 
−
</pre>
 
−
or
 
−
<pre>
 
−
{{imagepair |mainimage= |reverseimage= |caption= |float= |size= |reverse= }}
 
−
</pre>
 
−
Minimum useage is:
 
−
<pre>
 
−
{{imagepair |mainimage= |reverseimage= }}
 
−
</pre>
 
−
*mainimage, mandatory, main image to be presented, image file name
 
−
*reverseimage, mandatory, reverse image to be presented at reader's discretion, image file name
 
−
*caption, optional, caption for the images, which is displayed as a heading, defaults to no heading  caption, optionally linked text
 
−
*float, optional, float the image across the page relative to other content, defaults to 'right', 'left' or 'right'
 
−
*size, optional, size of the image in pixels, defaults to 180, number
 
−
*reverse, optional, text to hint user what the other image is, defaults to 'Reverse side', optionally linked text
 
−
 
 
−
==Examples==
 
−
===Example 1===
 
−
<pre>
 
−
{{imagepair |mainimage=21 white, red rounded rectangle.svg |reverseimage=12 white, green rounded rectangle.svg
 
−
            |caption=Special Prize Medallion}}
 
−
</pre>
 
−
The main image [[Image:21 white, red rounded rectangle.svg|180px]] with reverse image [[Image:12 white, green rounded rectangle.svg|180px]] looks like {{imagepair |mainimage=21 white, red rounded rectangle.svg |reverseimage=12 white, green rounded rectangle.svg |caption=Special Prize Medallion}}
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
===Example 2===
 
−
<pre>
 
−
{{imagepair |mainimage=Hancoin1large.jpg |reverseimage=ClaudiusII CNG).jpg |float=left |size=90
 
−
            |reverse=Flip}}
 
−
</pre>
 
−
{{lorem}}
 
−
{{imagepair |mainimage=Hancoin1large.jpg |reverseimage=ClaudiusII(CNG).jpg |float=left |size=90 |reverse=Flip}}
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
 
 
−
{{lorem}}
 
−
</noinclude><includeonly>{| style="float:{{{float|right}}}; cellpadding:0px; cellspacing:0px; border:solid 1px #aaa;"
 
 
{{#if:{{{caption|}}}|
 
{{#if:{{{caption|}}}|
 
!{{{caption}}}}}
 
!{{{caption}}}}}
Line 71: Line 11:
 
| style="border-top:solid 1px #aaa;" |[[Image:{{{reverseimage}}}|{{{size|180}}}px|{{{reversecaption|Reverse view}}}]]
 
| style="border-top:solid 1px #aaa;" |[[Image:{{{reverseimage}}}|{{{size|180}}}px|{{{reversecaption|Reverse view}}}]]
 
|}
 
|}
−
|}<includeonly>
+
|}</includeonly><noinclude>
 +
{{documentation}}</noinclude>

Latest revision as of 03:21, 23 October 2008

Template documentation[view] [edit] [history] [purge]

Template:TOCright

Purpose

Allows a pair of images to be presented to the reader, but one at a time to save page space where there is a main image of interest, and there is typically always a second but less interesting image associated which can be optionally looked at if the reader wants to.

Usage

{{imagepair
|mainimage    = 
|reverseimage = 
|caption      =
|float        = 
|size         = 
|reverse      = 
}}

or

{{imagepair |mainimage= |reverseimage= |caption= |float= |size= |reverse= }}

Minimum usage is:

{{imagepair |mainimage= |reverseimage= }}
  • mainimage, mandatory, main image to be presented, image file name
  • reverseimage, mandatory, reverse image to be presented at reader's discretion, image file name
  • caption, optional, caption for the images, which is displayed as a heading, defaults to no heading caption, optionally linked text
  • float, optional, float the image across the page relative to other content, defaults to 'right', 'left' or 'right'
  • size, optional, size of the image in pixels, defaults to 180, number
  • reverse, optional, text to hint user what the other image is, defaults to 'Reverse side', optionally linked text

Examples

Example 1

{{imagepair |mainimage=21 white, red rounded rectangle.svg |reverseimage=12 white, green rounded rectangle.svg
            |caption=Special Prize Medallion}}

The main image 180px with reverse image 180px looks like

Special Prize Medallion
Main view

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Example 2

{{imagepair |mainimage=Hancoin1large.jpg |reverseimage=ClaudiusII CNG).jpg |float=left |size=90
            |reverse=Flip}}

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Main view

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.

Lorem ipsum dolor sit amet, consectetur adipiscing 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.