Difference between revisions of "Template:Multiple Image"

From Nookipedia, the Animal Crossing wiki
m
(Adding class parameters)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<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) * {{#if: {{{image5|}}} | 5 | {{#if: {{{image4|}}} | 4 | {{#if: {{{image3|}}} | 3 | 2 }} }} }} }} | {{#expr: 16 + {{{width1}}} + {{{width2}}} + {{{width3|0}}} + {{{width4|0}}} + {{{width5|0}}} + {{#if: {{{image5|}}} | 12 | {{#if: {{{image4|}}} | 8 | {{#if: {{{image3|}}} | 4 | 0 }} }} }} }} }} }}px;{{#switch: {{{align|}}} | center | centre = margin: 0 auto;}}{{#if:{{{background color|}}}|background-color:{{{background color}}};}}">
 
<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) * {{#if: {{{image5|}}} | 5 | {{#if: {{{image4|}}} | 4 | {{#if: {{{image3|}}} | 3 | 2 }} }} }} }} | {{#expr: 16 + {{{width1}}} + {{{width2}}} + {{{width3|0}}} + {{{width4|0}}} + {{{width5|0}}} + {{#if: {{{image5|}}} | 12 | {{#if: {{{image4|}}} | 8 | {{#if: {{{image3|}}} | 4 | 0 }} }} }} }} }} }}px;{{#switch: {{{align|}}} | center | centre = margin: 0 auto;}}{{#if:{{{background color|}}}|background-color:{{{background color}}};}}">
<div class="thumbinner" {{#if:{{{background color|}}}|style="background-color:{{{background color}}};"}}>
+
<div class="thumbinner" style="padding: 3px;" {{#if:{{{background color|}}}|style="background-color:{{{background color}}};"}}>
 
{{#if: {{{header|}}} | <div style="clear:both;font-weight:bold;text-align:{{{header_align|center}}};background:{{{header_background|transparent}}};">{{{header}}}</div> }}
 
{{#if: {{{header|}}} | <div style="clear:both;font-weight:bold;text-align:{{{header_align|center}}};background:{{{header_background|transparent}}};">{{{header}}}</div> }}
<div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }} }}px;"><div class="thumbimage">[[File:{{{image1}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }}px|{{{alt1|{{{footer|}}}}}}]]</div>{{#if: {{{caption1|}}} | <div class="thumbcaption" style="clear:left;">{{{caption1}}}</div>}}</div>
+
<div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }} }}px;"><div class="thumbimage">[[File:{{{image1}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width1}}} }}px|{{{alt1|{{{footer|}}}}}}|{{#if: {{{link1|}}}|link{{=}}{{{link1|}}}}}|{{#if: {{{class1|}}}|class{{=}}{{{class1|}}}}}]]</div>{{#if: {{{caption1|}}} | <div class="thumbcaption" style="clear:left;">{{{caption1}}}</div>}}</div>
<div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }} }}px;"><div class="thumbimage">[[File:{{{image2}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }}px||{{{alt2|{{{footer|}}}}}}]]</div>{{#if: {{{caption2|}}} | <div class="thumbcaption" style="clear:left;">{{{caption2}}}</div>}}</div>
+
<div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }} }}px;"><div class="thumbimage">[[File:{{{image2}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width2}}} }}px||{{{alt2|{{{footer|}}}}}}|{{#if: {{{link2|}}}|link{{=}}{{{link2|}}}}}|{{#if: {{{class2|}}}|class{{=}}{{{class2|}}}}}]]</div>{{#if: {{{caption2|}}} | <div class="thumbcaption" style="clear:left;">{{{caption2}}}</div>}}</div>
{{#if: {{{image3|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }} }}px;"><div class="thumbimage">[[File:{{{image3}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }}px|{{{alt3|{{{footer|}}}}}}]]</div>{{#if: {{{caption3|}}} | <div class="thumbcaption" style="clear:left;">{{{caption3}}}</div>}}</div>
+
{{#if: {{{image3|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }} }}px;"><div class="thumbimage">[[File:{{{image3}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width3}}} }}px|{{{alt3|{{{footer|}}}}}}|{{#if: {{{link3|}}}|link{{=}}{{{link3|}}}}}|{{#if: {{{class3|}}}|class{{=}}{{{class3|}}}}}]]</div>{{#if: {{{caption3|}}} | <div class="thumbcaption" style="clear:left;">{{{caption3}}}</div>}}</div>
{{#if: {{{image4|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }} }}px;"><div class="thumbimage">[[File:{{{image4}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }}px|{{{alt4|{{{footer|}}}}}}]]</div>{{#if: {{{caption4|}}} | <div class="thumbcaption" style="clear:left;">{{{caption4}}}</div>}}</div>
+
{{#if: {{{image4|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }} }}px;"><div class="thumbimage">[[File:{{{image4}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width4}}} }}px|{{{alt4|{{{footer|}}}}}}|{{#if: {{{link4|}}}|link{{=}}{{{link4|}}}}}|{{#if: {{{class4|}}}|class{{=}}{{{class4|}}}}}]]</div>{{#if: {{{caption4|}}} | <div class="thumbcaption" style="clear:left;">{{{caption4}}}</div>}}</div>
{{#if: {{{image5|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }} }}px;"><div class="thumbimage">[[File:{{{image5}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }}px|{{{alt5|{{{footer|}}}}}}]]</div>{{#if: {{{caption5|}}} | <div class="thumbcaption" style="clear:left;">{{{caption5}}}</div>}}</div>}}}}}}{{#if: {{{footer|}}} |
+
{{#if: {{{image5|}}} | <div {{#ifeq: {{{direction|horizontal}}} | horizontal | class="multiFloat" | class="multiVert"}} style="{{#ifeq: {{{direction|horizontal}}} | horizontal | float:left;}}margin:1px;width:{{#expr: 2 + {{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }} }}px;"><div class="thumbimage">[[File:{{{image5}}}|{{#if: {{{width|}}} | {{{width}}} | {{{width5}}} }}px|{{{alt5|{{{footer|}}}}}}|{{#if: {{{link5|}}}|link{{=}}{{{link5|}}}}}|{{#if: {{{class5|}}}|class{{=}}{{{class5|}}}}}]]</div>{{#if: {{{caption5|}}} | <div class="thumbcaption" style="clear:left;">{{{caption5}}}</div>}}</div>}}}}}}
<div class="thumbcaption" style="clear:left;background:{{{footer_background|transparent}}};">{{{footer}}}</div> }}
+
<div class="thumbcaption" style="clear:left;background:{{{footer_background|transparent}}};">{{#if:{{{footer|}}}|{{{footer|}}}|}}</div>
 
</div>
 
</div>
 
</div></includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
 
</div></includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 14:19, April 25, 2024

Template documentation (view)


This template is used for inserting up to five images in a single image box to allow for commentary on or comparison of several images at once. This template was copied from Super Mario Wiki. The original can be found here.

Usage

{{Multiple Image
|align= left/center/right
|direction= vertical/horizontal
|header= header for images
|footer= A single footer for all images
|width= size for all images, use numbers only

|image1= set an image
|link1 = links the image to a page
|alt1= hover text for a specific image
|width1= size for a specific image, use numbers only
|caption1= caption for a specific image

|image2 =
|link2 = 
|alt2 =
|width2 =
|caption2 =
}}

Examples

Two images - horizontal

{{Multiple Image
|align= left
|direction= horizontal
|footer= Tortimer's appearance in the Japanese version of {{PG|nolink}} vs. in international versions

|image1= Tortimer PG Japan.png
|width1= 150
|link1= Doubutsu no Mori
|caption1= Japan

|image2= Tortimer PG.png
|width2= 128
|link2 = Animal Crossing
|caption2= International
}}
Tortimer DnM+.png
Japan
Tortimer PG.png
International
Tortimer's appearance in the Japanese version of Animal Crossing vs. in international versions

Four images - horizontal

{{Multiple Image
|align= left
|direction= horizontal
|footer= Artwork of various players from {{NH|nolink}}

|image1= Boy 1 NH.png
|width1= 100

|image2= Girl 2 NH.png
|width2= 100

|image3= Boy 2 NH.png
|width3= 117

|image4= Girl 5 NH.png
|width4= 114
}}
Player 1 NH.png
Player 6 NH.png
Player 2 NH.png
Player 9 NH.png
Artwork of various players from Animal Crossing: New Horizons