Refactor: Renaming mustache variable `page-isarticle` to `is-article`
Modifies this variable name to use proper hyphen-case and prioritizes the type of variable rather than it's source. This prioritization makes sense in Mustache templates because the variable is a boolean and is used exclusively in if statements, e.g. {{#is-article}} ... {{/is-article}} Change-Id: I72e9baf0a979d922b8217aabe8cf0c40699f891b
This commit is contained in:
parent
840bc5b0cd
commit
c22dc8d95b
|
@ -204,7 +204,7 @@ class SkinVector extends SkinMustache {
|
|||
$commonSkinData = array_merge( $parentData, [
|
||||
'consolidate-user-links' => $this->consolidateUserLinks(),
|
||||
|
||||
'page-isarticle' => (bool)$out->isArticle(),
|
||||
'is-article' => (bool)$out->isArticle(),
|
||||
|
||||
'is-mainpage' => $title->isMainPage(),
|
||||
// Remember that the string '0' is a valid title.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Indicator[] array-indicators wiki-defined badges such as "good article",
|
||||
"featured article". An empty array if none are defined.
|
||||
string html-title
|
||||
bool page-isarticle
|
||||
bool is-article
|
||||
string msg-tagline
|
||||
string html-subtitle
|
||||
string html-undelete-link
|
||||
|
@ -33,7 +33,7 @@
|
|||
{{>Indicators}}
|
||||
<h1 id="firstHeading" class="firstHeading" {{{html-user-language-attributes}}}>{{{html-title}}}</h1>
|
||||
<div id="bodyContent" class="mw-body-content">
|
||||
{{#page-isarticle}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/page-isarticle}}
|
||||
{{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}}
|
||||
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
|
||||
<div id="contentSub2">{{{html-undelete-link}}}</div>
|
||||
{{{html-user-message}}}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Indicator[] array-indicators wiki-defined badges such as "good article",
|
||||
"featured article". An empty array if none are defined.
|
||||
string html-title
|
||||
bool page-isarticle
|
||||
bool is-article
|
||||
string msg-tagline
|
||||
string html-subtitle
|
||||
string html-undelete-link
|
||||
|
@ -64,15 +64,15 @@
|
|||
{{{html-title}}}
|
||||
</h1>
|
||||
{{>Indicators}}
|
||||
{{#page-isarticle}}
|
||||
{{#is-article}}
|
||||
<div id="siteSub" class="noprint">{{msg-tagline}}</div>
|
||||
{{/page-isarticle}}
|
||||
{{/is-article}}
|
||||
</header>
|
||||
{{/is-language-in-header}}
|
||||
|
||||
<div id="bodyContent" class="mw-body-content">
|
||||
{{^is-language-in-header}}
|
||||
{{#page-isarticle}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/page-isarticle}}
|
||||
{{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}}
|
||||
{{/is-language-in-header}}
|
||||
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
|
||||
<div id="contentSub2">{{{html-undelete-link}}}</div>
|
||||
|
|
|
@ -89,7 +89,7 @@ const DATA_INDICATORS = [ {
|
|||
|
||||
export const LEGACY_TEMPLATE_DATA = {
|
||||
'html-title': 'Vector 2019',
|
||||
'page-isarticle': true,
|
||||
'is-article': true,
|
||||
'msg-tagline': 'From Wikipedia, the free encyclopedia',
|
||||
'html-user-language-attributes': htmlUserLanguageAttributes,
|
||||
'msg-vector-jumptonavigation': 'Jump to navigation',
|
||||
|
|
Loading…
Reference in New Issue