Difference between revisions of "Template:Conflict"

Template page
m
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="infobox">
<includeonly>
{| width="315" align="right" cellpadding="3" cellspacing="0" style="border-radius:13px;margin-bottom: 0;
<infobox theme="bravoconflict">
{{#if: {{{image|}}}|
<title source="name">
{{!}} colspan="2" bgcolor={{{bgcolor_value|#222222; style="border-top-right-radius: 13px; border-top-left-radius: 13px; background: #f3f3f3 !important; color: #cccccc; font-size:smaller; text-align: center;padding: 10px;"}}} {{!}} {{{image}}} }}
    <default>{{pagename}}</default><format>'''{{{name}}}'''</format>
|-
</title>
| colspan="2" style="text-align: center; color: #e5e5ed; font-size:larger; background-color:#304665 !important; text-align:center;padding: .3rem 1.25rem;" | '''{{{name}}}'''
<image source="image"/>
|-
<header>Basic Information</header>
{{#if: {{{date|}}}|
<data source="date"><label>Date</label><format>{{{date}}}</format></data>
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:40%; vertical-align:top;"}}} {{!}} Date
<data source="location"><label>Location</label><format>{{{location}}}</format></data>
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:60%; vertical-align:top;"}}} {{!}} {{{date}}}
<data source="result"><label>Result</label><format>{{{result}}}</format></data>
<header>Belligerents</header>
<data source="belligerents right"><label>{{{belligerents left}}}</label><format>{{{belligerents right}}}</format></data>
<header>Commanders</header>
<data source="commanders right"><label>{{{commanders left}}}</label></data>
<header>{{#if:{{{strength left|}}}{{{strength right|}}}|Strength|}}</header>
<data source="strength right"><label>{{{strength left}}}</label></data>
<header>Casualties</header>
<data source="casualties right"><label>{{{casualties left}}}</label></data>
<header name="footer">[[Template:Conflict]]</header>
</infobox>
{{#if: {{{templatemode|}}}|<!-- do nothing -->|<!--else-->[[Category:Conflict]]}}
</includeonly>
<noinclude>
==Conflict==
This infobox exists for the purpose of providing a uniform and consistent method for displaying conflict high-level details. There is the infobox itself as well as 2 other templates in use for formatting. They are detailed below on their usage and examples are provided within the infobox code example below.
 
The code for the infobox itself is as follows:
<pre>
{{Conflict
| name =
| image =
| date =
| location =
| result =
| belligerents left = {{belligerent|icon|name}}
| belligerents right = {{belligerent|icon|name}}
| commanders left = {{belligerent|icon|name}}
| commanders right = {{belligerent|icon|name}}
| strength left = {{plainlist|
*
*
}}
}}
|-
| strength right = {{plainlist|
{{#if: {{{location|}}}|
*
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:40%; vertical-align:top;"}}} {{!}} Location
*
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:60%; vertical-align:top;"}}} {{!}} {{{location}}}
}}
}}
|-
| casualties left = {{plainlist|
{{#if: {{{result|}}}|
*
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:40%; vertical-align:top;"}}} {{!}} Result
*
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:60%; vertical-align:top;"}}} {{!}} {{{result}}}
}}
}}
|-
| casualties right = {{plainlist|
| colspan="2" style="text-align: center; color: #e5e5ed; background-color:#2a4667c9; text-align:center; font-size:8pt;padding: 6px" | '''Belligerents'''
*
|-
*
{{#if: {{{belligerents left|}}}{{{belligerents right|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{belligerents left}}}
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{belligerents right}}}
}}
}}
|-
| colspan="2" style="text-align: center; color: #e5e5ed; background-color:#2a4667c9; text-align:center; font-size:8pt;padding: 6px" | '''Commanders'''
|-
{{#if: {{{commanders left|}}}{{{commanders right|}}}|
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{commanders left}}}
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{commanders right}}}
}}
}}
|-
</pre>
| colspan="2" style="text-align: center; color: #e5e5ed; background-color:#2a4667c9; text-align:center; font-size:8pt;padding: 6px" | '''Strength'''
 
|-
===Belligerent===
{{#if: {{{strength left|}}}{{{strength right|}}}|
<pre>
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{strength left}}}
{{belligerent|icon|name}}
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{strength right}}}
</pre>
This code is used to provide a belligerent and its national icon. The code can be used for nations, commanders and strength if indicating strength per participant instead of as a whole per side.
If there is no accompanying icon, remove the icon| part of the code and it will simply display the nation name correctly.
 
There is however an alignment issue with mixing belligerents with and without icons. Please see the example below to see the nature of this issue.
 
If there is a commander or nation without an icon, it creates a spacing issue with entities either above or below.
 
If you have multiple commanders or nations, simply enter a belligerent line for each entity.
 
==Plainlist==
<pre>
{{plainlist|
*
*
}}
</pre>
This is used when you have a list of items. It will display a list without any bullet points at all in mediawiki code and not require the use of HTML to force line breaks. It works best for listing items in this template and is preferred.
{{clear}}
==Example==
{{Conflict
| name = First Battle of Starbase Kickass
| image = [[File:Starfleet1.jpg|Noise control running from Old Lady Higgins]]
| date = August 5th, 2398<br>Stardate 75592.2
| location = Sector Kickass
| result = *Noise control was told to piss off
*Stereo turned up even louder!
*IKS Rust Bucket captured
| belligerents left = {{plainlist|
{{belligerent|Starbase Kickass}}
}}
}}
|-
| belligerents right = {{plainlist|
| colspan="2" style="text-align: center; color: #e5e5ed; background-color:#2a4667c9; text-align:center; font-size:8pt;padding: 6px" | '''Casualties and losses'''
{{belligerent|FEDicon.png|The Feds}}
|-
{{belligerent|KDFicon.png|Clingwrap Empire}}
{{#if: {{{casualties left|}}}{{{casualties right|}}}|
{{belligerent|ROMicon.png|Roman Space Elves}}
{{!}} bgcolor={{{bgcolor_value|#222222; style="background: #e0e0e0; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{casualties left}}}
{{!}} bgcolor={{{bgcolor_value|#2B2B2B; style="background: #ececec; padding:8px 10px; color: #696969; font-size:smaller; width:50%; vertical-align:top;"}}} {{!}} {{{casualties right}}}
}}
}}
|-
| commanders left = {{plainlist|
|- class="infobox-link" style="border-radius-bottom-right: 13px; border-radius-bottom-left: 13px;"
{{belligerent|High Adm. Big Bird}}
|colspan="2" style="border-bottom-right-radius: 13px; border-bottom-left-radius: 13px; text-align: center; color: #F67F00; font-size: 8pt; background-color:#2a4667c9; text-align:center;padding: 6px 0;" | [[Template:Conflict]]
{{belligerent|Tholian Assembly.png|Old Lady Higgins}}
|}</div>
}}
<includeonly>[[Category:Conflict]]
| commanders right = {{plainlist|
</includeonly><noinclude>
{{belligerent|FEDicon.png|Pointy Ears}}
<noinclude>
{{belligerent|KDFicon.png|honour eyes.gif}}
<br clear=all>
{{belligerent|FEDicon.png|Adm. Ens. Kim}}
}}
| strength left = {{plainlist|
*Starbase Kickass
*USS Lollipop
}}
| strength right = {{plainlist|
*USS Shiny
*IKS Rust Bucket
*3 Cruisers
*4 Destroyers
}}
| casualties left = {{plainlist|
*Janitor Jeff
*Big Bird's cup of tea
}}
| casualties right = {{plainlist|
*6000 Egos badly bruised
*1 bottle 2279 Saurian Brandy
}}
| templatemode = nocats
}}
The following code block produced the infobox on the right
<pre>
<pre>
{{Conflict
{{Conflict
| name =  
| name = First Battle of Starbase Kickass
| image =  
| image = [[File:Starfleet1.jpg|Noise control running from Old Lady Higgins]]
| date =  
| date = August 5th, 2398<br>Stardate 75592.2
| location =  
| location = Sector Kickass
| result =  
| result = *Noise control was told to piss off
| belligerents left = Phrase this section as follows to get icons next to names
*Stereo turned up even louder!
<div style="float:left">[[File:  icon of choice  |20px]]</div>Belligerent 1
*IKS Rust Bucket captured
<div style="float:left">[[File:  icon of choice  |20px]]</div>Belligerent 2
| belligerents left = {{plainlist|
| belligerents right = Phrase this section as follows to get icons next to names
{{belligerent|Starbase Kickass}}
<div style="float:left">[[File:  icon of choice  |20px]]</div>Belligerent 1
}}
<div style="float:left">[[File:  icon of choice  |20px]]</div>Belligerent 2
| belligerents right = {{plainlist|
| commanders left = Phrase this section as follows to get icons next to names
{{belligerent|FEDicon.png|The Feds}}
<div style="float:left">[[File:  icon of choice  |20px]]</div>Commander 1
{{belligerent|KDFicon.png|Clingwrap Empire}}
<div style="float:left">[[File:  icon of choice  |20px]]</div>Commander 2
{{belligerent|ROMicon.png|Roman Space Elves}}
| commanders right = Phrase this section as follows to get icons next to names
}}
<div style="float:left">[[File:  icon of choice  |20px]]</div>Commander 1
| commanders left = {{plainlist|
<div style="float:left">[[File:  icon of choice  |20px]]</div>Commander 2
{{belligerent|High Adm. Big Bird}}
| strength left = <div style="float:left">Strength goes here</div>
{{belligerent|Tholian Assembly.png|Old Lady Higgins}}
| strength right = <div style="float:left">Strength goes here</div>
}}
| casualties left = <div style="float:left">Casualties go here</div>
| commanders right = {{plainlist|
| casualties right = <div style="float:left">Casualties goes here</div>
{{belligerent|FEDicon.png|Pointy Ears}}
}}</pre>
{{belligerent|KDFicon.png|honour eyes.gif}}
 
{{belligerent|FEDicon.png|Adm. Ens. Kim}}
<noinclude>[[Category:Infobox Templates|Conflict]]
}}
| strength left = {{plainlist|
*Starbase Kickass
*USS Lollipop
}}
| strength right = {{plainlist|
*USS Shiny
*IKS Rust Bucket
*3 Cruisers
*4 Destroyers
}}
| casualties left = {{plainlist|
*Janitor Jeff
*Big Bird's cup of tea
}}
| casualties right = {{plainlist|
*6000 Egos badly bruised
*1 bottle 2279 Saurian Brandy
}}
}}
</pre>
[[Category:Infobox Templates]]
{{clear}}
</noinclude>
</noinclude>

Latest revision as of 02:26, 15 November 2024


Conflict

This infobox exists for the purpose of providing a uniform and consistent method for displaying conflict high-level details. There is the infobox itself as well as 2 other templates in use for formatting. They are detailed below on their usage and examples are provided within the infobox code example below.

The code for the infobox itself is as follows:

{{Conflict
| name = 
| image = 
| date = 
| location = 
| result = 
| belligerents left = {{belligerent|icon|name}}
| belligerents right = {{belligerent|icon|name}}
| commanders left = {{belligerent|icon|name}}
| commanders right = {{belligerent|icon|name}}
| strength left = {{plainlist|
*
*
}}
| strength right = {{plainlist|
*
*
}}
| casualties left = {{plainlist|
*
*
}}
| casualties right = {{plainlist|
*
*
}}
}}

Belligerent

{{belligerent|icon|name}}

This code is used to provide a belligerent and its national icon. The code can be used for nations, commanders and strength if indicating strength per participant instead of as a whole per side. If there is no accompanying icon, remove the icon| part of the code and it will simply display the nation name correctly.

There is however an alignment issue with mixing belligerents with and without icons. Please see the example below to see the nature of this issue.

If there is a commander or nation without an icon, it creates a spacing issue with entities either above or below.

If you have multiple commanders or nations, simply enter a belligerent line for each entity.

Plainlist

{{plainlist|
*
*
}}

This is used when you have a list of items. It will display a list without any bullet points at all in mediawiki code and not require the use of HTML to force line breaks. It works best for listing items in this template and is preferred.

Example


The following code block produced the infobox on the right

{{Conflict
| name = First Battle of Starbase Kickass
| image = [[File:Starfleet1.jpg|Noise control running from Old Lady Higgins]]
| date = August 5th, 2398<br>Stardate 75592.2
| location = Sector Kickass
| result = *Noise control was told to piss off
*Stereo turned up even louder!
*IKS Rust Bucket captured
| belligerents left = {{plainlist|
{{belligerent|Starbase Kickass}}
}}
| belligerents right = {{plainlist|
{{belligerent|FEDicon.png|The Feds}}
{{belligerent|KDFicon.png|Clingwrap Empire}}
{{belligerent|ROMicon.png|Roman Space Elves}}
}}
| commanders left = {{plainlist|
{{belligerent|High Adm. Big Bird}}
{{belligerent|Tholian Assembly.png|Old Lady Higgins}}
}}
| commanders right = {{plainlist|
{{belligerent|FEDicon.png|Pointy Ears}}
{{belligerent|KDFicon.png|honour eyes.gif}}
{{belligerent|FEDicon.png|Adm. Ens. Kim}}
}}
| strength left = {{plainlist|
*Starbase Kickass
*USS Lollipop
}}
| strength right = {{plainlist|
*USS Shiny
*IKS Rust Bucket
*3 Cruisers
*4 Destroyers
}}
| casualties left = {{plainlist|
*Janitor Jeff
*Big Bird's cup of tea
}}
| casualties right = {{plainlist|
*6000 Egos badly bruised
*1 bottle 2279 Saurian Brandy
}}
}}