[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

@ -1,17 +1,17 @@
{{! {{!
@typedef object footerItem @typedef object footerItem
@prop string id of list item element @prop string id of list item element
@prop string html of list item @prop string html of list item
@prop footerItem[] items @prop footerItem[] items
@typedef object footerRow @typedef object footerRow
@prop string className of list element @prop string className of list element
@prop string id of list element @prop string id of list element
@prop footerItem[] array-items @prop footerItem[] array-items
string html-hook-vector-before-footer output of VectorBeforeFooter hook string html-hook-vector-before-footer output of VectorBeforeFooter hook
string|null html-userlangattributes a string of attribute HTML string|null html-userlangattributes a string of attribute HTML
footerRow[] array-footer-rows iterable list of footer rows footerRow[] array-footer-rows iterable list of footer rows
}} }}
{{{html-hook-vector-before-footer}}} {{{html-hook-vector-before-footer}}}
<div id="footer" role="contentinfo" {{{html-userlangattributes}}}> <div id="footer" role="contentinfo" {{{html-userlangattributes}}}>

View File

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

View File

@ -1,37 +1,37 @@
{{! {{!
string html-headelement a string of attribute HTML that begins with `<html> and ends with '</head>' string html-headelement a string of attribute HTML that begins with `<html>` and ends with
and contains `meta` tags and ResourceLoader internals. `</head>` and contains `meta` tags and ResourceLoader internals.
string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice. string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice.
Also used by CentralNotice to inject banners into Vector. Also used by CentralNotice to inject banners into Vector.
string html-indicators raw HTML containing wiki-defined badges such as "good article", "featured article". string html-indicators raw HTML containing wiki-defined badges such as "good article",
An empty string if none are defined. "featured article". An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML./ string page-langcode the content language of the article. Assumed to be escaped HTML.
string html-title string html-title
string html-prebodyhtml string html-prebodyhtml
bool page-isarticle bool page-isarticle
string msg-tagline string msg-tagline
string html-subtitle string html-subtitle
string html-undelete string html-undelete
string html-newtalk string html-newtalk
string msg-jumptonavigation string msg-jumptonavigation
string msg-jumptosearch string msg-jumptosearch
string html-bodycontent string html-bodycontent
string html-printfooter string html-printfooter
string html-catlinks string html-catlinks
string html-debuglog string html-debuglog
string html-dataAfterContent string html-dataAfterContent
string html-navigation-heading heading for entire navigation that is string html-navigation-heading heading for entire navigation that is usually hidden to screen
usually hidden to screen readers readers
object data-personal-menu See PersonalMenu.mustache for documentation. object data-personal-menu See PersonalMenu.mustache for documentation.
object data-namespace-tabs. See VectorTabs.mustache for documentation. object data-namespace-tabs. See VectorTabs.mustache for documentation.
object data-variants. See VectorMenu.mustache for documentation. object data-variants. See VectorMenu.mustache for documentation.
object data-page-actions. See VectorTabs.mustache for documentation. object data-page-actions. See VectorTabs.mustache for documentation.
object data-page-actions-more. See VectorMenu.mustache for documentation. object data-page-actions-more. See VectorMenu.mustache for documentation.
object data-search-box. See SearchBox.mustache for documentation. object data-search-box. See SearchBox.mustache for documentation.
object data-sidebar. See Sidebar.mustache for documentation. object data-sidebar. See Sidebar.mustache for documentation.
object data-footer for footer template partial. see Footer.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 string html-printtail HTML to render at the end of the page contained necessary script tags for
terminated with `</body></html>`. ResourceLoader terminated with `</body></html>`.
}} }}
{{{html-headelement}}} {{{html-headelement}}}
@ -39,7 +39,9 @@
<div id="mw-head-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main"> <div id="content" class="mw-body" role="main">
<a id="top"></a> <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}}} {{{html-indicators}}}
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1> <h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
{{{html-prebodyhtml}}} {{{html-prebodyhtml}}}
@ -49,15 +51,15 @@
{{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}} {{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}}
{{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}} {{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}}
{{! {{!
Keep this empty `div` for compatibility with gadgets and user scripts Keep this empty `div` for compatibility with gadgets and user scripts
using this place to insert extra elements before. using this place to insert extra elements before.
}} }}
<div id="jump-to-nav"></div> <div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a> <a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
<a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a> <a class="mw-jump-link" href="#p-search">{{msg-jumptosearch}}</a>
{{{html-bodycontent}}} {{{html-bodycontent}}}
{{#html-printfooter}} {{#html-printfooter}}
<div class="printfooter">{{{html-printfooter}}}</div> <div class="printfooter">{{{html-printfooter}}}</div>
{{/html-printfooter}} {{/html-printfooter}}
{{{html-catlinks}}} {{{html-catlinks}}}
<div class="visualClear"></div> <div class="visualClear"></div>
@ -66,36 +68,20 @@
</div> </div>
{{{html-dataAfterContent}}} {{{html-dataAfterContent}}}
<div id="mw-navigation"> <div id="mw-navigation">
<h2>{{{html-navigation-heading}}}</h2> <h2>{{{html-navigation-heading}}}</h2>
<div id="mw-head"> <div id="mw-head">
{{#data-personal-menu}} {{#data-personal-menu}}{{>PersonalMenu}}{{/data-personal-menu}}
{{>PersonalMenu}} <div id="left-navigation">
{{/data-personal-menu}} {{#data-namespace-tabs}}{{>VectorTabs}}{{/data-namespace-tabs}}
<div id="left-navigation"> {{#data-variants}}{{>VectorMenu}}{{/data-variants}}
{{#data-namespace-tabs}} </div>
{{>VectorTabs}} <div id="right-navigation">
{{/data-namespace-tabs}} {{#data-page-actions}}{{>VectorTabs}}{{/data-page-actions}}
{{#data-variants}} {{#data-page-actions-more}}{{>VectorMenu}}{{/data-page-actions-more}}
{{>VectorMenu}} {{#data-search-box}}{{>SearchBox}}{{/data-search-box}}
{{/data-variants}} </div>
</div> </div>
<div id="right-navigation"> {{#data-sidebar}}{{>Sidebar}}{{/data-sidebar}}
{{#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}}
</div> </div>
{{#data-footer}} {{#data-footer}}{{>Footer}}{{/data-footer}}
{{>Footer}}
{{/data-footer}}
{{{html-printtail}}} {{{html-printtail}}}

View File

@ -1,37 +1,37 @@
{{! {{!
string html-headelement a string of attribute HTML that begins with `<html> and ends with '</head>' string html-headelement a string of attribute HTML that begins with `<html>` and ends with
and contains `meta` tags and ResourceLoader internals. `</head>` and contains `meta` tags and ResourceLoader internals.
string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice. string|null html-sitenotice the contents of a banner defined in MediaWiki:Sitenotice.
Also used by CentralNotice to inject banners into Vector. Also used by CentralNotice to inject banners into Vector.
string html-indicators raw HTML containing wiki-defined badges such as "good article", "featured article". string html-indicators raw HTML containing wiki-defined badges such as "good article",
An empty string if none are defined. "featured article". An empty string if none are defined.
string page-langcode the content language of the article. Assumed to be escaped HTML./ string page-langcode the content language of the article. Assumed to be escaped HTML.
string html-title string html-title
string html-prebodyhtml string html-prebodyhtml
bool page-isarticle bool page-isarticle
string msg-tagline string msg-tagline
string html-subtitle string html-subtitle
string html-undelete string html-undelete
string html-newtalk string html-newtalk
string msg-jumptonavigation string msg-jumptonavigation
string msg-jumptosearch string msg-jumptosearch
string html-bodycontent string html-bodycontent
string html-printfooter string html-printfooter
string html-catlinks string html-catlinks
string html-debuglog string html-debuglog
string html-dataAfterContent string html-dataAfterContent
string html-navigation-heading heading for entire navigation that is string html-navigation-heading heading for entire navigation that is
usually hidden to screen readers usually hidden to screen readers
object data-personal-menu See PersonalMenu.mustache for documentation. object data-personal-menu See PersonalMenu.mustache for documentation.
object data-namespace-tabs. See VectorTabs.mustache for documentation. object data-namespace-tabs. See VectorTabs.mustache for documentation.
object data-variants. See VectorMenu.mustache for documentation. object data-variants. See VectorMenu.mustache for documentation.
object data-page-actions. See VectorTabs.mustache for documentation. object data-page-actions. See VectorTabs.mustache for documentation.
object data-page-actions-more. See VectorMenu.mustache for documentation. object data-page-actions-more. See VectorMenu.mustache for documentation.
object data-search-box. See SearchBox.mustache for documentation. object data-search-box. See SearchBox.mustache for documentation.
object data-sidebar. See Sidebar.mustache for documentation. object data-sidebar. See Sidebar.mustache for documentation.
object data-footer for footer template partial. see Footer.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 string html-printtail HTML to render at the end of the page contained necessary script tags for
terminated with `</body></html>`. ResourceLoader terminated with `</body></html>`.
}} }}
{{{html-headelement}}} {{{html-headelement}}}
@ -39,7 +39,9 @@
<div id="mw-head-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main"> <div id="content" class="mw-body" role="main">
<a id="top"></a> <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}}} {{{html-indicators}}}
<h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1> <h1 id="firstHeading" class="firstHeading" lang="{{page-langcode}}">{{{html-title}}}</h1>
{{{html-prebodyhtml}}} {{{html-prebodyhtml}}}
@ -49,8 +51,8 @@
{{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}} {{#html-undelete}}<div id="contentSub2">{{{html-undelete}}}</div>{{/html-undelete}}
{{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}} {{#html-newtalk}}<div class="usermessage">{{{html-newtalk}}}</div>{{/html-newtalk}}
{{! {{!
Keep this empty `div` for compatibility with gadgets and user scripts Keep this empty `div` for compatibility with gadgets and user scripts
using this place to insert extra elements before. using this place to insert extra elements before.
}} }}
<div id="jump-to-nav"></div> <div id="jump-to-nav"></div>
<a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a> <a class="mw-jump-link" href="#mw-head">{{msg-jumptonavigation}}</a>
@ -66,36 +68,20 @@
</div> </div>
{{{html-dataAfterContent}}} {{{html-dataAfterContent}}}
<div id="mw-navigation"> <div id="mw-navigation">
<h2>{{{html-navigation-heading}}}</h2> <h2>{{{html-navigation-heading}}}</h2>
<div id="mw-head"> <div id="mw-head">
{{#data-personal-menu}} {{#data-personal-menu}}{{>PersonalMenu}}{{/data-personal-menu}}
{{>PersonalMenu}} <div id="left-navigation">
{{/data-personal-menu}} {{#data-namespace-tabs}}{{>VectorTabs}}{{/data-namespace-tabs}}
<div id="left-navigation"> {{#data-variants}}{{>VectorMenu}}{{/data-variants}}
{{#data-namespace-tabs}} </div>
{{>VectorTabs}} <div id="right-navigation">
{{/data-namespace-tabs}} {{#data-page-actions}}{{>VectorTabs}}{{/data-page-actions}}
{{#data-variants}} {{#data-page-actions-more}}{{>VectorMenu}}{{/data-page-actions-more}}
{{>VectorMenu}} {{#data-search-box}}{{>SearchBox}}{{/data-search-box}}
{{/data-variants}} </div>
</div> </div>
<div id="right-navigation"> {{#data-sidebar}}{{>Sidebar}}{{/data-sidebar}}
{{#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}}
</div> </div>
{{#data-footer}} {{#data-footer}}{{>Footer}}{{/data-footer}}
{{>Footer}}
{{/data-footer}}
{{{html-printtail}}} {{{html-printtail}}}