Hygiene: replace header and content divs
- Replace the header div with a header element and the content div with a main element. main and header elements are already shivved: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/22dd581f10/resources/lib/html5shiv/html5shiv.js#234. - Link the wiki header title / logo to the main page. Note: the link border around images is already omitted. The link is identical to the menu home button. Bug: T198947 Change-Id: Id312638d86179e75bc670e72e5943f8c00232bbb
This commit is contained in:
parent
98d3ad390c
commit
a905b1c161
|
@ -295,6 +295,7 @@ class MinervaTemplate extends BaseTemplate {
|
||||||
'headelement' => $data[ 'headelement' ],
|
'headelement' => $data[ 'headelement' ],
|
||||||
'menuButton' => $data['menuButton'],
|
'menuButton' => $data['menuButton'],
|
||||||
'headinghtml' => $data['footer-site-heading-html'],
|
'headinghtml' => $data['footer-site-heading-html'],
|
||||||
|
'mainPageURL' => Title::newMainPage()->getLocalUrl(),
|
||||||
// A button when clicked will submit the form
|
// A button when clicked will submit the form
|
||||||
// This is used so that on tablet devices with JS disabled the search button
|
// This is used so that on tablet devices with JS disabled the search button
|
||||||
// passes the value of input to the search
|
// passes the value of input to the search
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
<div class="banner-container">
|
<div class="banner-container">
|
||||||
{{>banners}}
|
{{>banners}}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-container header-chrome">
|
<header class="header-container header-chrome">
|
||||||
<form class="header" action="{{wgScript}}" method="get">
|
<form class="header" action="{{wgScript}}" method="get">
|
||||||
<div>{{{menuButton}}}</div>
|
<div>{{{menuButton}}}</div>
|
||||||
<div class="branding-box">
|
<div class="branding-box">
|
||||||
<h1>
|
<a href="{{mainPageURL}}">
|
||||||
<span>{{{headinghtml}}}</span>
|
<span>{{{headinghtml}}}</span>
|
||||||
<sup>β</sup>
|
<sup>β</sup>
|
||||||
</h1>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<input class="search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
<input class="search skin-minerva-search-trigger" type="search" name="search" id="searchInput"
|
||||||
|
@ -24,10 +24,10 @@
|
||||||
<div>{{{searchButton}}}</div>
|
<div>{{{searchButton}}}</div>
|
||||||
{{^isAnon}}<div>{{#secondaryButtonData}}{{>secondaryButton}}{{/secondaryButtonData}}</div>{{/isAnon}}
|
{{^isAnon}}<div>{{#secondaryButtonData}}{{>secondaryButton}}{{/secondaryButtonData}}</div>{{/isAnon}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</header>
|
||||||
<div id="content" class="mw-body">
|
<main id="content" class="mw-body">
|
||||||
{{{contenthtml}}}
|
{{{contenthtml}}}
|
||||||
</div>
|
</main>
|
||||||
{{>footer}}
|
{{>footer}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -77,9 +77,12 @@ body {
|
||||||
.branding-box {
|
.branding-box {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
h1 {
|
h1, // TODO: remove after T198947 HTML changes expire from cache.
|
||||||
|
a {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
text-decoration: none;
|
||||||
|
color: @colorGray2;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
|
Loading…
Reference in New Issue