mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Revert "Generate Minerva search HTML with SkinMustache data"
This reverts commit ecd35774b1
.
Reason for revert: Logo has disappeared on beta cluster.
The Logo template was using data-logos, and
the addition of the data-search-box section broke this. Given its
a Friday, probably best to revert the patch and reapply again.
Change-Id: Id517d32b20b6512b9b2e1fffab012522dfd7b618
This commit is contained in:
parent
ecd35774b1
commit
f9214f8ad5
|
@ -194,7 +194,20 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
// prepare template data
|
// prepare template data
|
||||||
return [
|
return [
|
||||||
'banners' => $data['banners'],
|
'banners' => $data['banners'],
|
||||||
|
'wgScript' => $data['wgScript'],
|
||||||
'isAnon' => $data['username'] === null,
|
'isAnon' => $data['username'] === null,
|
||||||
|
'search' => $data['search'],
|
||||||
|
// A button when clicked will submit the form
|
||||||
|
// This is used so that on tablet devices with JS disabled the search button
|
||||||
|
// passes the value of input to the search
|
||||||
|
// We avoid using input[type=submit] as these cannot be easily styled as mediawiki ui icons
|
||||||
|
// which is problematic in Opera Mini (see T140490)
|
||||||
|
'searchButton' => Html::rawElement( 'button', [
|
||||||
|
'id' => 'searchIcon',
|
||||||
|
'class' => MinervaUI::iconClass(
|
||||||
|
'search-base20', 'element', 'skin-minerva-search-trigger', 'wikimedia'
|
||||||
|
)
|
||||||
|
], wfMessage( 'searchbutton' )->escaped() ),
|
||||||
'userNotificationsHTML' => $data['userNotificationsHTML'] ?? '',
|
'userNotificationsHTML' => $data['userNotificationsHTML'] ?? '',
|
||||||
'data-main-menu' => $this->getMainMenuData( $data ),
|
'data-main-menu' => $this->getMainMenuData( $data ),
|
||||||
'hasheadingholder' => $hasHeadingHolder,
|
'hasheadingholder' => $hasHeadingHolder,
|
||||||
|
@ -217,6 +230,7 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
$skinOptions->get( SkinOptions::TALK_AT_TOP ) ? [
|
$skinOptions->get( SkinOptions::TALK_AT_TOP ) ? [
|
||||||
'items' => array_values( $data['content_navigation']['namespaces'] ),
|
'items' => array_values( $data['content_navigation']['namespaces'] ),
|
||||||
] : false,
|
] : false,
|
||||||
|
'searchPageTitle' => $this->getSkin()->getSearchPageTitle(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
<div id="mw-mf-page-center">
|
<div id="mw-mf-page-center">
|
||||||
<a class="mw-mf-page-center__mask" href="#"></a>
|
<a class="mw-mf-page-center__mask" href="#"></a>
|
||||||
<header class="header-container header-chrome">
|
<header class="header-container header-chrome">
|
||||||
{{#data-search-box}}
|
<form class="minerva-header" action="{{wgScript}}" method="get">
|
||||||
<form class="minerva-header" action="{{form-action}}" method="get">
|
|
||||||
<nav class="navigation-drawer toggle-list view-border-box">
|
<nav class="navigation-drawer toggle-list view-border-box">
|
||||||
<input type="checkbox" id="main-menu-input" class="toggle-list__checkbox" role="button" aria-labelledby="mw-mf-main-menu-button">
|
<input type="checkbox" id="main-menu-input" class="toggle-list__checkbox" role="button" aria-labelledby="mw-mf-main-menu-button">
|
||||||
<label for="main-menu-input" id="mw-mf-main-menu-button"
|
<label for="main-menu-input" id="mw-mf-main-menu-button"
|
||||||
|
@ -19,21 +18,13 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<input type="hidden" name="title" value="{{page-title}}"/>
|
<input type="hidden" name="title" value="{{searchPageTitle}}"/>
|
||||||
<input class="search mw-ui-background-icon-search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
<input class="search mw-ui-background-icon-search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
||||||
{{{html-input-attributes}}}">
|
autocomplete="off" placeholder="{{msg-mobile-frontend-placeholder}}" aria-label="{{msg-mobile-frontend-placeholder}}"
|
||||||
|
value="{{search}}">
|
||||||
</div>
|
</div>
|
||||||
<nav class="minerva-user-navigation" aria-label="{{msg-minerva-user-navigation}}">
|
<nav class="minerva-user-navigation" aria-label="{{msg-minerva-user-navigation}}">
|
||||||
<div>
|
<div>{{{searchButton}}}</div>
|
||||||
{{!
|
|
||||||
A button when clicked will submit the form
|
|
||||||
This is used so that on tablet devices with JS disabled the search button
|
|
||||||
passes the value of input to the search
|
|
||||||
We avoid using input[type=submit] as these cannot be easily styled as mediawiki ui icons
|
|
||||||
which is problematic in Opera Mini (see T140490)
|
|
||||||
}}
|
|
||||||
<button id="searchIcon" class="mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-search-base20 skin-minerva-search-trigger mw-ui-button mw-ui-quiet">{{msg-searchbutton}}</button>
|
|
||||||
</div>
|
|
||||||
{{^isAnon}}
|
{{^isAnon}}
|
||||||
<div class="minerva-user-notifications" id="pt-notifications-alert">
|
<div class="minerva-user-notifications" id="pt-notifications-alert">
|
||||||
{{{userNotificationsHTML}}}
|
{{{userNotificationsHTML}}}
|
||||||
|
@ -42,7 +33,6 @@
|
||||||
{{#userMenuHTML}}{{{userMenuHTML}}}{{/userMenuHTML}}
|
{{#userMenuHTML}}{{{userMenuHTML}}}{{/userMenuHTML}}
|
||||||
</nav>
|
</nav>
|
||||||
</form>
|
</form>
|
||||||
{{/data-search-box}}
|
|
||||||
</header>
|
</header>
|
||||||
<main id="content" class="mw-body">
|
<main id="content" class="mw-body">
|
||||||
<div class="banner-container">
|
<div class="banner-container">
|
||||||
|
|
|
@ -115,9 +115,9 @@
|
||||||
"templateDirectory": "includes/Skins",
|
"templateDirectory": "includes/Skins",
|
||||||
"messages": [
|
"messages": [
|
||||||
"mainpage",
|
"mainpage",
|
||||||
"searchbutton",
|
|
||||||
"minerva-user-navigation",
|
"minerva-user-navigation",
|
||||||
"mobile-frontend-main-menu-button-tooltip",
|
"mobile-frontend-main-menu-button-tooltip",
|
||||||
|
"mobile-frontend-placeholder",
|
||||||
"mobile-frontend-footer-sitename"
|
"mobile-frontend-footer-sitename"
|
||||||
],
|
],
|
||||||
"responsive": true,
|
"responsive": true,
|
||||||
|
|
Loading…
Reference in a new issue