Merge "templates: Move spaces into conditions for cleaner html"

This commit is contained in:
jenkins-bot 2021-09-29 22:39:06 +00:00 committed by Gerrit Code Review
commit 74736571e7
5 changed files with 10 additions and 10 deletions

View File

@ -2,7 +2,7 @@
{{^href}}<button{{/href}}
{{#id}}id="{{.}}"{{/id}}
{{#event}}data-event-name="{{.}}"{{/event}}
class="mw-ui-button {{#is-quiet}}mw-ui-quiet{{/is-quiet}} {{#icon}}mw-ui-icon mw-ui-icon-element mw-ui-icon-{{.}}{{/icon}} {{class}}">
class="mw-ui-button{{#is-quiet}} mw-ui-quiet{{/is-quiet}}{{#icon}} mw-ui-icon mw-ui-icon-element mw-ui-icon-{{.}}{{/icon}} {{class}}">
{{{html-vector-button-icon}}}
<span>{{label}}</span>
{{#href}}</a>{{/href}}

View File

@ -1,4 +1,4 @@
<ul id="{{id}}" {{#className}}class="{{.}}"{{/className}}>
<ul id="{{id}}"{{#className}} class="{{.}}"{{/className}}>
{{#array-items}}
<li id="{{id}}">{{{html}}}</li>
{{/array-items}}

View File

@ -2,7 +2,7 @@
See @typedef MenuDefinition
}}
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
<nav id="{{id}}" {{#class}}class="{{.}}"{{/class}} aria-labelledby="{{id}}-label" role="navigation" {{{html-tooltip}}}
<nav id="{{id}}"{{#class}} class="{{.}}"{{/class}} aria-labelledby="{{id}}-label" role="navigation" {{{html-tooltip}}}
{{{html-user-language-attributes}}}>
{{#is-dropdown}}
<input type="checkbox"
@ -10,9 +10,9 @@
role="button"
aria-haspopup="true"
data-event-name="ui.dropdown-{{id}}"
class="{{#checkbox-class}}{{.}}{{/checkbox-class}} vector-menu-checkbox" aria-labelledby="{{id}}-label" />
class="{{#checkbox-class}}{{.}} {{/checkbox-class}}vector-menu-checkbox" aria-labelledby="{{id}}-label" />
{{/is-dropdown}}
<h3 id="{{id}}-label" aria-label="{{aria-label}}" {{#heading-class}}class="{{.}}"{{/heading-class}} {{^is-legacy}}aria-hidden="true"{{/is-legacy}}>
<h3 id="{{id}}-label" aria-label="{{aria-label}}"{{#heading-class}} class="{{.}}"{{/heading-class}}{{^is-legacy}} aria-hidden="true"{{/is-legacy}}>
{{{html-vector-heading-icon}}}
<span>{{label}}</span>
{{#is-dropdown}}

View File

@ -1,11 +1,11 @@
{{!
See @typedef SearchData
}}
<div {{#is-primary}}id="p-search"{{/is-primary}} role="search" class="{{class}} vector-search-box">
<div{{#is-primary}} id="p-search"{{/is-primary}} role="search" class="{{class}} vector-search-box">
<div>
{{#is-legacy}}
<h3 {{{html-user-language-attributes}}}>
<label {{#is-primary}}for="searchInput"{{/is-primary}}>{{msg-search}}</label>
<label{{#is-primary}} for="searchInput"{{/is-primary}}>{{msg-search}}</label>
</h3>
{{/is-legacy}}
<form action="{{form-action}}" id="{{form-id}}"
@ -29,9 +29,9 @@
* The mediawiki.searchSuggest module, after doing tests for the broken browsers, removes
the 'fulltext' button and handles 'fulltext' search itself; this will reveal the 'go'
button and cause it to be used. !}}
<input {{#is-primary}}id="mw-searchButton"{{/is-primary}}
<input{{#is-primary}} id="mw-searchButton"{{/is-primary}}
{{{html-button-fulltext-attributes}}} value="{{msg-searchbutton}}" />
<input {{#is-primary}}id="searchButton"{{/is-primary}}
<input{{#is-primary}} id="searchButton"{{/is-primary}}
{{{html-button-go-attributes}}} value="{{msg-searcharticle}}" />
</div>
</form>

View File

@ -1,5 +1,5 @@
<header id="vector-sticky-header"
class="vector-sticky-header {{#is-visible}}vector-sticky-header-visible{{/is-visible}}">
class="vector-sticky-header{{#is-visible}} vector-sticky-header-visible{{/is-visible}}">
<div class="vector-sticky-header-start">
<div class="vector-sticky-header-icon-start">
{{#data-button-start}}