From bd5f2d9f8c8b8f031e196ccf857b5d984f02440b Mon Sep 17 00:00:00 2001 From: Isarra Date: Thu, 28 Jan 2021 22:22:00 +0000 Subject: [PATCH] Correctly fall back to $wgLogos['icon'] when not using timeless' speshul junk Assumes use of an svg icon because why would anyone seriously still be using rasters in this day and age? Also probably negates the usefulness of timeless' speshul logo handling junk anyway, as use of correctly-sized svgs should obsolete the need for knowing the logo size to begin with, as we no longer need to manually scale down different source files... Cap out at 156px wide, but other than that assume whatever size people made it was intentional? Change-Id: I9569e4d57c6740071e87c0f49ee47f739dd68bbd --- includes/TimelessTemplate.php | 2 +- resources/screen-desktop.less | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/TimelessTemplate.php b/includes/TimelessTemplate.php index 619dcac..92891f7 100644 --- a/includes/TimelessTemplate.php +++ b/includes/TimelessTemplate.php @@ -522,7 +522,7 @@ class TimelessTemplate extends BaseTemplate { } if ( $part !== 'text' ) { $logoImage = $this->getLogoImage( $config->get( 'TimelessLogo' ) ); - if ( $logoImage === null && isset( $logos['icon'] ) ) { + if ( $logoImage === false && isset( $logos['icon'] ) ) { $logoSrc = $logos['icon']; $logoImage = Html::element( 'img', [ 'src' => $logoSrc, diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less index a733e32..798c1be 100644 --- a/resources/screen-desktop.less +++ b/resources/screen-desktop.less @@ -187,6 +187,12 @@ div.mw-notification-area { &.timeless-logo { background-image: none; + + img { + max-width: 156px; + height: auto; + margin: 0.75em 0 0.5em; + } } }