Template:InfoboxConflict: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
I | I apologize for the oversight. Here is the corrected version, with proper handling of optional columns: | ||
Here is the | |||
```mediawiki | ```mediawiki | ||
Line 34: | Line 32: | ||
{{!}}- | {{!}}- | ||
{{#if:{{{image|}}}| | {{#if:{{{image|}}}| | ||
! style="background:{{{imageBG|#153229}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" colspan="{{#if:{{{side3|}}} | ! style="background:{{{imageBG|#153229}}}; text-align:center; border-bottom:0px solid {{{lineBG|#999999}}};" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} {{{image|}}} | ||
}} | }} | ||
{{!}}- | {{!}}- | ||
! style="background:{{{nameBG|transparent}}}; color:{{{color2|#fff}}}; text-align:center; font-size:120%;" colspan="{{#if:{{{side3|}}} | ! style="background:{{{nameBG|transparent}}}; color:{{{color2|#fff}}}; text-align:center; font-size:120%;" colspan="{{#if:{{{side3|}}}3|2}}" | {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}} | ||
{{!}}- | {{!}}- | ||
{{#if:{{{date|}}}| | {{#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|}}} | {{!}} 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}}}''': | '''{{{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|}}} | {{!}} 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|}}} | {{{date|}}} | ||
{{!}}-}} | {{!}}-}} | ||
{{#if:{{{place|}}}| | {{#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|}}} | {{!}} 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}}}''': | '''{{{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|}}} | {{!}} 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|}}} | {{{place|}}} | ||
{{!}}-}} | {{!}}-}} | ||
{{#if:{{{result|}}}| | {{#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|}}} | {{!}} 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}}}''': | '''{{{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|}}} | {{!}} 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|}}} | {{{result|}}} | ||
{{!}}-}} | {{!}}-}} | ||
Line 90: | Line 88: | ||
{{!}} 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;" {{!}} {{{side1_forces|}}} | ||
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side2_forces|}}} | {{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side2_forces|}}} | ||
{{#if:{{{side3|}}} | {{#if:{{{side3|}}}| | ||
{{!}} class="infoboxcell" | |||
style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" {{!}} {{{side3_forces|}}} | |||
}} | }} | ||
{{!}}- | {{!}}- | ||
Line 110: | Line 108: | ||
{{!}}- | {{!}}- | ||
{{#if:{{{notes|}}}| | {{#if:{{{notes|}}}| | ||
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}} | {{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} | ||
'''{{{notes-title|Notes}}}''': | '''{{{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|}}} | {{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} | ||
{{{notes|}}} | {{{notes|}}} | ||
{{!}}-}} | {{!}}-}} | ||
{{#if:{{{references|}}}| | {{#if:{{{references|}}}| | ||
{{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}} | {{!}} class="infoboxlabel" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} | ||
'''{{{references-title|References}}}''': | '''{{{references-title|References}}}''': | ||
{{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}} | {{!}} class="infoboxcell" style="vertical-align:top; background:{{{fieldBG|#1B4236}}}; color:#fff; padding: 10px 0 0 20px; line-height:14px;" colspan="{{#if:{{{side3|}}}3|2}}" {{!}} | ||
{{{references|}}} | {{{references|}}} | ||
{{!}}-}} | {{!}}-}} | ||
Line 124: | Line 122: | ||
``` | ``` | ||
This | This version ensures that if `side3` is not provided, the table will adjust the colspan accordingly to avoid any layout issues. |
Revision as of 00:24, 5 August 2024
I apologize for the oversight. Here is the corrected version, with proper handling of optional columns:
```mediawiki
{{InfoboxConflict | image = | imageBG = | name = | nameBG = | color2 = | date = | place = | result = | side1 = | side1_leaders = | side1_forces = | side2 = | side2_leaders = | side2_forces = | side3 = | side3_leaders = | side3_forces = | casualties1 = | casualties2 = | casualties3 = | notes = | references = }}{{#if:|
InfoboxConflict | |
---|---|
Side 1 | Side 2 |
Leaders | Leaders |
Forces | Forces |
Casualties | Casualties |
```
This version ensures that if `side3` is not provided, the table will adjust the colspan accordingly to avoid any layout issues.