Go to file
Baha 413870d350 Add print logo
Logo cannot be displayed as a background image because it won't be
visible in print unless the user prints backgrounds too.

A sample configuration looks like this:

$wgVectorPrintLogo = [
	'url' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
	'width' => 174,
	'height' => 27
];

The solution presented in the patch has a downside of not being able
to scale images down if their dimensions are bigger than the
dimensions specified in the config variable. For example, if we want
to go with an SVG image, then IE8 won't be able to render it.
Alternatively, if we want to go with a PNG image, its dimensions need
to match the exact dimensoins in the config variable, otherwise the
image will show up larger or smaller depending on its dimensions.

A more complicated approach of scaling images using `transform: scale`
hasn't been used because we wanted to keep the configuration simple
while supporting the majority of our users. With the current change,
we can reuse the existing configuration options from Minerva, for
exmaple. It would look something like this:

$wgVectorPrintLogo = [
	'url' => $wgMFCustomLogos['copyright'],
	'width' => $wgMFCustomLogos['copyright-width'],
	'height' => $wgMFCustomLogos['copyright-height']
];

Bug: T169826
Change-Id: If8f9f8d95fd3c955ece37d6c8ab6995596189667
2017-08-01 10:55:53 -04:00
components Remove irritating transition on menu tabs 2017-07-20 21:20:59 +00:00
i18n Localisation updates from https://translatewiki.net. 2017-07-25 22:02:19 +02:00
images Use tabs instead of spaces for indenting 2017-03-25 14:56:54 +01:00
skinStyles Optimization: move styles specific to redirect pages out of common.less 2017-06-15 16:13:42 +03:00
.eslintrc.json build: Replace jshint and jscs with eslint 2016-11-29 08:39:55 -08:00
.gitignore collapsibleTabs: Clean up and simplify code 2016-11-29 02:25:00 +00:00
.gitreview Use track=1 instead of defaultbranch=master in .gitreview 2016-10-24 17:30:32 -07:00
.stylelintrc build: Introduce stylelint and make pass 2016-11-29 08:40:03 -08:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT.md 2017-06-07 13:51:49 +04:30
collapsibleTabs.js collapsibleTabs: Stop the tabs from collapsing back and forth forever 2017-01-13 00:16:45 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-24 19:08:55 +02:00
COPYING Use the plain-text GPL and fix 'license-name' to match SPDX conventions 2015-01-29 17:04:29 +01:00
Gruntfile.js build: Make glob pattern readable 2017-04-10 13:24:09 +01:00
Hooks.php Vector should operate in responsive mode when the mobile skin 2017-07-03 15:57:49 -07:00
hooks.txt Move hooks.txt docs from mediawiki/core 2014-08-09 17:09:24 +02:00
jsduck.json collapsibleTabs: Clean up and simplify code 2016-11-29 02:25:00 +00:00
package.json build: Update eslint to 0.4.0 2017-05-04 17:01:53 +01:00
phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-24 19:08:55 +02:00
print.less Add print logo 2017-08-01 10:55:53 -04:00
README.md Add print logo 2017-08-01 10:55:53 -04:00
ResourceLoaderLessModule.php Add print logo 2017-08-01 10:55:53 -04:00
responsive.less Use global variable for tablet media query in responsive.less 2016-12-13 15:27:38 -08:00
screen-hd.less Remove position: absolute from #p-logo element 2017-07-13 16:28:08 +08:00
screen.less build: Introduce stylelint and make pass 2016-11-29 08:40:03 -08:00
skin.json Add print logo 2017-08-01 10:55:53 -04:00
SkinVector.php Feature flagged print styles 2017-07-20 11:54:55 -07:00
variables.less Print mode: Define when to use serif and when to use sans-serif 2017-07-26 15:54:52 +00:00
vector.js Remove <div> inside of the <h3> 2017-07-12 06:21:51 +02:00
Vector.php Run phplint and phpcs through "composer test" entry point 2015-06-09 16:37:14 +03:00
VectorTemplate.php Merge "Add target support for view_urls" 2017-07-26 17:15:01 +00:00

Vector Skin

Configuration options

Logo used in print styles. Keys are url, width, and height (in pixels). Note that this solution only works correctly if the image pointed to by url is an SVG that does not specify width and height attributes, or its width and height match the corresponding variables below. Alternatively, a PNG or other type of image can be used, but its dimensions also need to match the corresponding variable below. That in turn may result in blurry images, though.

Example configuration:

$wgVectorPrintLogo = [
	'url' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
	'width' => 174,
	'height' => 27
];
  • Type: Array
  • Default: false