Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:InfoBoxVehicle: Difference between revisions

Template page
Mapper (talk | contribs)
No edit summary
Pyrenol (talk | contribs)
replaced inline css with classes. moved styles to Template:Infobox/styles.css
Line 1: Line 1:
<includeonly>
<includeonly>
{| class="infobox" style="width: 22em; border: 0.5px solid grey; border-radius: 0 0 8px 8px; border-collapse: separate; border-spacing: 0; background-clip: padding-box; font-size: 75%; line-height: 1.4em; float: right; clear: right; margin: 0 0 1em 1em; letter-spacing: 0.02em;"
<templatestyles src="Template:Infobox/styles.css"/>
|+ style="font-size: 160%; font-weight: bolder; text-align: center; padding: 1em; border: 0.5px solid grey; border-bottom: 0px; border-radius: 16px 16px 0 0; {{#switch: {{{Rarity|}}} | Mythical = background-color: #19D9FF; color: white; | Legendary = background-color: #d82121; color: white; | Widespread = background-color: #f5f5f5; color: black; | Common = background-color: #99ff99; color: black; | Uncommon = background-color: #ffff66; color: black; | Rare = background-color: #e0a6ff; color: white; | Ultra Rare = background-color: #66a3ff; color: white; | Epic = background-color: #ffbb33; color: black; | #default = }}" | {{{name|{{PAGENAME}}}}}
{| class="infobox"
|+ class="infobox__title rarity-{{lcfirst:{{#invoke:String|replace|{{{Rarity|}}}| |}}}}" | {{{name|{{PAGENAME}}}}}
|-
|-
| colspan="2" style="text-align: center; background-color: #1b1b1b; padding: 0.5em;" | {{#ifexist: {{PAGENAME}}photo.png | [[File:{{{photo|{{PAGENAME}}photo.png}}}|300px]]| [[File:{{{photo|Aerowikiplaceholder.jpg}}}|300px]]}}
| colspan="2" class="infobox__image" | {{#ifexist: {{PAGENAME}}photo.png | [[File:{{{photo|{{PAGENAME}}photo.png}}}|300px]]| [[File:{{{photo|Aerowikiplaceholder.jpg}}}|300px]]}}
|-
|-
| colspan="2" style="text-align: center; background-color: #18191c; color: white; font-style: italic; font-size: 85%; padding: 0.4em; border-bottom: 0.4px solid black;" | {{{caption|(Empty Caption) [[Category: Missing Parameters]]}}}
| colspan="2" class="infobox__caption" | {{{caption|(Empty Caption) [[Category: Missing Parameters]]}}}
|-
|-
| colspan="2" style="text-align: center; background-color: #18191c; color: white; font-weight: bold; padding: 0.4em; border-top: 0.5px solid grey; border-bottom: 0.5px solid grey; line-height: 23px;" | {{{General Information|General Information}}}
| colspan="2" class="infobox__subtitles" | {{{General Information|General Information}}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; width: 31%; padding: 0.4em; border-right: 0.4px solid black;" | Code
! class="infobox__field-name" | Code
| style="background-color: #101317; color: white; padding: 0.6em;" | {{{Code| Unknown/None [[Category: Missing Parameters]]}}}
| class="infobox__field-value" | {{{Code| Unknown/None [[Category: Missing Parameters]]}}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Type
! class="infobox__field-name" | Type
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | {{#if: {{{Type|}}} | [[:Category:{{{Type}}}s|{{{Type}}}]][[Category:{{{Type}}}s]] | Unknown/None [[Category: Missing Parameters]]}}
| class="infobox__field-value" | {{#if: {{{Type|}}} | [[:Category:{{{Type}}}s|{{{Type}}}]][[Category:{{{Type}}}s]] | Unknown/None [[Category: Missing Parameters]]}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Rarity
! class="infobox__field-name" | Rarity
| style= "{{#switch: {{{Rarity|}}} |
| class="infobox__rarity-value rarity-{{lcfirst:{{#invoke:String|replace|{{{Rarity|}}}| |}}}}" | {{{Rarity|Unknown/None [[Category: Missing Parameters]]}}} {{#if: {{{Rarity|}}} | [[Category:{{{Rarity}}} Vehicles]]}}
Mythical = background-color: #19D9FF; color: white; |
Legendary = background-color: #d82121; color: white; |
Widespread = background-color: #f5f5f5; color: black; |
Common = background-color: #99ff99; color: black; |
Uncommon = background-color: #ffff66; color: black; |
Rare = background-color: #e0a6ff; color: white; |
Ultra Rare = background-color: #66a3ff; color: white; |
Epic = background-color: #ffbb33; color: black; |
#default = }}; border-radius: 25px; border: 15px solid #0c0e12;padding: 0.43em; text-align: center; border-collapse: seperate;" |
{{{Rarity|Unknown/None [[Category: Missing Parameters]]}}} {{#if: {{{Rarity|}}} | [[Category:{{{Rarity}}} Vehicles]]}}
|-
|-
{{#if: {{{Obtainability Type|}}} | [[Category:{{{Obtainability Type}}}]]}}
[[Category:{{{Obtainability Type}}}]]
{{#ifeq: {{{Obtainability Type|Purchasable}}} | Purchasable |
{{#ifeq: {{{Obtainability Type}}} | Purchasable |
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Cost</th>
<th class="infobox__field-name">Cost</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#iferror: {{#expr: {{{Cost|0}}} + 0 }} | Invalid Cost String [[Category: Missing Parameters]] | '''{{#if: {{{Cost|}}} | {{formatnum:{{{Cost}}}}} | 0 [[Category: Missing Parameters]]}}''' WP }}</td>
<td class="infobox__field-value">{{#iferror: {{#expr: {{{Cost|0}}} + 0 }} | Invalid Cost String [[Category: Missing Parameters]] | '''{{#if: {{{Cost|}}} | {{formatnum:{{{Cost}}}}} | 0 [[Category: Missing Parameters]]}}''' WP }}</td>
</tr>
</tr>
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Distributor</th>
<th class="infobox__field-name">Distributor</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#if: {{{Distributor|}}} | [[{{{Distributor}}}]] | Unknown/None [[Category: Missing Parameters]]}}</td>
<td class="infobox__field-value">{{#if: {{{Distributor|}}} | [[{{{Distributor}}}]] | Unknown/None [[Category: Missing Parameters]]}}</td>
</tr>
</tr>
|{{#ifeq: {{{Obtainability Type}}} | Badge Vehicle |
|{{#ifeq: {{{Obtainability Type}}} | Badge Vehicle |
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Badge</th>
<th class="infobox__field-name">Badge</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#if: {{{Cost|}}} | {{{Cost}}} badge | Unknown/None [[Category: Missing Parameters]]}}</td>
<td class="infobox__field-value">{{#if: {{{Cost|}}} | {{{Cost}}} badge | Unknown/None [[Category: Missing Parameters]]}}</td>
</tr>
</tr>
|{{#ifeq: {{{Obtainability Type}}} | Crate Vehicle |
|{{#ifeq: {{{Obtainability Type}}} | Crate Vehicle |
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Crafting requirement</th>
<th class="infobox__field-name">Crafting requirement</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#if: {{{Cost|}}} | {{{Cost}}} parts {{#if: {{{Distributor|}}} | and [[{{{Distributor}}}]]}} | Unknown/None [[Category: Missing Parameters]]}}</td>
<td class="infobox__field-value">{{#if: {{{Cost|}}} | {{{Cost}}} parts {{#if: {{{Distributor|}}} | and [[{{{Distributor}}}]]}} | Unknown/None [[Category: Missing Parameters]]}}</td>
</tr>
</tr>
|{{#ifeq: {{{Obtainability Type}}} | Convertible |
|{{#ifeq: {{{Obtainability Type}}} | Convertible |
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Obtainability</th>
<th class="infobox__field-name">Obtainability</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#if: {{{Cost|}}} | Convertible from [[{{{Cost}}}]] | Unknown/None [[Category: Missing Parameters]]}}</td>
<td class="infobox__field-value">{{#if: {{{Cost|}}} | Convertible from [[{{{Cost}}}]] | Unknown/None [[Category: Missing Parameters]]}}</td>
</tr>
</tr>
<tr>
<tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Conversion Cost</th>
<th class="infobox__field-name">Conversion Cost</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">{{#iferror: {{#expr: {{{Distributor|}}} + 0 }} | Invalid Conversion Cost String [[Category: Missing Parameters]] | {{#if: {{{Distributor|}}} | $'''{{formatnum:{{{Distributor}}}}}''' | Unknown/None [[Category: Missing Parameters]]}}}}</td>
<td class="infobox__field-value">{{#iferror: {{#expr: {{{Distributor|}}} + 0 }} | Invalid Conversion Cost String [[Category: Missing Parameters]] | {{#if: {{{Distributor|}}} | $'''{{formatnum:{{{Distributor}}}}}''' | Unknown/None [[Category: Missing Parameters]]}}}}</td>
</tr>
</tr>
}}}}}}}}
}}}}}}}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Jobs   
! class="infobox__field-name" | Jobs   
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | {{#invoke: Sqwishyish/ListTools
| class="infobox__field-value" | {{#invoke: Sqwishyish/ListTools
  | split_list | {{{Jobs|}}} | [[Category: {split}]][[:Category: {split}|{split}]], | Unknown/None [[Category: Missing Parameters]]}}  
  | split_list | {{{Jobs|}}} | [[Category: {split}]][[:Category: {split}|{split}]], | Unknown/None [[Category: Missing Parameters]]}}  
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Customization
! class="infobox__field-name" | Customization
| style="background-color: #101317; color: white; padding: 0.6em;" |  {{#invoke: Sqwishyish/ListTools  
| class="infobox__field-value" |  {{#invoke: Sqwishyish/ListTools  
| split_list | {{{Customization|}}} | {{Checkbox (colored)|checked|color=blue}} [[Category: {split}]][[:Category: {split}|{split}]] <br> | Unknown/None [[Category: Missing Parameters]]}}  
| split_list | {{{Customization|}}} | {{Checkbox (colored)|checked|color=blue}} [[Category: {split}]][[:Category: {split}|{split}]] <br> | Unknown/None [[Category: Missing Parameters]]}}  
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black;" | Contributors
! class="infobox__field-name" | Contributors
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | {{#invoke: Sqwishyish/ListTools  
| class="infobox__field-value" | {{#invoke: Sqwishyish/ListTools  
| split_list | {{{Contributors|}}} | [[Category: {split}]][[:Category: {split}|{split}]], | Unknown/None [[Category: Missing Parameters]]}}  
| split_list | {{{Contributors|}}} | [[Category: {split}]][[:Category: {split}|{split}]], | Unknown/None [[Category: Missing Parameters]]}}  
|-
|-
| colspan="2" style="text-align: center; background-color: #1b1b1b; color: white; font-weight: bold; padding: 0.4em; border-top: 0.5px solid grey; border-bottom: 0.5px solid grey; line-height: 23px;" | {{{Specifications|Specifications}}}
| colspan="2" class="infobox__sybtitles" | {{{Specifications|Specifications}}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;" | Max Speed
! class="infobox__field-name" | Max Speed
| style="background-color: #101317; color: white; padding: 0.6em;" |    '''{{#if: {{{Max Speed|}}} | {{formatnum:{{{Max Speed}}}}} | 0 [[Category: Missing Parameters]]}}''' knots / '''{{formatnum:{{#expr: {{{Max Speed|0}}} * 1.852 round 0}}}}''' kph
| class="infobox__field-value" |    '''{{#if: {{{Max Speed|}}} | {{formatnum:{{{Max Speed}}}}} | 0 [[Category: Missing Parameters]]}}''' knots / '''{{formatnum:{{#expr: {{{Max Speed|0}}} * 1.852 round 0}}}}''' kph
<!-- Hides the stall speed and service ceiling statistics if the vehicle type is a boat or a ground vehicle -->
<!-- Hides the stall speed and service ceiling statistics if the vehicle type is a boat or a ground vehicle -->
{{#ifeq: {{{Type|}}} | Boat || {{#ifeq: {{{Type|}}} | Ground Vehicle ||
{{#ifeq: {{{Type|}}} | Boat || {{#ifeq: {{{Type|}}} | Ground Vehicle ||
Line 80: Line 71:
{{#if: {{{Stall Speed|0}}} | {{#ifeq: {{{Type|}}} | Helicopter ||
{{#if: {{{Stall Speed|0}}} | {{#ifeq: {{{Type|}}} | Helicopter ||
  <tr>
  <tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Stall Speed</th>
<th class="infobox__field-name">Stall Speed</th>
<td style="background-color: #0c0e12; color: white; padding: 0.6em;">'''{{#if: {{{Stall Speed|}}} | {{formatnum:{{{Stall Speed}}}}} | 0 [[Category: Missing Parameters]]}}''' knots / '''{{formatnum:{{#expr: {{{Stall Speed|0}}} * 1.852 round 0}}}}''' kph</td>
<td class="infobox__field-value">'''{{#if: {{{Stall Speed|}}} | {{formatnum:{{{Stall Speed}}}}} | 0 [[Category: Missing Parameters]]}}''' knots / '''{{formatnum:{{#expr: {{{Stall Speed|0}}} * 1.852 round 0}}}}''' kph</td>
</tr>
</tr>
}}}}
}}}}
{{#if: {{{CeilingFeet|0}}}
{{#if: {{{CeilingFeet|0}}}
| <tr>
| <tr>
<th style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;">Ceiling</th>
<th class="infobox__field-name">Ceiling</th>
<td style="background-color: #101317; color: white; padding: 0.6em;">'''{{#if: {{{CeilingFeet|}}} | {{formatnum:{{{CeilingFeet}}}}} | 0 [[Category: Missing Parameters]]}}''' ft / '''{{formatnum:{{#expr: {{{CeilingFeet|0}}} * 0.3048 round 0}}}}''' m</td>
<td class="infobox__field-value">'''{{#if: {{{CeilingFeet|}}} | {{formatnum:{{{CeilingFeet}}}}} | 0 [[Category: Missing Parameters]]}}''' ft / '''{{formatnum:{{#expr: {{{CeilingFeet|0}}} * 0.3048 round 0}}}}''' m</td>
</tr>
</tr>
}}
}}
}}}}
}}}}
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em;" | Range
! class="infobox__field-name" | Range
| style="background-color: #0c0e12; color: white; padding: 0.6em;" | '''{{#if: {{{RangeNM|}}} | {{formatnum:{{{RangeNM}}}}}| 0 [[Category: Missing Parameters]]}}''' nmi / '''{{formatnum:{{#expr: {{{RangeNM|0 }}} * 1.852 round 0}}}}''' km
| class="infobox__field-value" | '''{{#if: {{{RangeNM|}}} | {{formatnum:{{{RangeNM}}}}}| 0 [[Category: Missing Parameters]]}}''' nmi / '''{{formatnum:{{#expr: {{{RangeNM|0 }}} * 1.852 round 0}}}}''' km
|-
|-
! style="background-color: #18191c; color: white; text-align: center; padding: 0.4em; border-right: 0.4px solid black; border-bottom-left-radius: 8px;" | Capacity
! class="infobox__field-name" | Capacity
| style="background-color: #101317; color: white; padding: 0.6em; border-bottom-right-radius: 8px;" | '''{{#if: {{{Capacity|}}} | {{formatnum:{{{Capacity}}}}} | 0 [[Category: Missing Parameters]]}}'''
| class="infobox__field-value" | '''{{#if: {{{Capacity|}}} | {{formatnum:{{{Capacity}}}}} | 0 [[Category: Missing Parameters]]}}'''
|}[[Category:Vehicles]]</includeonly>
|}[[Category:Vehicles]]</includeonly>
<noinclude>
<noinclude>
Line 270: Line 261:
],
],
"autovalue": "Purchasable",
"autovalue": "Purchasable",
"suggested": true
"required": true
}
}
},
},
Cookies help us deliver our services. By using our services, you agree to our use of cookies.