MediaWiki:Common.js: Difference between revisions

From Helbreath Portal
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
    // Dodajemy osobne logo na szczycie strony
     if ($('#custom-top-logo').length === 0) {
     if ($('#custom-top-logo').length === 0) {
         var logo = $('<a>', {
         var logo = $('<a>', {
Line 7: Line 6:
             css: {
             css: {
                 display: 'block',
                 display: 'block',
                 margin: '20px auto',
                 margin: '20px auto', // centrowanie
                 width: '250px',     // powiększone logo
                 width: '450px',
                 height: '100px',     // powiększone logo
                 height: '250px',
                 background: 'url(/images/portallogo.png) no-repeat center',
                 background: 'url(/images/portallogo.png) no-repeat center',
                 backgroundSize: 'contain',
                 backgroundSize: 'contain',
Line 15: Line 14:
             }
             }
         });
         });
         $('body').prepend(logo);
        // wstawiamy logo **po headerze**, a nie w sidebarze
         $('#mw-header-container').after(logo);
     }
     }
});
});

Latest revision as of 23:19, 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: '450px',
                height: '250px',
                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);
    }
});