Jump to content

Template:Infobox: Difference between revisions

From MicroVault
Created page with "<includeonly> <div class="infobox" style="width:{{{width|300px}}}; font-size:90%; border:1px solid #aaa; background:#f9f9f9; padding:5px; float:right; clear:right; margin:0 0 1em 1em;"> <!-- Title --> <div style="{{{titlestyle|background:#e9e9e9; font-size:125%; font-weight:bold; text-align:center; padding:4px;}}}"> {{{above|}}} </div> <!-- Main image --> {{#if:{{{image|}}}| <div style="text-align:center; margin:6px 0;"> [[File:{{{image}}}|{{{imagesize|250px}}}]] {{#if..."
 
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<div class="infobox" style="width:{{{width|300px}}}; font-size:90%; border:1px solid #aaa; background:#f9f9f9; padding:5px; float:right; clear:right; margin:0 0 1em 1em;">
<table class="infobox" style="width:{{{width|250px}}}; font-size:90%; border:1px solid #aaa; background:#f9f9f9; padding:0; float:right; clear:right; margin:0 0 1em 1em;">


<!-- Title -->
<!-- Title -->
<div style="{{{titlestyle|background:#e9e9e9; font-size:125%; font-weight:bold; text-align:center; padding:4px;}}}">
{{#if:{{{title|{{{above|}}}}}}|
{{{above|}}}
<tr>
</div>
<th colspan="2" style="{{{titlestyle|background:#e9e9e9; font-size:120%; padding:4px; text-align:center;}}}">{{{title|{{{above}}}}}}</th>
 
</tr>
<!-- Main image -->
{{#if:{{{image|}}}|
<div style="text-align:center; margin:6px 0;">
[[File:{{{image}}}|{{{imagesize|250px}}}]]
{{#if:{{{caption|}}}|<div style="font-size:85%;">{{{caption}}}</div>|}}
</div>
}}
}}


<!-- Second image -->
<!-- Body inserted by child templates -->
{{#if:{{{image2|}}}|
<div style="text-align:center; margin:6px 0;">
[[File:{{{image2}}}|{{{image2size|150px}}}]]
{{#if:{{{caption2|}}}|<div style="font-size:85%;">{{{caption2}}}</div>|}}
</div>
}}
 
<!-- Body fields -->
<table style="width:100%; border-collapse:collapse;">
{{{body|}}}
{{{body|}}}
<!-- Automatic label/data pairs -->
{{#if:{{{label1|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label1}}}</th><td style="padding:3px;">{{{data1}}}</td></tr>|}}
{{#if:{{{label2|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label2}}}</th><td style="padding:3px;">{{{data2}}}</td></tr>|}}
{{#if:{{{label3|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label3}}}</th><td style="padding:3px;">{{{data3}}}</td></tr>|}}
{{#if:{{{label4|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label4}}}</th><td style="padding:3px;">{{{data4}}}</td></tr>|}}
{{#if:{{{label5|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label5}}}</th><td style="padding:3px;">{{{data5}}}</td></tr>|}}
{{#if:{{{label6|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label6}}}</th><td style="padding:3px;">{{{data6}}}</td></tr>|}}
{{#if:{{{label7|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label7}}}</th><td style="padding:3px;">{{{data7}}}</td></tr>|}}
{{#if:{{{label8|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label8}}}</th><td style="padding:3px;">{{{data8}}}</td></tr>|}}
{{#if:{{{label9|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label9}}}</th><td style="padding:3px;">{{{data9}}}</td></tr>|}}
{{#if:{{{label10|}}}|<tr><th style="text-align:left; padding:3px; background:#eee;">{{{label10}}}</th><td style="padding:3px;">{{{data10}}}</td></tr>|}}


</table>
</table>
</div>
</includeonly>
</includeonly>


<noinclude>
<noinclude>
'''Template:Infobox'''
This is the base Infobox template.
 
Base template for infoboxes.
 
Usage example:
<pre>
{{Infobox
| above = Example Title
| image = Example.png
| caption = Example Caption
 
| label1 = Foo
| data1  = Bar
 
| label2 = Baz
| data2  = Qux
}}
</pre>
</noinclude>
</noinclude>

Revision as of 00:45, 19 November 2025


This is the base Infobox template.