Template:Multiple image: Difference between revisions
From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
(like that?) |
m (Text replacement - "Category:Formatting templates" to "Category:Structural templates") |
||
(46 intermediate revisions by 14 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="thumb {{#switch: {{{align|}}} | left = tleft | center | centre = tnone | tright}}" style="width:{{#ifeq: {{{direction|horizontal}}} | vertical | {{#expr: {{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }} + 12}} | {{#if: {{{width|}}} | {{#expr: 8 + ({{{width|0}}} + 4) * {{# | <includeonly><div class="thumb {{#switch:{{{align|}}}|left=tleft|center|centre=tnone|tright}}" style="max-width:{{#ifeq:{{{direction|horizontal}}}|vertical|{{#expr:{{#if:{{{width|}}}|{{{width}}}|{{{width1}}}}} + 12}}|{{#if:{{{width|}}}|{{#expr:8 + ({{{width|0}}} + 4) * (0 {{#forargs:image|key|value|+ 1}})}}|{{#expr:8 {{#forargs:width|key|value|+ {{#var:value}}}} {{#forargs:image|key|value|+ 4}}}}}}}}px;{{#switch:{{{align|}}}|center|centre=margin-left:auto;margin-right:auto}}"> | ||
<div class="thumbinner" | <div class="thumbinner multiFloatContainer"> | ||
{{# | {{#forargs:image|key|value|<div {{#ifeq:{{{direction|horizontal}}}|horizontal|class="multiFloat"|class="multiVert"}} style="{{#ifeq:{{{direction|horizontal}}}|horizontal|float:left;}}margin:1px;width:{{#expr:2 + {{#if:{{{width|}}}|{{{width}}}|{{{width{{#var:key}}}}}}}}}px"><div class="thumbimage">[[File:{{#var:value}}|{{#if:{{{width|}}}|{{{width}}}|{{{width{{#var:key}}}}}}}px|{{{alt{{#var:key}}|{{{footer|}}}}}}]]</div>{{#if:{{{caption{{#var:key}}|}}}|<div class="thumbcaption" style="clear:left">{{{caption{{#var:key}}}}}</div>}}</div>}} | ||
<div | {{#if:{{{footer|}}}|<div class="thumbcaption" style="clear:left;background:{{{footer_background|transparent}}}">{{{footer}}}</div>}} | ||
</div></div></includeonly><noinclude> | |||
{| style="width:100%" | |||
|- bgcolor="gainsboro" | |||
{{# | ! colspan="2" | Basic usage | ||
{{#if: {{{footer|}}} | <div class="thumbcaption" style="clear:left | |||
</div> | |||
</div></includeonly><noinclude> | |||
{| | |||
|- bgcolor=gainsboro | |||
! colspan=2 | Basic | |||
|- | |- | ||
| colspan=2 | | | colspan="2" | | ||
The multiple image template allows to set two or more images at the same time in a image box, | The multiple image template allows you to set two or more images at the same time in a image box, similar to a gallery but without wasting space. You can use unlimited images arranged in a row either horizontally or vertically. Combine the next features to create your own gallery this time! You can [[wikipedia:Template:Multiple image|go here]] to see more advanced results or to the {{tem|multiframe}} template where the images share the same image frame. | ||
<pre | <pre> | ||
{{multiple image | {{multiple image | ||
|align = left/center/right | |align=left/center/right (right by default) | ||
|direction = vertical/horizontal | |direction=vertical/horizontal (horizontal by default) | ||
| | |width=size for all the pictures, use numbers only | ||
|footer = A single footer for all the pics | |footer=A single footer for all the pics | ||
| image1 = set a | |image1=set a pic | ||
|width1=size for an specific picture, use numbers only | |||
| width1 = size for an specific picture, use numbers only | |caption1=caption for an specific picture | ||
|caption1 = caption for an specific picture | |alt1=alternate text for pic | ||
| image2 = | |image2= | ||
| | |width2= | ||
| | |caption2= | ||
| | |alt2= | ||
}} | }} | ||
</pre> | </pre> | ||
|- | |- | ||
! colspan=2 bgcolor=gainsboro | Examples | ! colspan="2" bgcolor="gainsboro" | Examples | ||
|- bgcolor=gainsboro | |- bgcolor="gainsboro" | ||
!width=50% |Example 1 | ! width="50%" | Example 1 | ||
!width= 50%|Result | ! width="50%" | Result | ||
|- | |- | ||
| | | | ||
<pre | <pre> | ||
{{multiple image | {{multiple image | ||
|align = center | |align=center | ||
| | |width=100 | ||
|footer = Two Koopa | |footer=Two Koopa shells | ||
| image1 = | |image1=MKW Green Shell Artwork.png | ||
| alt1 = | |alt1=Green shell | ||
| image2 = | |image2=MKW Red Shell Artwork.png | ||
| alt2 = | |alt2=Red shell | ||
}} | }} | ||
</pre> | </pre> | ||
| | | | ||
{{multiple image | {{multiple image | ||
|align = center | |align=center | ||
| | |width=100 | ||
|footer = Two Koopa | |footer=Two Koopa shells | ||
| image1 = | |image1=MKW Green Shell Artwork.png | ||
| alt1 = | |alt1=Green shell | ||
| image2 = | |image2=MKW Red Shell Artwork.png | ||
| alt2 = | |alt2=Red shell | ||
}} | }} | ||
|- bgcolor=gainsboro | |- bgcolor=gainsboro | ||
Line 75: | Line 66: | ||
|- | |- | ||
| | | | ||
<pre | <pre> | ||
{{multiple image | {{multiple image | ||
|align = center | |align=center | ||
|direction =vertical | |direction=vertical | ||
|footer = The Mario Bros. | |width=100 | ||
|footer=The Mario Bros. | |||
| image1 = | |image1=NSMBW Mario Solo Artwork.png | ||
| alt1 = Mario | |alt1=Mario | ||
| image2 = | |image2=NSMBW Luigi Solo Artwork.png | ||
| alt2 = Luigi | |alt2=Luigi | ||
}} | }} | ||
</pre> | </pre> | ||
| | | | ||
{{multiple image | {{multiple image | ||
|align = center | |align=center | ||
|direction = vertical | |direction=vertical | ||
|footer = The Mario Bros. | |width=100 | ||
|footer=The Mario Bros. | |||
| image1 = | |image1=NSMBW Mario Solo Artwork.png | ||
| alt1 = Mario | |alt1=Mario | ||
| image2 = | |image2=NSMBW Luigi Solo Artwork.png | ||
| alt2 = Luigi | |alt2=Luigi | ||
}} | }} | ||
|- bgcolor=gainsboro | |- bgcolor=gainsboro | ||
Line 107: | Line 98: | ||
|- | |- | ||
| | | | ||
<pre | <pre> | ||
{{multiple image | {{multiple image | ||
|footer=''Super Mario'' characters | |||
|footer = | |||
| image1 = | |image1=NSMBW Mario Solo Artwork.png | ||
| | |width1=83 | ||
| | |caption1=Mario | ||
| | |alt1=The plumber | ||
| image2 = | |image2=NSMBW Luigi Solo Artwork.png | ||
| | |width2=72 | ||
| | |caption2=Luigi | ||
| | |alt2=Mario's younger brother | ||
| image3 = NSMBWiiPeach.png | |image3=NSMBWiiPeach.png | ||
|width3=72 | |||
| width3 = | |caption3=Princess Peach | ||
|caption3 = Princess Peach | |alt3=Damsel in distress | ||
| image4 = | |image4=NSMBW Bowser Artwork.png | ||
| | |width4=97 | ||
| | |caption4=Bowser | ||
| | |alt4=King Koopa | ||
}} | }} | ||
</pre> | </pre> | ||
| | | | ||
{{multiple image | {{multiple image | ||
|footer=''Super Mario'' characters | |||
|footer = | |||
| image1 = | |image1=NSMBW Mario Solo Artwork.png | ||
| | |width1=83 | ||
| | |caption1=Mario | ||
| | |alt1=The plumber | ||
| image2 = | |image2=NSMBW Luigi Solo Artwork.png | ||
| | |width2=72 | ||
| | |caption2=Luigi | ||
| | |alt2=Mario's younger brother | ||
| image3 = | |image3=NSMBW Peach Artwork.png | ||
|width3=72 | |||
| width3 = | |caption3=Princess Peach | ||
|caption3 = Princess Peach | |alt3=Damsel in distress | ||
| image4 = | |image4=NSMBW Bowser Artwork.png | ||
| | |width4=97 | ||
| | |caption4=Bowser | ||
| | |alt4=King Koopa | ||
}} | }} | ||
|} | |} | ||
</noinclude> | |||
[[Category:Structural templates]]</noinclude> |
Latest revision as of 11:07, May 31, 2024
Basic usage | |
---|---|
The multiple image template allows you to set two or more images at the same time in a image box, similar to a gallery but without wasting space. You can use unlimited images arranged in a row either horizontally or vertically. Combine the next features to create your own gallery this time! You can go here to see more advanced results or to the {{multiframe}} template where the images share the same image frame. {{multiple image |align=left/center/right (right by default) |direction=vertical/horizontal (horizontal by default) |width=size for all the pictures, use numbers only |footer=A single footer for all the pics |image1=set a pic |width1=size for an specific picture, use numbers only |caption1=caption for an specific picture |alt1=alternate text for pic |image2= |width2= |caption2= |alt2= }} | |
Examples | |
Example 1 | Result |
{{multiple image |align=center |width=100 |footer=Two Koopa shells |image1=MKW Green Shell Artwork.png |alt1=Green shell |image2=MKW Red Shell Artwork.png |alt2=Red shell }} |
|
Example 2 | Result |
{{multiple image |align=center |direction=vertical |width=100 |footer=The Mario Bros. |image1=NSMBW Mario Solo Artwork.png |alt1=Mario |image2=NSMBW Luigi Solo Artwork.png |alt2=Luigi }} |
|
Example 3 | Result |
{{multiple image |footer=''Super Mario'' characters |image1=NSMBW Mario Solo Artwork.png |width1=83 |caption1=Mario |alt1=The plumber |image2=NSMBW Luigi Solo Artwork.png |width2=72 |caption2=Luigi |alt2=Mario's younger brother |image3=NSMBWiiPeach.png |width3=72 |caption3=Princess Peach |alt3=Damsel in distress |image4=NSMBW Bowser Artwork.png |width4=97 |caption4=Bowser |alt4=King Koopa }} |