[dev] [Mustache] replace spaces with tabs

The Mustache templates were a bit of a mix of tabs and spaces. I like
spaces personally but dislike inconsistency within the project more. Use
tabs.

Change-Id: I22b777489d7281b42d1ab1981b47b2a71d3b639a
This commit is contained in:
Stephen Niedzielski 2020-04-08 15:40:56 -06:00
parent 63d9d37777
commit 16670834d7
4 changed files with 120 additions and 152 deletions

View File

@ -12,15 +12,11 @@
<div id="p-logo" role="banner">
<a {{{html-logo-attributes}}}></a>
</div>
{{#array-portals-first}}
{{>Portal}}
{{/array-portals-first}}
{{#array-portals-first}}{{>Portal}}{{/array-portals-first}}
{{#data-emphasized-sidebar-action}}
<div class="vector-emphasized-sidebar-action">
<a class="vector-emphasized-sidebar-action-link" href="{{href}}">{{text}}</a>
</div>
{{/data-emphasized-sidebar-action}}
{{#array-portals-rest}}
{{>Portal}}
{{/array-portals-rest}}
{{#array-portals-rest}}{{>Portal}}{{/array-portals-rest}}
</div>

View File

@ -1,11 +1,11 @@
{{!
string html-headelement a string of attribute HTML that begins with `<html> and ends with '</head>'
and contains `meta` tags and ResourceLoader internals.
string html-headelement a string of attribute HTML that begins with `<html>` and ends with
`</head>` and contains `meta` tags and ResourceLoader internals.
string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice.
Also used by CentralNotice to inject banners into Vector.
string html-indicators raw HTML containing wiki-defined badges such as "good article", "featured article".
An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML./
string html-indicators raw HTML containing wiki-defined badges such as "good article",
"featured article". An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML.
string html-title
string html-prebodyhtml
bool page-isarticle
@ -20,8 +20,8 @@
string html-catlinks
string html-debuglog
string html-dataAfterContent
string html-navigation-heading heading for entire navigation that is
usually hidden to screen readers
string html-navigation-heading heading for entire navigation that is usually hidden to screen
readers
object data-personal-menu See PersonalMenu.mustache for documentation.
object data-namespace-tabs. See VectorTabs.mustache for documentation.
object data-variants. See VectorMenu.mustache for documentation.
@ -30,8 +30,8 @@
object data-search-box. See SearchBox.mustache for documentation.
object data-sidebar. See Sidebar.mustache for documentation.
object data-footer for footer template partial. see Footer.mustache for documentation.
string html-printtail HTML to render at the end of the page contained necessary script tags for ResourceLoader
terminated with `</body></html>`.
string html-printtail HTML to render at the end of the page contained necessary script tags for
ResourceLoader terminated with `</body></html>`.
}}
{{{html-headelement}}}
@ -39,7 +39,9 @@
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
<a id="top"></a>
{{#html-sitenotice}}<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>{{/html-sitenotice}}
{{#html-sitenotice}}
<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>
{{/html-sitenotice}}
{{{html-indicators}}}
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
{{{html-prebodyhtml}}}
@ -68,34 +70,18 @@
<div id="mw-navigation">
<h2>{{{html-navigation-heading}}}</h2>
<div id="mw-head">
{{#data-personal-menu}}
{{>PersonalMenu}}
{{/data-personal-menu}}
{{#data-personal-menu}}{{>PersonalMenu}}{{/data-personal-menu}}
<div id="left-navigation">
{{#data-namespace-tabs}}
{{>VectorTabs}}
{{/data-namespace-tabs}}
{{#data-variants}}
{{>VectorMenu}}
{{/data-variants}}
{{#data-namespace-tabs}}{{>VectorTabs}}{{/data-namespace-tabs}}
{{#data-variants}}{{>VectorMenu}}{{/data-variants}}
</div>
<div id="right-navigation">
{{#data-page-actions}}
{{>VectorTabs}}
{{/data-page-actions}}
{{#data-page-actions-more}}
{{>VectorMenu}}
{{/data-page-actions-more}}
{{#data-search-box}}
{{>SearchBox}}
{{/data-search-box}}
{{#data-page-actions}}{{>VectorTabs}}{{/data-page-actions}}
{{#data-page-actions-more}}{{>VectorMenu}}{{/data-page-actions-more}}
{{#data-search-box}}{{>SearchBox}}{{/data-search-box}}
</div>
</div>
{{#data-sidebar}}
{{>Sidebar}}
{{/data-sidebar}}
{{#data-sidebar}}{{>Sidebar}}{{/data-sidebar}}
</div>
{{#data-footer}}
{{>Footer}}
{{/data-footer}}
{{#data-footer}}{{>Footer}}{{/data-footer}}
{{{html-printtail}}}

View File

@ -1,11 +1,11 @@
{{!
string html-headelement a string of attribute HTML that begins with `<html> and ends with '</head>'
and contains `meta` tags and ResourceLoader internals.
string html-headelement a string of attribute HTML that begins with `<html>` and ends with
`</head>` and contains `meta` tags and ResourceLoader internals.
string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice.
Also used by CentralNotice to inject banners into Vector.
string html-indicators raw HTML containing wiki-defined badges such as "good article", "featured article".
An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML./
string html-indicators raw HTML containing wiki-defined badges such as "good article",
"featured article". An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML.
string html-title
string html-prebodyhtml
bool page-isarticle
@ -30,8 +30,8 @@
object data-search-box. See SearchBox.mustache for documentation.
object data-sidebar. See Sidebar.mustache for documentation.
object data-footer for footer template partial. see Footer.mustache for documentation.
string html-printtail HTML to render at the end of the page contained necessary script tags for ResourceLoader
terminated with `</body></html>`.
string html-printtail HTML to render at the end of the page contained necessary script tags for
ResourceLoader terminated with `</body></html>`.
}}
{{{html-headelement}}}
@ -39,7 +39,9 @@
<div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main">
<a id="top"></a>
{{#html-sitenotice}}<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>{{/html-sitenotice}}
{{#html-sitenotice}}
<div id="siteNotice" class="mw-body-content">{{{html-sitenotice}}}</div>
{{/html-sitenotice}}
{{{html-indicators}}}
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
{{{html-prebodyhtml}}}
@ -68,34 +70,18 @@
<div id="mw-navigation">
<h2>{{{html-navigation-heading}}}</h2>
<div id="mw-head">
{{#data-personal-menu}}
{{>PersonalMenu}}
{{/data-personal-menu}}
{{#data-personal-menu}}{{>PersonalMenu}}{{/data-personal-menu}}
<div id="left-navigation">
{{#data-namespace-tabs}}
{{>VectorTabs}}
{{/data-namespace-tabs}}
{{#data-variants}}
{{>VectorMenu}}
{{/data-variants}}
{{#data-namespace-tabs}}{{>VectorTabs}}{{/data-namespace-tabs}}
{{#data-variants}}{{>VectorMenu}}{{/data-variants}}
</div>
<div id="right-navigation">
{{#data-page-actions}}
{{>VectorTabs}}
{{/data-page-actions}}
{{#data-page-actions-more}}
{{>VectorMenu}}
{{/data-page-actions-more}}
{{#data-search-box}}
{{>SearchBox}}
{{/data-search-box}}
{{#data-page-actions}}{{>VectorTabs}}{{/data-page-actions}}
{{#data-page-actions-more}}{{>VectorMenu}}{{/data-page-actions-more}}
{{#data-search-box}}{{>SearchBox}}{{/data-search-box}}
</div>
</div>
{{#data-sidebar}}
{{>Sidebar}}
{{/data-sidebar}}
{{#data-sidebar}}{{>Sidebar}}{{/data-sidebar}}
</div>
{{#data-footer}}
{{>Footer}}
{{/data-footer}}
{{#data-footer}}{{>Footer}}{{/data-footer}}
{{{html-printtail}}}