Simplify logo generation
Use a template variable only for html attributes of the logo Move static HTML into Navigation.mustache Change-Id: If37015b9ce4f37e264b6f25956e4d0ca35e8cdff
This commit is contained in:
parent
0cdf0c238a
commit
12e2287894
|
@ -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' => '<div id="p-logo" role="banner"><a class="mw-wiki-logo" href="' .
|
||||
htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) .
|
||||
'"' .
|
||||
Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) .
|
||||
'></a></div>',
|
||||
'html-logo-attributes' => Xml::expandAttributes(
|
||||
Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) + [
|
||||
'class' => 'mw-wiki-logo',
|
||||
'href' => Skin::makeMainPageUrl(),
|
||||
]
|
||||
),
|
||||
'html-portals' => $this->renderPortals( $this->data['sidebar'] ),
|
||||
] ),
|
||||
];
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div id="mw-panel">
|
||||
{{{html-logo}}}
|
||||
<div id="p-logo" role="banner">
|
||||
<a {{{html-logo-attributes}}}></a>
|
||||
</div>
|
||||
{{{html-portals}}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue