Welcome to Wargaming.net Wiki!
Variants

Template:WoWs Ship/draft

Jump to: navigation, search
{{#vardefine:code|{{WoWs_Data|{{PAGENAME}}}}}}<!--
-->{{#vardefine:ship_name|{{#shipstr:{{#shipchars:{{#var:code}}|mark}}}}}}<!--
-->{{#vardefine:nation|{{#shipattr:nation}}}}<!--
-->{{#vardefine:s_class|{{#shipattr:class}}}}<!--
-->{{#vardefine:level|{{#shipattr:level}}}}<!--
-->{{#vardefine:ancestors|{{#shipattr:ancestors}}}}<!--
-->{{#vardefine:children|{{#shipattr:children}}}}<!--
-->{{#vardefine:prem|{{#if:{{#shipattr:notInShop}}|2|{{#if:{{#shipattr:gold}}|1|{{#ifeq:{{#var:code}}|PJSC014_Kitakami_1945|2|0}}}}}}}}<!--
-->{{#vardefine:special|{{#ifeq:{{#explode:{{#shipattr:tags}}|;|1}}|special|1}}}}<!--
ШАПКА
--><!-- 
КАРТОЧКА
-->__NOTOC____NOTITLE____NOEDITSECTION__{{WoWs_SC|stock}}{{WoWs_SC|top}}<!-- 
ЛИД
--><div class="b-description gw-frame-1"><div class="b-description-img b-description-img__indent b-description-img__single"><div class="b-description-img_flag b-description-img_flag__{{#var:nation}}"></div><div class="l-description-img_class"><span class="b-description-img_type b-description-img_type__{{lc:{{#var:s_class}}}}{{#if:{{#var:prem}}>0|-premium}}"></span><span class="b-description-img_class">{{Level|{{#var:level}}}}</span></div><div class="b-description-img_vehicle">[[File:Ship_{{#var:code}}.png|160px|link=|left]]</div><div class="l-description-img_price"><span class="b-description-img_price{{#ifexpr:{{#var:prem}}>0| b-description-img_price__gold}}">{{#ifexpr:{{#var:prem}}=2|<span title="{{{Promo}}}">promo</span>|{{formatnum:{{#shipattr:price}}}}}}</span></div>{{#if: {{{rotator|}}} | <a href="#" class="b-description-img_360"></a> }}</div><p>{{#var:ship_name}} — {{ucfirst:{{WoWs_Nation|{{#var:nation}}|mp}}}} {{#ifexpr:{{#var:prem}}=2|promo }}{{#ifexpr:{{#var:prem}}>0|premium }}Tier {{Level|{{#var:level}}}} {{WoWs_Class|{{#var:s_class}}|ss}}.</p><p>{{#if:{{{Anno|}}}|{{{Anno}}}|{{#shipstr:{{#shipattr:description}}}}}}</p><p>{{#ifexpr: {{#var:prem}}=2|{{{Promo|}}} }}</p></div><!-- 
ТЕЛО
--><div class="b-wiki-panel"><h2>Modules</h2>
{{WoWs_SM|{{#var:code}}}}</div>
<h2>Compatible Equipment</h2>
{{WoWs Equipment|{{#var:code}}}}
{{#if:{{{Performance|}}}{{{Pros|}}}{{{Cons|}}}{{{Research|}}}|<h2>Player Opinion</h2>
{{#if:{{{Performance|}}}|<h3 id="performance">Performance</h3>
{{{Performance|}}} }}
{{#if:{{{Pros|}}}|{{#vardefine:adv|{{{Pros|}}}}}<h3 id="advantages">Pros:</h3><ul class="b-standart-list b-standart-list__advantage">{{#vardefine:adv_i|1}}{{#while:|{{#if:{{#explode:{{#var:adv}}|*|{{#var:adv_i}}}}|true}}|<li>{{#explode:{{#var:adv}}|*|{{#var:adv_i}}}}{{#vardefine:adv_i|{{#expr:{{#var:adv_i}}+1}}}}</li>}}</ul>}}
{{#if:{{{Cons|}}}|{{#vardefine:dadv|{{{Cons|}}}}}<h3 id="disadvantages">Cons:</h3><ul class="b-standart-list b-standart-list__limitations">{{#vardefine:dadv_i|1}}{{#while:|{{#if:{{#explode:{{#var:dadv}}|*|{{#var:dadv_i}}}}|true}}|<li>{{#explode:{{#var:dadv}}|*|{{#var:dadv_i}}}}{{#vardefine:dadv_i|{{#expr:{{#var:dadv_i}}+1}}}}</li>}}</ul>}}
{{#if:{{{Research|}}}|<h3 id="research">Research</h3>
{{{Research|}}} }} }}
{{#if:{{{Gallery|}}}|<h2>Gallery</h2>{{{Gallery|}}}}}
{{#if:{{{History|}}}|<div class="b-popup"><div class="b-popup_head js-tech-nav_head"><h2 style="margin:0">Historical Info</h2><span class="b-tech-nav_arrow"></span></div><div class="b-popup_content" style="display: none;"><div>
{{{History|}}}</div></div></div>}}
{{#if:{{{HistoricalGallery|}}}|<div class="b-popup"><div class="b-popup_head js-tech-nav_head"><div><h2>Historical Gallery</h2></div><span class="b-tech-nav_arrow"></span></div><div class="b-popup_content" style="display: none;"><div>{{{HistoricalGallery|}}}</div></div></div>}}<!--
== Optimal configuration == 
{{{Выбор оптимальной конфигурации|}}}
== History of changes ==
{{{История изменений|}}}
=== Video ===
{{{Video|}}}
-->{{#if:{{{Ref|}}}|<h2>References</h2>{{{Ref|}}}}}{{--}}<!-- 
Подвал --><div class="b-tech-nav"><div class="b-tech-nav_item"><div class="b-tech-nav_head js-tech-nav_head"><span class="b-tech-nav_icon b-tech-nav_icon__{{lc:{{#var:nation}}}}"></span><span>Ships {{WoWs_Nation|{{#var:nation}}}}</span><span class="b-tech-nav_arrow"></span></div><div class="b-tech-nav_content">
{| class="t-tech t-tech-ok"
{{#vardefine:list|{{WoWs_Class||list}}}}{{#vardefine:i|0}}{{#while:|{{#if:{{#explode:{{#var:list}}|;|{{#var:i}}}}|true}}
|{{#vardefine:cur_class|{{#explode:{{#var:list}}|;|{{#var:i}}}}}}{{#ifexpr:{{#var:i}}>0| 
{{!}}-}}
{{!}}{{WoWs_Class|{{#var:cur_class}}|bm}} 
{{!}}{{WoWs_ShipsList|{{#var:nation}}|{{#var:cur_class}}}}{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}}}
|}</div></div></div><div class="b-tech-nav"><div class="b-tech-nav_item"><div class="b-tech-nav_head js-tech-nav_head"><span class="b-tech-nav_icon b-tech-nav_icon__{{lc:{{#var:s_class}}}}"></span><span>{{WoWs_Class|{{#var:s_class}}|bm}}</span><span class="b-tech-nav_arrow"></span></div><div class="b-tech-nav_content">
{| class="t-tech t-tech-ok"
{{#vardefine:list|{{WoWs_Nation||list}}}}{{#vardefine:i|0}}{{#while:|{{#if:{{#explode:{{#var:list}}|;|{{#var:i}}}}|true}}|{{#vardefine:cur_nation|{{#explode:{{#var:list}}|;|{{#var:i}}}}}}{{#ifexpr:{{#var:i}}>0| 
{{!}}-}}
{{!}}{{WoWs_Nation|{{#var:cur_nation}}|bi}}
{{!}}{{WoWs_ShipsList|{{#var:cur_nation}}|{{#var:s_class}}}}{{#vardefine:i|{{#expr:{{#var:i}}+1}}}}}}
|}</div></div></div><!-- 
Категории -->[[Category:Ships {{WoWs_Nation|{{#var:nation}}|bv}}]][[Category:{{WoWs_Class|{{#var:s_class}}|bm}}]][[Category:Tier {{Level|{{#var:level}}}} ships]]{{#ifexpr:{{#var:prem}}>0|[[Category:Premium ships]]}}{{#ifexpr:{{#var:prem}}=2|[[Category:Promo and gift ships]]}}[[ru:Ship:{{WoWs_Data|{{PAGENAME}}|ru}}]]

Changelog

  • Changed the ship introduction line:
    • Using <p> to format the intro so these text can properly formatted by MediaWiki CSS.
    • Uppercasing ship nationality and "Tier" text.
  • Simplify the "Player Opinion" child heading, remove unnecessary <div>
  • Added a newline (i.e. enter) before {{{Performance|}}} and {{{Research|}}} and {{{History|}}} variables. This is important so that MediaWiki can parse the paragraph correctly. If there's no newline, MediaWiki won't parse the first block of text as paragraph.
  • Added float:clear {{--}} so that the Navboxes always placed in the bottom of page (never overtaken by overly long Infobox).