From a905b1c161757fcbfa40afcbc991d1f6e16b176b Mon Sep 17 00:00:00 2001 From: Stephen Niedzielski Date: Wed, 8 Aug 2018 14:16:37 -0500 Subject: [PATCH] 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 --- includes/skins/MinervaTemplate.php | 1 + includes/skins/minerva.mustache | 12 ++++++------ resources/skins.minerva.base.styles/ui.less | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/includes/skins/MinervaTemplate.php b/includes/skins/MinervaTemplate.php index f6fc999..2ed693e 100644 --- a/includes/skins/MinervaTemplate.php +++ b/includes/skins/MinervaTemplate.php @@ -295,6 +295,7 @@ class MinervaTemplate extends BaseTemplate { 'headelement' => $data[ 'headelement' ], 'menuButton' => $data['menuButton'], 'headinghtml' => $data['footer-site-heading-html'], + 'mainPageURL' => Title::newMainPage()->getLocalUrl(), // 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 diff --git a/includes/skins/minerva.mustache b/includes/skins/minerva.mustache index 8e93031..5009ff0 100644 --- a/includes/skins/minerva.mustache +++ b/includes/skins/minerva.mustache @@ -7,14 +7,14 @@ -
+
{{{menuButton}}}
{{^isAnon}}
{{#secondaryButtonData}}{{>secondaryButton}}{{/secondaryButtonData}}
{{/isAnon}}
-
-
+ +
{{{contenthtml}}} -
+ {{>footer}} diff --git a/resources/skins.minerva.base.styles/ui.less b/resources/skins.minerva.base.styles/ui.less index dc5c2b4..234cc1d 100644 --- a/resources/skins.minerva.base.styles/ui.less +++ b/resources/skins.minerva.base.styles/ui.less @@ -77,9 +77,12 @@ body { .branding-box { width: auto; - h1 { + h1, // TODO: remove after T198947 HTML changes expire from cache. + a { margin-left: 5px; font-size: 1em; + text-decoration: none; + color: @colorGray2; span { line-height: 1;