Template:Infobox item: Difference between revisions

TheMilkMan (talk | contribs)
Need a 7th passive stat to fully display Haunting Shot's passive stats
TheMilkMan (talk | contribs)
Trying something to prevent needing overt booleans for component displays
Line 270: Line 270:
}}
}}
|-
|-
{{#ifeq:{{{has_components|}}}|true|
{{#ifeq:{{{component1_name|}}}|
! colspan="4" class="components-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo',serif; {{
! colspan="4" class="components-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo',serif; {{
#switch: {{{item_type|{{#invoke:ItemData|get_type|{{#var:item_key_or_en}}|raw=true}}}}}
#switch: {{{item_type|{{#invoke:ItemData|get_type|{{#var:item_key_or_en}}|raw=true}}}}}
Line 276: Line 276:
  | Vitality = background-color: #203500; color: #C7C9C6;
  | Vitality = background-color: #203500; color: #C7C9C6;
  | Spirit = background-color: #3a2231; color: #C9C7CB;
  | Spirit = background-color: #3a2231; color: #C9C7CB;
  | background-color: #9E630C; color: #DCCFC6;}}" {{!}} <span style="text-transform: uppercase;">{{#invoke:Lang|get_string|Citadel_ComponentRequired}}</span><br/>{{ItemIcon|{{{component1_name|Basic Magazine}}}}}|}}
  | background-color: #9E630C; color: #DCCFC6;}}" {{!}} <span style="text-transform: uppercase;">{{#invoke:Lang|get_string|Citadel_ComponentRequired}}</span><br/>{{ItemIcon|{{{component1_name}}}}}|}}
|-
|-
{{#ifeq:{{{has_components2|}}}|true|
{{#ifeq:{{{component2_name|}}}|
{{!}}-
{{!}}-
! colspan="4" class="components-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo',serif; {{
! colspan="4" class="components-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo',serif; {{
Line 285: Line 285:
  | Vitality = background-color: #203500; color: #C7C9C6;
  | Vitality = background-color: #203500; color: #C7C9C6;
  | Spirit = background-color: #3a2231; color: #C9C7CB;
  | Spirit = background-color: #3a2231; color: #C9C7CB;
  | background-color: #9E630C; color: #DCCFC6;}}" {{!}}{{ItemIcon|{{{component2_name|Basic Magazine}}}}}|}}
  | background-color: #9E630C; color: #DCCFC6;}}" {{!}}{{ItemIcon|{{{component2_name}}}}}|}}
|-
|-
{{#ifeq:{{{has_iscomponentof|}}}|true|
{{#ifeq:{{{iscomponentof1_name|}}}|
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
#switch: {{{item_type|{{#invoke:ItemData|get_type|{{#var:item_key_or_en}}|raw=true}}}}}
#switch: {{{item_type|{{#invoke:ItemData|get_type|{{#var:item_key_or_en}}|raw=true}}}}}
Line 293: Line 293:
  | Vitality = background-color: #436310; color: #CACFC7;
  | Vitality = background-color: #436310; color: #CACFC7;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}} <span style="text-transform: uppercase;">{{#invoke:Lang|get_string|Citadel_IsComponentOf}}</span><br/>{{ItemIcon|{{{iscomponentof1_name|Basic Magazine}}}}}|}}
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}} <span style="text-transform: uppercase;">{{#invoke:Lang|get_string|Citadel_IsComponentOf}}</span><br/>{{ItemIcon|{{{iscomponentof1_name}}}}}|}}
{{#ifeq:{{{has_iscomponentof2|}}}|true|
{{#ifeq:{{{iscomponentof2_name|}}}|
{{!}}-
{{!}}-
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
Line 301: Line 301:
  | Vitality = background-color: #436310; color: #CACFC7;
  | Vitality = background-color: #436310; color: #CACFC7;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}}{{ItemIcon|{{{iscomponentof2_name|Basic Magazine}}}}}|}}
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}}{{ItemIcon|{{{iscomponentof2_name}}}}}|}}
|-
|-
{{#ifeq:{{{has_iscomponentof3|}}}|true|
{{#ifeq:{{{iscomponentof3_name|}}}|
{{!}}-
{{!}}-
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
! colspan="4" class="is-component-of-header" style="text-align:left; padding:0 12px; font-weight:bold; font-size:16px; font-family:'Retail Demo', serif; {{
Line 310: Line 310:
  | Vitality = background-color: #436310; color: #CACFC7;
  | Vitality = background-color: #436310; color: #CACFC7;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | Spirit = background-color: #3a2231; color: #CCC8D2;
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}}{{ItemIcon|{{{iscomponentof3_name|Basic Magazine}}}}}|}}
  | background-color: #704A0C; color: #D1CBC6;}}" {{!}}{{ItemIcon|{{{iscomponentof3_name}}}}}|}}
|-
|-
| colspan="4" class="codename" style=padding-left:12px; | {{#invoke:Dictionary|translate|Codename}}: {{{codename|{{#invoke:ItemData|get_codename|{{#var:item_key_or_en}}}}}}}
| colspan="4" class="codename" style=padding-left:12px; | {{#invoke:Dictionary|translate|Codename}}: {{{codename|{{#invoke:ItemData|get_codename|{{#var:item_key_or_en}}}}}}}