From 12e2287894c675dfb453e74156c36bff30074f7a Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Mon, 27 Jan 2020 22:42:03 +0800 Subject: [PATCH] Simplify logo generation Use a template variable only for html attributes of the logo Move static HTML into Navigation.mustache Change-Id: If37015b9ce4f37e264b6f25956e4d0ca35e8cdff --- includes/VectorTemplate.php | 11 ++++++----- includes/templates/Navigation.mustache | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/VectorTemplate.php b/includes/VectorTemplate.php index 0c80f1d..4cd9fac 100644 --- a/includes/VectorTemplate.php +++ b/includes/VectorTemplate.php @@ -131,11 +131,12 @@ class VectorTemplate extends BaseTemplate { 'html-personal-menu' => $this->renderNavigation( [ 'PERSONAL' ] ), 'html-navigation-left-tabs' => $this->renderNavigation( [ 'NAMESPACES', 'VARIANTS' ] ), 'html-navigation-right-tabs' => $this->renderNavigation( [ 'VIEWS', 'ACTIONS', 'SEARCH' ] ), - 'html-logo' => '', + 'html-logo-attributes' => Xml::expandAttributes( + Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) + [ + 'class' => 'mw-wiki-logo', + 'href' => Skin::makeMainPageUrl(), + ] + ), 'html-portals' => $this->renderPortals( $this->data['sidebar'] ), ] ), ]; diff --git a/includes/templates/Navigation.mustache b/includes/templates/Navigation.mustache index 54568eb..ee0d23d 100644 --- a/includes/templates/Navigation.mustache +++ b/includes/templates/Navigation.mustache @@ -19,7 +19,9 @@
- {{{html-logo}}} + {{{html-portals}}}