Difference between revisions of "Template:Double image"

From Chevy Wiki
Jump to navigation Jump to search
(uploaded "Image:Chevrolet Beat concept right side.jpg": Importing image file)
m (1 revision)
 
Line 1: Line 1:
<strong class="error">This template must be [[Wikipedia:Template substitution|substituted]]. Replace {{#switch:{{{1}}}|prod=<nowiki>{{prod|reason}} with {{subst:prod|reason}}</nowiki>|#default=<nowiki>{{</nowiki>{{{1}}}<nowiki>}} with {{</nowiki>subst:{{{1}}}<nowiki>}}</nowiki>}}.</strong><noinclude>{{pp-template|small=yes}}
<includeonly>{{#switch: {{{1|}}} <!-- first parameter inserts a <div> with a left, right or central float -->
{{documentation}}</noinclude>
| left = <div class="thumb tleft">
| right = <div class="thumb tright">
| center|centre = <div class="center"><div class="thumb tnone">
| #default = <div class="thumb tright">
}}<div class="thumbinner" style="width:{{#expr: {{{3|0}}} + {{{5|0}}} + 8}}px;">  <!-- calculate width based on image widths +8px -->
{| style="background: transparent; border: 0; padding: 0; margin: 0; width:{{#expr: {{{3|0}}} + {{{5|0}}} + 4}}px;" cellspacing="0"
|-
| style="padding: auto; margin: 0;" class="thumbimage" | [[Image:{{{2}}}|{{{3}}}px|{{{6|}}}]]  <!-- image 1 -->
| style="padding: 0; margin: 0; border: 0; width: 2px" |
| style="padding: auto; margin: 0;" class="thumbimage" | [[Image:{{{4}}}|{{{5}}}px|{{{6|}}}]]  <!-- image 2 -->
|- style="vertical-align:top;"
{{#if: {{{7|}}} |    <!-- two captions if the seventh param (caption for title two) is specified -->
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}} <div class="thumbcaption">{{{6|}}}</div>
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}}
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}} <div class="thumbcaption">{{{7|}}}</div>
|  <!-- otherwise just have one caption underneath both images -->
{{!}} style="padding: 0; margin: 0; border: 0;" colspan="3" {{!}} <div class="thumbcaption">{{{6|}}}</div>
}}
|}
</div>
{{#switch: {{{1|}}}  <!-- as central image float needs two divs, need to close two for center and only one for left/right -->
| center|centre = </div></div>
| </div>
}}</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 15:12, 3 February 2009

[edit] Template-info.svg Template documentation

Usage

This template creates a box with two images side by side. It needs parameters like this:

{{double image|left/right/center|Left image|Left image size|Right image|Right image size|Left caption|[Right caption]}}

Examples

Players are cautioned with a yellow card, and sent off with a red card, which is sometimes round. Players are cautioned with a yellow card, and sent off with a red card, which is sometimes round.
Players are cautioned with a yellow card, and sent off with a red card, which is sometimes round.

To the right, with one single caption:

{{double image|right|Yellow card.svg|60|Red card.svg|60|Players are cautioned...}}


Yellow Yellow
Yellow
Red

To the left. With two captions, one beneath each image:

{{double image|left|Yellow card.svg|60|Red card.svg|60|Yellow|Red}}

See also

da:Skabelon:Dobbelt billede ja:Template:Double image aside it:Template:Doppia immagine zh:Template:2images sv:Mall:Dubbel bild