MediaWiki:Common.js: Difference between revisions
From Helbreath Portal
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
$(document).ready(function() { | $(document).ready(function() { | ||
if ($('#custom-top-logo').length === 0) { | if ($('#custom-top-logo').length === 0) { | ||
var logo = $('<a>', { | var logo = $('<a>', { | ||
id: 'custom-top-logo', | id: 'custom-top-logo', | ||
| Line 7: | Line 6: | ||
css: { | css: { | ||
display: 'block', | display: 'block', | ||
margin: ' | margin: '20px auto', // centrowanie | ||
width: '250px', | width: '250px', | ||
height: '100px', | height: '100px', | ||
| Line 15: | Line 14: | ||
} | } | ||
}); | }); | ||
// wstawiamy logo **po headerze**, a nie w sidebarze | |||
// wstawiamy logo po | $('#mw-header-container').after(logo); | ||
$('# | |||
} | } | ||
}); | }); | ||
Revision as of 23:09, 18 August 2025
$(document).ready(function() {
if ($('#custom-top-logo').length === 0) {
var logo = $('<a>', {
id: 'custom-top-logo',
href: mw.util.getUrl('Main_Page'),
css: {
display: 'block',
margin: '20px auto', // centrowanie
width: '250px',
height: '100px',
background: 'url(/images/portallogo.png) no-repeat center',
backgroundSize: 'contain',
zIndex: 1000
}
});
// wstawiamy logo **po headerze**, a nie w sidebarze
$('#mw-header-container').after(logo);
}
});