Template:InfoboxConflict: Difference between revisions

From Universe Wiki | Dawn of Victory 2289
Jump to navigation Jump to search
No edit summary
No edit summary
 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
I apologize for the oversight. Here is the corrected version, with proper handling of optional columns:
<noinclude>
== Usage ==


```mediawiki
To use this infobox template, copy and paste the code below into your article and fill in the fields:
<noinclude><pre>
 
<pre>
{{InfoboxConflict
{{InfoboxConflict
| image =  
| BG = #153229
| imageBG =  
| image = Example.jpg
| name =  
| imageBG = #153229
| nameBG =  
| nameBG = #153229
| color2 =  
| color2 = #fff
| date =  
| name = Example Conflict
| place =  
| date = January 1, 2024
| result =  
| location = Example Location
| side1 =  
| result = Example Result
| side1_leaders =  
| headerBG = #1B4236
| side1_forces =  
| cellBG = #1B4236
| side2 =  
| group1_header = Group 1
| side2_leaders =  
| group2_header = Group 2
| side2_forces =  
| group1 = Example Group 1
| side3 =  
| group2 = Example Group 2
| side3_leaders =  
| group1_leaders_header = Main leaders (Group 1)
| side3_forces =  
| group2_leaders_header = Main leaders (Group 2)
| casualties1 =  
| group1_leaders = Leader 1, Leader 2
| casualties2 =  
| group2_leaders = Leader A, Leader B
| casualties3 =  
| military_dead_group1 = 100
| notes =  
| military_dead_group2 = 200
| references =  
| civilian_dead_group1 = 50
| civilian_dead_group2 = 75
| total_dead_group1 = 150
| total_dead_group2 = 275
}}
}}
</pre></noinclude>
</pre>
</noinclude>


{| class="infobox" cellspacing="0" cellpadding="0" style="float:right; clear:right; width:350px; padding:10px 2px; background:{{{BG|#153229}}};"
{| class="infobox" cellspacing="0" cellpadding="10px" style="float:right; clear:right; width:375px; padding:10px; background:{{{BG|#153229}}};"
{{!}}-
{{!}}-
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
! style="background:{{{imageBG|#153229}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} {{{image|}}}
! style="background:{{{imageBG|#153229}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" colspan="2" {{!}} {{{image|}}}
}}
{{!}}-
! style="background:{{{nameBG|transparent}}}; color:{{{color2|#fff}}}; text-align:center; font-size:120%;" colspan="{{#if:{{{side3|}}}3|2}}" | {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
{{!}}-
{{#if:{{{date|}}}|
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
'''{{{date-title|Date}}}''':
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
{{{date|}}}
{{!}}-}}
{{#if:{{{place|}}}|
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
'''{{{place-title|Place}}}''':
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
{{{place|}}}
{{!}}-}}
{{#if:{{{result|}}}|
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
'''{{{result-title|Result}}}''':
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; border-bottom:0px solid {{{lineBG|#fff}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
{{{result|}}}
{{!}}-}}
{{!}}-
! style="background:{{{fieldBG|#1B4236}}}; text-align:center; color:#fff;" {{!}} '''{{{side1-title|Side 1}}}'''
! style="background:{{{fieldBG|#1B4236}}}; text-align:center; color:#fff;" {{!}} '''{{{side2-title|Side 2}}}'''
{{#if:{{{side3|}}}|
! style="background:{{{fieldBG|#1B4236}}}; text-align:center; color:#fff;" {{!}} '''{{{side3-title|Side 3}}}'''
}}
{{!}}-
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side1|}}}
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side2|}}}
{{#if:{{{side3|}}}|
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side3|}}}
}}
{{!}}-
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side1_leaders-title|Leaders}}}'''
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side2_leaders-title|Leaders}}}'''
{{#if:{{{side3|}}}|
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side3_leaders-title|Leaders}}}'''
}}
{{!}}-
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side1_leaders|}}}
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side2_leaders|}}}
{{#if:{{{side3|}}}|
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side3_leaders|}}}
}}
{{!}}-
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side1_forces-title|Forces}}}'''
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side2_forces-title|Forces}}}'''
{{#if:{{{side3|}}}|
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{side3_forces-title|Forces}}}'''
}}
{{!}}-
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side1_forces|}}}
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side2_forces|}}}
{{#if:{{{side3|}}}|
{{!}} class="infoboxcell"
 
style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side3_forces|}}}
}}
}}
{{!}}-
|-
{{#if:{{{casualties1|}}}|
! colspan="2" style="background:{{{nameBG|#153229}}}; color:{{{color2|#fff}}}; text-align:center; font-size:120%; border-bottom:0px solid {{{lineBG|#999999}}};" | {{{name|{{PAGENAME}}}}}
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{casualties1-title|Casualties}}}'''
|-
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{casualties2-title|Casualties}}}'''
| style="background:{{{cellBG|#1B4236}}}; color:{{{color2|#fff}}}; text-align:left; padding: 10px 0 10px 20px; line-height:14px; width:100px; font-weight:bold;" | Date
{{#if:{{{side3|}}}|
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 10px 20px; line-height:14px;" | {{{date|}}}
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} '''{{{casualties3-title|Casualties}}}'''
|-
}}
| style="background:{{{cellBG|#1B4236}}}; color:{{{color2|#fff}}}; text-align:left; padding: 10px 0 10px 20px; line-height:14px; width:100px; font-weight:bold;" | Location
{{!}}-
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 10px 20px; line-height:14px;" | {{{location|}}}
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{casualties1|}}}
|-
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{casualties2|}}}
| style="background:{{{cellBG|#1B4236}}}; color:{{{color2|#fff}}}; text-align:left; padding: 10px 0 10px 20px; line-height:14px; width:100px; font-weight:bold;" | Result
{{#if:{{{side3|}}}|
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 10px 20px; line-height:14px;" | {{{result|}}}
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{casualties3|}}}
|-
}}
! colspan="2" style="background:{{{headerBG|#153229}}}; color:{{{color2|#fff}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" | Participants
{{!}}-
|-
{{#if:{{{notes|}}}|
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 0 20px; line-height:14px; width:50%;" | '''{{{group1_header|Group 1}}}'''
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 0 20px; line-height:14px; width:50%;" | '''{{{group2_header|Group 2}}}'''
'''{{{notes-title|Notes}}}''':
|-
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 0 20px; line-height:14px;" | {{{group1|}}}
{{{notes|}}}
| style="text-align:left; background:{{{cellBG|#1B4236}}}; padding: 10px 0 0 20px; line-height:14px;" | {{{group2|}}}
{{!}}-}}
|-
{{#if:{{{references|}}}|
! colspan="2" style="background:{{{headerBG|#153229}}}; color:{{{color2|#fff}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" | Commanders and leaders
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
|-
'''{{{references-title|References}}}''':
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | '''{{{group1_leaders_header|Main leaders ({{{group1_header|Group 1}}}):}}}'''
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}}
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | '''{{{group2_leaders_header|Main leaders ({{{group2_header|Group 2}}}):}}}'''
{{{references|}}}
|-
{{!}}-}}
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | {{{group1_leaders|}}}
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | {{{group2_leaders|}}}
|-
! colspan="2" style="background:{{{headerBG|#153229}}}; color:{{{color2|#fff}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" | Casualties and losses
|-
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | '''Total dead:'''<br>{{{total_dead_group1|}}}
| style="text-align:center; background:{{{cellBG|#1B4236}}}; padding: 10px 10px 10px 20px; line-height:14px;" | '''Total dead:'''<br>{{{total_dead_group2|}}}
|}
|}
```
This version ensures that if `side3` is not provided, the table will adjust the colspan accordingly to avoid any layout issues.

Latest revision as of 06:56, 27 August 2024

Usage

To use this infobox template, copy and paste the code below into your article and fill in the fields:

{{InfoboxConflict
| BG = #153229
| image = Example.jpg
| imageBG = #153229
| nameBG = #153229
| color2 = #fff
| name = Example Conflict
| date = January 1, 2024
| location = Example Location
| result = Example Result
| headerBG = #1B4236
| cellBG = #1B4236
| group1_header = Group 1
| group2_header = Group 2
| group1 = Example Group 1
| group2 = Example Group 2
| group1_leaders_header = Main leaders (Group 1)
| group2_leaders_header = Main leaders (Group 2)
| group1_leaders = Leader 1, Leader 2
| group2_leaders = Leader A, Leader B
| military_dead_group1 = 100
| military_dead_group2 = 200
| civilian_dead_group1 = 50
| civilian_dead_group2 = 75
| total_dead_group1 = 150
| total_dead_group2 = 275
}}


InfoboxConflict
Date
Location
Result
Participants
Group 1 Group 2
Commanders and leaders
Main leaders (Group 1): Main leaders (Group 2):
Casualties and losses
Total dead:
Total dead: