Timeless should support default logos

Use getAvailableLogos to retrieve wordmark and icon
wikimedia production has values for all projects for these values

TimelessLogo and TimelessWordmark continue to be supported for
3rd parties.

Bug: T231615
Change-Id: I2e4bc30c948b1bcb338f9d41774912b9afb320b4
isekai
jdlrobson 5 years ago committed by Isarra
parent f4ef81a24a
commit dc4443a7dd

@ -370,8 +370,17 @@ class TimelessTemplate extends BaseTemplate {
'role' => 'banner' 'role' => 'banner'
] ]
); );
$logos = ResourceLoaderSkinModule::getAvailableLogos( $config );
if ( $part !== 'image' ) { if ( $part !== 'image' ) {
$wordmarkImage = $this->getLogoImage( $config->get( 'TimelessWordmark' ), true ); $wordmarkImage = $this->getLogoImage( $config->get( 'TimelessWordmark' ), true );
if ( !$wordmarkImage && isset( $logos['wordmark'] ) ) {
$wordmarkData = $logos['wordmark'];
$wordmarkImage = Html::element( 'img', [
'src' => $wordmarkData['src'],
'height' => $wordmarkData['height'] ?? null,
'width' => $wordmarkData['width'] ?? null,
] );
}
$titleClass = ''; $titleClass = '';
$siteTitle = ''; $siteTitle = '';
@ -399,6 +408,12 @@ class TimelessTemplate extends BaseTemplate {
} }
if ( $part !== 'text' ) { if ( $part !== 'text' ) {
$logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) ); $logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) );
if ( $logoImage === null && isset( $logos['icon'] ) ) {
$logoSrc = $logos['icon'];
$logoImage = Html::element( 'img', [
'src' => $logoSrc,
] );
}
$html .= Html::rawElement( $html .= Html::rawElement(
'a', 'a',

Loading…
Cancel
Save