« Mediawiki et CSS » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 4 : Ligne 4 :


= Add CSS for all the pages =
= Add CSS for all the pages =
Add CSS to the page [[MediaWiki:Common.css]].<br>
Add CSS to the page [[MediaWiki:Common.css]].
Same but for a specific user [[Special:MyPage/common.css]].


= Add CSS for mobile =
= Add CSS for mobile =
Add CSS to the page [[MediaWiki:Mobile.css]]
Add CSS to the page [[MediaWiki:Mobile.css]]


= Modifier le style d'un skin =
= Change the CSS skin =
<filebox fn=/usr/share/webapps/mediawiki/skins/MonSkin/SkinMonSkin.php lang=php>
<filebox fn=/usr/share/webapps/mediawiki/skins/MonSkin/SkinMonSkin.php lang=php>
function setupSkinUserCss( OutputPage $out ) {
function setupSkinUserCss( OutputPage $out ) {
Ligne 20 : Ligne 19 :
}
}
</filebox>
</filebox>
= Add CSS for a specific user =
* for all the pages → [[Special:MyPage/common.css]]
* for a specific style → [[Special:MyPage/monobook.css]]

Dernière version du 22 mai 2022 à 16:55

Links

Add CSS for all the pages

Add CSS to the page MediaWiki:Common.css.

Add CSS for mobile

Add CSS to the page MediaWiki:Mobile.css

Change the CSS skin

/usr/share/webapps/mediawiki/skins/MonSkin/SkinMonSkin.php
function setupSkinUserCss( OutputPage $out ) {
    ...

    // ajout des fichiers css
    $out->addStyle( $this->stylename . '/custom.css', 'screen' );
    $out->addStyle( $this->stylename . '/geshi.css', 'screen' );
}

Add CSS for a specific user