Merubah Logo MediaWiki: Difference between revisions
Appearance
Created page with "= MERUBAH LOGO PADA MEDIAWIKI = == Example code == <code> $wgLogos = [ '1x' => "<translate nowrap><!--T:41--> path/to/1x_version</translate>.png", '2x' => "<translate nowrap><!--T:43--> path/to/2x_version</translate>.png", 'svg' => "<translate nowrap><!--T:44--> path/to/svg_version</translate>.svg", 'icon' => "<translate nowrap><!--T:95--> path/to/icon</translate>.png", // <translate nowrap><!--T:45--> version of logo without wordmark and tagline</translate> 'wor..." |
m Madejuli moved page Wiki:Merubah Logo MediaWiki to Merubah Logo MediaWiki |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
== Example code == | == Example code == | ||
$wgLogos = [ | $wgLogos = [ '1x' => "<translate nowrap><!--T:41--> path/to/1x_version.png", | ||
'2x' => "<translate nowrap><!--T:43--> path/to/2x_version.png", | |||
'svg' => "<translate nowrap><!--T:44--> path/to/svg_version.svg", | |||
'icon' => "<translate nowrap><!--T:95--> path/to/icon.png", //version of logo without wordmark and tagline | |||
'wordmark' => [ | |||
'src' => "path/to/wordmark_version.png", | |||
'1x' => "path/to/wordmark_version</translate>.svg", //optional: support SVG in addition to PNG | |||
'width' => 135, | |||
'height' => 20, | |||
], | |||
'tagline' => [ | |||
'src' => "<translate nowrap><!--T:48--> path/to/tagline_version.png", | |||
'width' => 135, | |||
'height' => 15, | |||
], | |||
]; | |||
]; | |||
===Simple example=== | ===Simple example=== | ||
$wgLogos = [ | $wgLogos = [ | ||
'icon' => "$wgScriptPath/lol.png", //path to primary logo for Vector 2022 | |||
'1x' => "$wgScriptPath/myCustomLogo.png", //path to 1x version for other skins | |||
'2x' => "$wgResourceBasePath/hiResLogo.png", //path to 2x version for other skins | |||
]; | ]; | ||
===Example paths=== | ===Example paths=== | ||
$wgLogos = [ | |||
$wgLogos = [ | '1x' => "/lol.png", //relative path to file in document root | ||
'2x' => "/lol.png", //relative paths always start with a slash | |||
// 'svg' => "", //svg key has been deprecated | |||
'icon' => "/lol.png", //50×50 SVG or 100×100 PNG (limited support) | |||
'wordmark' => [ | |||
'src' => "/wordmark_sitename.png", //image of sitename text (limited support) | |||
'width' => 135, | |||
'height' => 20, | |||
], | |||
'tagline' => [ | |||
'src' => "/tagline_subtitle.png", //image of tagline text without sitename (limited support) | |||
'width' => 135, | |||
'height' => 15, | |||
], | |||
]; | |||
]; | |||
=== Adding logos for language variants === | === Adding logos for language variants === | ||
$wgLogos = [ | |||
$wgLogos = [ | '1x' => "path/to/1x_version.png", //path to 1x version | ||
'2x' => "path/to/2x_version.png", //path to 2x version | |||
'svg' => "path/to/svg_version.svg", //path to svg version | |||
'icon' => "path/to/icon.png", //A version of the logo without wordmark and tagline | |||
'wordmark' => [ | |||
'src' => "path/to/wordmark_version.png", //path to wordmark version | |||
'1x' => "path/to/wordmark_version.svg", //optional if you want to support browsers with SVG support with an SVG logo. | |||
'width' => 135, | |||
'height' => 20, | |||
], | |||
'tagline' => [ | |||
'src' => "path/to/tagline_version.png", //path to tagline version | |||
'width' => 135, | |||
'height' => 15, | |||
], | |||
'variants' => [ | |||
'variant-code' => [ | |||
'1x' => "path/to/language_variant_1x_version.png", //path to 1x version in language variant | |||
'2x' => "path/to/language_variant_2x_version.png", //path to 2x version in language variant | |||
'svg' => "path/to/language_variant_svg_version.svg", //path to svg version in language variant | |||
'icon' => "path/to/language_variant_icon.png", //A version of the logo without wordmark and tagline in language variant | |||
'wordmark' => [ | |||
'src' => "path/to/language_variant_wordmark_version.png", //path to wordmark version in language variant | |||
'1x' => "path/to/language_variant_wordmark_version.svg", //optional if you want to support browsers with SVG support with an SVG logo in language variant. | |||
'width' => 135, | |||
'height' => 20, | |||
], | |||
], | |||
], | |||
]; | |||
]; | |||
---- | ---- | ||
== Source : == | == Source : == | ||
* | * [[mediawikiwiki:Manual:$wgLogos|Merubah Logo MediaWiki]] | ||
* | * [[mediawikiwiki:Help:Formatting|Format Penulisan MediaWiki]] | ||
[[Category: wiki]] [[Category: mediawiki]] | |||
Latest revision as of 11:26, 8 September 2026
MERUBAH LOGO PADA MEDIAWIKI
Example code
$wgLogos = [ '1x' => "<translate nowrap> path/to/1x_version.png", '2x' => "<translate nowrap> path/to/2x_version.png", 'svg' => "<translate nowrap> path/to/svg_version.svg", 'icon' => "<translate nowrap> path/to/icon.png", //version of logo without wordmark and tagline 'wordmark' => [ 'src' => "path/to/wordmark_version.png", '1x' => "path/to/wordmark_version</translate>.svg", //optional: support SVG in addition to PNG 'width' => 135, 'height' => 20, ], 'tagline' => [ 'src' => "<translate nowrap> path/to/tagline_version.png", 'width' => 135, 'height' => 15, ], ];
Simple example
$wgLogos = [ 'icon' => "$wgScriptPath/lol.png", //path to primary logo for Vector 2022 '1x' => "$wgScriptPath/myCustomLogo.png", //path to 1x version for other skins '2x' => "$wgResourceBasePath/hiResLogo.png", //path to 2x version for other skins ];
Example paths
$wgLogos = [ '1x' => "/lol.png", //relative path to file in document root '2x' => "/lol.png", //relative paths always start with a slash // 'svg' => "", //svg key has been deprecated 'icon' => "/lol.png", //50×50 SVG or 100×100 PNG (limited support) 'wordmark' => [ 'src' => "/wordmark_sitename.png", //image of sitename text (limited support) 'width' => 135, 'height' => 20, ], 'tagline' => [ 'src' => "/tagline_subtitle.png", //image of tagline text without sitename (limited support) 'width' => 135, 'height' => 15, ], ];
Adding logos for language variants
$wgLogos = [ '1x' => "path/to/1x_version.png", //path to 1x version '2x' => "path/to/2x_version.png", //path to 2x version 'svg' => "path/to/svg_version.svg", //path to svg version 'icon' => "path/to/icon.png", //A version of the logo without wordmark and tagline 'wordmark' => [ 'src' => "path/to/wordmark_version.png", //path to wordmark version '1x' => "path/to/wordmark_version.svg", //optional if you want to support browsers with SVG support with an SVG logo. 'width' => 135, 'height' => 20, ], 'tagline' => [ 'src' => "path/to/tagline_version.png", //path to tagline version 'width' => 135, 'height' => 15, ], 'variants' => [ 'variant-code' => [ '1x' => "path/to/language_variant_1x_version.png", //path to 1x version in language variant '2x' => "path/to/language_variant_2x_version.png", //path to 2x version in language variant 'svg' => "path/to/language_variant_svg_version.svg", //path to svg version in language variant 'icon' => "path/to/language_variant_icon.png", //A version of the logo without wordmark and tagline in language variant 'wordmark' => [ 'src' => "path/to/language_variant_wordmark_version.png", //path to wordmark version in language variant '1x' => "path/to/language_variant_wordmark_version.svg", //optional if you want to support browsers with SVG support with an SVG logo in language variant. 'width' => 135, 'height' => 20, ], ], ], ];