Template:Infobox military conflict: Difference between revisions

Template page
(Created page with "{{#if:{{{campaignbox|}}} |<table style="float:right; clear:right; background: transparent; margin: 0; padding: 0;"> <tr><td> }}<table {{WPMILHIST Infobox style|main_box|vevent...")
 
m (Adding styles to infobox)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#if:{{{campaignbox|}}}
<includeonly><templatestyles src="Template:Infobox/styles.css"/>{{#invoke:Infobox military conflict|main}}</includeonly><noinclude>
|<table style="float:right; clear:right; background: transparent; margin: 0; padding: 0;">
Usage:
<tr><td>
<nowiki>{{Infobox military conflict
}}<table {{WPMILHIST Infobox style|main_box|vevent}}>
| conflict    =
<tr>
| partof      =
<th class="summary" colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>{{{conflict|{{PAGENAME}}}}}
| image      =
</th>
| image_size  =
</tr>
| alt        =
{{#if:{{{partof|}}}
| caption    =
|<tr>
| date        =
<td colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|sub_header_bar}}>Part of {{{partof}}}
| place      =
</td>
| map_type    =
</tr>
| map_relief  =
}}{{#if:{{{image|}}}
| map_size    =  
|<tr>
| map_marksize =
<td colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|image_box}}>{{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1|alt={{{alt|}}}}}{{#if:{{{caption|}}}|<br />{{{caption}}}}}
| map_caption =
</td>
| map_label  =
</tr>
| territory  =
}}<tr>
| result      =
<td colspan="{{#if:{{{combatant3|}}}|3|2}}">
| status      =
<table style="width:100%; margin:0; padding:0; border:0">
| combatants_header =
{{#if:{{{date|}}}
| combatant1  =
|<tr>
| combatant2  =  
<th style="padding-right:1em">Date</th>
| combatant3 =
<td>{{{date}}}
| commander1  =
</td>
| commander2  =
</tr>
| commander3  =
}}<tr>
| units1      =
<th style="padding-right:1em">Location</th>
| units2      =
<td><span class="location">{{{place}}}</span>{{#if:{{both|{{{place|}}}|{{{coordinates|}}}}}|<br />}}{{{coordinates|}}}
| units3      =  
</td>
| strength1  =
</tr>{{#if:{{{status|}}}{{{result|}}}
| strength2  =  
|<tr>
| strength3  =
<th style="padding-right:1em">{{#if:{{{status|}}}|Status|Result}}</th>
| casualties1 =  
<td>{{#if:{{{status|}}}|{{{status}}}|{{{result}}}}}
| casualties2 =  
</td>
| casualties3 =  
</tr>
| notes      =
}}
| campaignbox =
{{#if:{{{territory|}}}
}}</nowiki>
|<tr>
 
<th style="padding-right:1em">Territorial<br/>changes</th>
The combatant and commander parameters can be expanded through letters a, b, c, etc. if necessary. Example:
<td>{{{territory}}}
<nowiki>{{Infobox military conflict
</td>
| conflict    = Conflict name
</tr>
| partof      = Larger war
}}
| image      = File:Algeria map.png
| image_size  =
| alt        =
| caption    = Map of Algeria as an example
| date        = Date
| place      = Place
| map_type    =
| map_relief  =
| map_size    =  
| map_marksize =
| map_caption =
| map_label  =
| territory  =
| result      =  
| status      =  
| combatants_header =
| combatant1  = 1st combatant
| combatant1a = 1st combatant ally 1
| combatant1b = 1st combatant ally 2
| combatant1c = 1st combatant ally 3
| combatant2  = 2nd combatant
| combatant2a = 2nd combatant ally 1
| combatant2b = 2nd combatant ally 2
| commander1  = 1st commander
| commander1a = 1st commander ally
| commander2  =  
| commander3  =
| units1      =
| units2      =
| units3      =
| strength1  =
| strength2  =
| strength3  =
| casualties1 =
| casualties2 =
| casualties3 =
| notes      =
| campaignbox =  
}}</nowiki>


Produces:


</table></td>
{{Infobox military conflict
</tr>{{#if:{{{combatant1|}}}{{{combatant2|}}}{{{combatant3|}}}
| conflict    = Conflict name
|<tr>
| partof      = Larger war
<th colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>{{#if:{{{combatants_header|}}}|{{{combatants_header|}}}|Belligerents}}</th>
| image      = File:Algeria map.png
</tr><tr>
| image_size  =
<td {{#if:{{{combatant2|}}}|{{#if:{{{combatant3|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}}"}}|colspan="2"}}>{{{combatant1|}}}
| alt        =
</td>{{#if:{{{combatant2|}}}
| caption    = Map of Algeria as an example
|<td {{#if:{{{combatant3|}}}|style="width:33%; padding-left:0.25em"|style="width:50%; padding-left:0.25em"}}>{{{combatant2}}}
| date        = Date
</td>}}{{#if:{{{combatant3|}}}
| place      = Place
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}}">{{{combatant3}}}
| map_type    =  
</td>}}
| map_relief  =  
</tr>
| map_size    =  
}}{{#if:{{{combatant1a|}}}{{{combatant2a|}}}{{{combatant3a|}}}
| map_marksize =
|<tr>
| map_caption =  
<td {{#if:{{{combatant2a|}}}|{{#if:{{{combatant3a|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"}}|colspan="2"}}>{{{combatant1a|}}}
| map_label  =  
</td>{{#if:{{{combatant2a|}}}
| territory  =  
|<td {{#if:{{{combatant3a|}}}|style="width:33%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"}}>{{{combatant2a}}}
| result      =  
</td>}}{{#if:{{{combatant3a|}}}
| status      =  
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}">{{{combatant3a}}}
| combatants_header =  
</td>}}
| combatant1  = Country
</tr>
| combatant1a = First combatant ally 1
}}{{#if:{{{combatant1b|}}}{{{combatant2b|}}}{{{combatant3b|}}}
| combatant1b = First combatant ally 2
|<tr>
| combatant1c = First combatant ally 3
<td {{#if:{{{combatant2b|}}}|{{#if:{{{combatant3b|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"}}|colspan="2"}}>{{{combatant1b|}}}
| combatant2  = Rival country
</td>{{#if:{{{combatant2b|}}}
| combatant2a = Second combatant ally 1
|<td {{#if:{{{combatant3b|}}}|style="width:33%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"}}>{{{combatant2b}}}
| combatant2b = Second combatant ally 2
</td>}}{{#if:{{{combatant3b|}}}
| commander1  = First commander
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}">{{{combatant3b}}}
| commander1a = First commander ally
</td>}}
| commander2  =  
</tr>
| commander3 =  
}}{{#if:{{{combatant1c|}}}{{{combatant2c|}}}{{{combatant3c|}}}
| units1      =  
|<tr>
| units2      =  
<td {{#if:{{{combatant2c|}}}|{{#if:{{{combatant3c|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"}}|colspan="2"}}>{{{combatant1c|}}}
| units3     =  
</td>{{#if:{{{combatant2c|}}}|
| strength1  =  
<td {{#if:{{{combatant3c|}}}|style="width:33%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"}}>{{{combatant2c}}}
| strength2   =  
</td>}}{{#if:{{{combatant3c|}}}
| strength3   =
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}">{{{combatant3c}}}
| casualties1 =  
</td>}}
| casualties2 =  
</tr>
| casualties3 =  
}}{{#if:{{{combatant1d|}}}{{{combatant2d|}}}{{{combatant3d|}}}
| notes       =  
|<tr>
| campaignbox =
<td {{#if:{{{combatant2d|}}}|{{#if:{{{combatant3d|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}"}}|colspan="2"}}>{{{combatant1d|}}}
}}
</td>{{#if:{{{combatant2d|}}}
|<td {{#if:{{{combatant3d|}}}|style="width:33%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; padding-left:0.25em; border-top:{{WPMILHIST Infobox style|internal_border}}"}}>{{{combatant2d}}}
</td>}}{{#if:{{{combatant3d|}}}
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}} border-top:{{WPMILHIST Infobox style|internal_border}}">{{{combatant3d}}}
</td>}}
</tr>
}}{{#if:{{{commander1|}}}{{{commander2|}}}{{{commander3|}}}
|<tr>
<th colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>Commanders and leaders</th>
</tr><tr>
<td {{#if:{{{combatant3|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}}"}}>{{{commander1|}}}
</td><td {{#if:{{{combatant3|}}}|style="width:33%; padding-left:0.25em"|style="width:50%; padding-left:0.25em"}}>{{{commander2|}}}
</td>{{#if:{{{combatant3|}}}
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}}">{{{commander3|}}}
</td>}}
</tr>
}}{{#if:{{{units1|}}}{{{units2|}}}{{{units3|}}}
|<tr>
<th colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>Units involved</th>
</tr><tr>
<td {{#if:{{{combatant3|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}}"}}>{{{units1|}}}
</td><td {{#if:{{{combatant3|}}}|style="width:33%; padding-left:0.25em"|style="width:50%; padding-left:0.25em"}}>{{{units2|}}}
</td>{{#if:{{{combatant3|}}}
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}}">{{{units3|}}}
</td>}}
</tr>
}}{{#if:{{{strength1|}}}{{{strength2|}}}{{{strength3|}}}
|<tr>
<th colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>Strength</th>
</tr><tr>
<td {{#if:{{{combatant3|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}}"}}>{{{strength1|}}}
</td><td {{#if:{{{combatant3|}}}|style="width:33%; padding-left:0.25em"|style="width:50%; padding-left:0.25em"}}>{{{strength2|}}}
</td>{{#if:{{{combatant3|}}}
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}}">{{{strength3|}}}
</td>}}
</tr>
}}{{#if:{{{combatant3|}}}
|<!-- -->|{{#if:{{{strength3|}}}
|<tr>
<td colspan="2" style="text-align:center; {{#if:{{{strength1|}}}{{{strength2|}}}|border-top:{{WPMILHIST Infobox style|internal_border}}}}">{{{strength3}}}
</td>
</tr>
}}}}{{#if:{{{casualties1|}}}{{{casualties2|}}}{{{casualties3|}}}
|<tr>
<th colspan="{{#if:{{{combatant3|}}}|3|2}}" {{WPMILHIST Infobox style|header_bar}}>Casualties and losses</th>
</tr><tr>
<td {{#if:{{{combatant3|}}}|style="width:33%; border-right:{{WPMILHIST Infobox style|internal_border}}"|style="width:50%; border-right:{{WPMILHIST Infobox style|internal_border}}"}}>{{{casualties1|}}}
</td><td {{#if:{{{combatant3|}}}|style="width:33%; padding-left:0.25em"|style="width:50%; padding-left:0.25em"}}>{{{casualties2|}}}
</td>{{#if:{{{combatant3|}}}
|<td style="width:33%; padding-left:0.25em; border-left:{{WPMILHIST Infobox style|internal_border}}">{{{casualties3|}}}
</td>}}
</tr>
}}{{#if:{{{combatant3|}}}
|<!-- -->|{{#if:{{{casualties3|}}}
|<tr>
<td colspan="2" style="text-align:center; {{#if:{{{casualties1|}}}{{{casualties2|}}}|border-top:{{WPMILHIST Infobox style|internal_border}}}}">{{{casualties3}}}
</td>
</tr>
}}}}{{#if:{{{notes|}}}
|<tr>
<td colspan="{{#if:{{{combatant3|}}}|3|2}}" style="font-size:90%; border-top:{{WPMILHIST Infobox style|section_border}}">{{{notes}}}
</td>
</tr>
}}{{#if: {{{map_type|}}}|
<tr>
<td colspan="{{#if:{{{combatant3|}}}|3|2}}" style="border-top:{{WPMILHIST Infobox style|internal_border}}"><center>{{Location map|{{{map_type}}}|relief={{{map_relief|}}}|lat={{{latitude}}}|long={{{longitude}}}|width={{{map_size|220}}}|float=center|border=none|marksize={{{map_marksize|8}}}|label={{{map_label|}}}|alt={{{map_alt|}}}|caption={{{map_caption|Location within {{{map_type}}}}}}}}</center></td>
</tr>
}}{{#if:{{{campaignbox|}}}
|</table>
</tr><tr>
<td>
{{{campaignbox|}}}
</td>
</tr>
}}</table>

Latest revision as of 21:09, 22 January 2023

Usage:

{{Infobox military conflict
| conflict    = 
| partof      = 
| image       = 
| image_size  =
| alt         =
| caption     = 
| date        = 
| place       = 
| map_type    = 
| map_relief  = 
| map_size    = 
| map_marksize = 
| map_caption = 
| map_label   = 
| territory   = 
| result      = 
| status      = 
| combatants_header = 
| combatant1  = 
| combatant2  = 
| combatant3  = 
| commander1  = 
| commander2  = 
| commander3  = 
| units1      = 
| units2      = 
| units3      = 
| strength1   = 
| strength2   = 
| strength3   = 
| casualties1 = 
| casualties2 = 
| casualties3 = 
| notes       = 
| campaignbox = 
}}

The combatant and commander parameters can be expanded through letters a, b, c, etc. if necessary. Example:

{{Infobox military conflict
| conflict    = Conflict name
| partof      = Larger war
| image       = File:Algeria map.png
| image_size  =
| alt         =
| caption     = Map of Algeria as an example
| date        = Date
| place       = Place
| map_type    = 
| map_relief  = 
| map_size    = 
| map_marksize = 
| map_caption = 
| map_label   = 
| territory   = 
| result      = 
| status      = 
| combatants_header = 
| combatant1  = 1st combatant
| combatant1a = 1st combatant ally 1
| combatant1b = 1st combatant ally 2
| combatant1c = 1st combatant ally 3
| combatant2  = 2nd combatant
| combatant2a = 2nd combatant ally 1
| combatant2b = 2nd combatant ally 2
| commander1  = 1st commander
| commander1a = 1st commander ally
| commander2  = 
| commander3  = 
| units1      = 
| units2      = 
| units3      = 
| strength1   = 
| strength2   = 
| strength3   = 
| casualties1 = 
| casualties2 = 
| casualties3 = 
| notes       = 
| campaignbox = 
}}

Produces:

Conflict name
Part of Larger war

Map of Algeria as an example
DateDate
Location
Place
Belligerents
Country Rival country
First combatant ally 1 Second combatant ally 1
First combatant ally 2 Second combatant ally 2
First combatant ally 3
Commanders and leaders
First commander
First commander ally