mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +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
|
||||
return [
|
||||
'banners' => $data['banners'],
|
||||
'wgScript' => $data['wgScript'],
|
||||
'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'] ?? '',
|
||||
'data-main-menu' => $this->getMainMenuData( $data ),
|
||||
'hasheadingholder' => $hasHeadingHolder,
|
||||
|
@ -217,6 +230,7 @@ class MinervaTemplate extends BaseTemplate {
|
|||
$skinOptions->get( SkinOptions::TALK_AT_TOP ) ? [
|
||||
'items' => array_values( $data['content_navigation']['namespaces'] ),
|
||||
] : false,
|
||||
'searchPageTitle' => $this->getSkin()->getSearchPageTitle(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
<div id="mw-mf-page-center">
|
||||
<a class="mw-mf-page-center__mask" href="#"></a>
|
||||
<header class="header-container header-chrome">
|
||||
{{#data-search-box}}
|
||||
<form class="minerva-header" action="{{form-action}}" method="get">
|
||||
<form class="minerva-header" action="{{wgScript}}" method="get">
|
||||
<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">
|
||||
<label for="main-menu-input" id="mw-mf-main-menu-button"
|
||||
|
@ -19,21 +18,13 @@
|
|||
</a>
|
||||
</div>
|
||||
<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"
|
||||
{{{html-input-attributes}}}">
|
||||
autocomplete="off" placeholder="{{msg-mobile-frontend-placeholder}}" aria-label="{{msg-mobile-frontend-placeholder}}"
|
||||
value="{{search}}">
|
||||
</div>
|
||||
<nav class="minerva-user-navigation" aria-label="{{msg-minerva-user-navigation}}">
|
||||
<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>
|
||||
<div>{{{searchButton}}}</div>
|
||||
{{^isAnon}}
|
||||
<div class="minerva-user-notifications" id="pt-notifications-alert">
|
||||
{{{userNotificationsHTML}}}
|
||||
|
@ -42,7 +33,6 @@
|
|||
{{#userMenuHTML}}{{{userMenuHTML}}}{{/userMenuHTML}}
|
||||
</nav>
|
||||
</form>
|
||||
{{/data-search-box}}
|
||||
</header>
|
||||
<main id="content" class="mw-body">
|
||||
<div class="banner-container">
|
||||
|
|
Loading…
Reference in a new issue