« Mediawiki 1.39 upgrade » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
(28 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
[[Category:MediaWiki]] | [[Category:MediaWiki]] | ||
= Environment = | = Environment = | ||
* Ubuntu ARM | * Ubuntu ARM 20.04 | ||
* | * NGINX with PHP-FPM | ||
= Disable the website = | = Disable the website = | ||
<kode lang='bash'> | <kode lang='bash'> | ||
# disable the website | # disable the website | ||
sudo | sudo rm /etc/nginx/sites-enabled/wiki.conf | ||
sudo | sudo rm /etc/nginx/sites-enabled/kiwi.conf | ||
sc-reload | sc-reload nginx | ||
# at the end, re-enable the website | # at the end, re-enable the website | ||
sudo | sudo ln -s /etc/nginx/sites-available/wiki.conf /etc/nginx/sites-enabled/wiki.conf | ||
sudo | sudo ln -s /etc/nginx/sites-available/kiwi.conf /etc/nginx/sites-enabled/kiwi.conf | ||
sc-reload | sc-reload nginx | ||
</kode> | </kode> | ||
= Install the version 1.39 = | = Install the version 1.39 = | ||
<kode lang='bash'> | <kode lang='bash'> | ||
wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39. | wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.4.tar.gz | ||
tar xf mediawiki-1.39. | tar xf mediawiki-1.39.4.tar.gz | ||
cd /var/www | cd /var/www | ||
# backup the previous version | # backup the previous version | ||
sudo mv | sudo mv mediawiki mediawiki.bak | ||
# copy the new mediawiki folder and needed files from previous install | # copy the new mediawiki folder and needed files from previous install | ||
sudo mv -T mediawiki-1.39. | sudo mv -T ~/temp/mediawiki-1.39.4 mediawiki | ||
sudo cp -r | sudo cp -r mediawiki.bak/images/. mediawiki/images | ||
sudo cp -r | sudo cp -r mediawiki.bak/images-kiwi mediawiki/images-kiwi | ||
sudo mkdir | sudo mkdir mediawiki/cache-kiwi | ||
# copy the LocalSettings | # copy the LocalSettings | ||
sudo cp | sudo cp mediawiki.bak/LocalSettings* mediawiki | ||
# copy the non-native extensions | |||
cd mediawiki.bak/extensions | |||
sudo cp -r ContactPage CustomTags Highlightjs_Integration NativeSvgHandler SimpleMathJax SummaryPage ../../mediawiki/extensions | |||
# highlight.js | |||
cd ../.. | |||
sudo cp -r mediawiki.bak/resources/lib/highlight.js mediawiki/resources/lib/ | |||
cd mediawiki.bak/resources/assets | |||
sudo rm change-your-logo.svg change-your-logo-icon.svg poweredby_mediawiki_*.png wiki.png | |||
sudo cp arch-logo.svg banane.ico hljs-88x31.png kiwi.ico odroid.svg piwiklogo.png poweredby_mediawiki.svg wiki.png ../../../mediawiki/resources/assets/ | |||
# | # custom style for MonoBook | ||
sudo cp - | sudo cp mediawiki.bak/skins/MonoBook/resources/custom.css mediawiki/skins/MonoBook/resources/ | ||
# additional images for MonoBook | |||
cd mediawiki.bak/skins/MonoBook/resources/images | |||
sudo cp list-plus.svg list-minus.svg ../../../../../mediawiki/skins/MonoBook/resources/images/ | |||
# update the owner | # update the owner | ||
sudo chown -R root:root | sudo chown -R root:root mediawiki | ||
sudo chown -R www-data:www-data | sudo chown -R www-data:www-data mediawiki/cache mediawiki/cache-kiwi mediawiki/images mediawiki/images-kiwi | ||
</kode> | </kode> | ||
= Upgrade the database = | = Upgrade the database = | ||
<kode lang='bash'> | <kode lang='bash'> | ||
cd /var/www/ | cd /var/www/mediawiki | ||
export SERVER_NAME=wiki.bananeatomic.fr | export SERVER_NAME=wiki.bananeatomic.fr | ||
Ligne 63 : | Ligne 76 : | ||
<filebox fn='skins/MonoBook/skin.json'> | <filebox fn='skins/MonoBook/skin.json'> | ||
{ | { | ||
"ResourceModules": { | |||
"skins.monobook.styles": { | |||
"styles": [ | |||
// add new resource sytle | |||
"resources/custom.css" | |||
] | |||
</filebox> | </filebox> | ||
<filebox fn='skins/MonoBook/resources/custom. | <filebox fn='skins/MonoBook/resources/custom.css' collapsed> | ||
/* | /* | ||
** MediaWiki 'darkmonobook' style sheet for CSS2-capable browsers. | ** MediaWiki 'darkmonobook' style sheet for CSS2-capable browsers. | ||
Ligne 213 : | Ligne 224 : | ||
/* icon for internal links */ | /* icon for internal links */ | ||
#mw-content-text a[href^="/wiki/"] { | #mw-content-text a[href^="/wiki/"] { | ||
background: url(/resources/src/mediawiki.skinning/images/external-ltr. | background: url(/resources/src/mediawiki.skinning/images/external-ltr.svg) center right no-repeat; | ||
padding-right: 15px; | padding-right: 15px; | ||
} | } | ||
Ligne 620 : | Ligne 631 : | ||
</filebox> | </filebox> | ||
== | == Fix column-one position == | ||
<filebox fn='skins/MonoBook/resources/custom.less'> | |||
div#column-one { | |||
position: fixed; | |||
/* put column-one above p-personal */ | |||
z-index: 3; | |||
} | |||
div#content { | |||
min-height: 420px; | |||
} | |||
</filebox> | |||
<filebox fn='skins/MonoBook/templates/skin.mustache' collapsed> | |||
<!-- line 24 --> | |||
<div class="visualClear"></div> | |||
<!-- NEW PLACE outside of column-one --> | |||
{{#data-portlets}} | |||
<div role="navigation" class="portlet" id="p-cactions" aria-labelledby="p-cactions-label"> | |||
<h3 id="p-cactions-label" {{{html-user-language-attributes}}}>{{msg-monobook-cactions-label}}</h3> | |||
<div class="pBody"> | |||
<ul {{{html-user-language-attributes}}}> | |||
{{! comments used to avoid additional whitespace}} | |||
{{{data-namespaces.html-items}}}{{! | |||
}}{{{data-views.html-items}}}{{! | |||
}}{{{data-actions.html-items}}} | |||
{{{data-variants.html-items}}} | |||
</ul> | |||
</div> | |||
</div> | |||
{{#data-cactions-mobile}}{{>Portlet}}{{/data-cactions-mobile}} | |||
{{#data-personal}} | |||
<div role="navigation" class="portlet" id="{{id}}" aria-labelledby="{{id}}-label"> | |||
<h3 id="{{id}}-label" {{{html-user-language-attributes}}}>{{label}}</h3> | |||
<div class="pBody"> | |||
<ul {{{html-user-language-attributes}}}> | |||
{{{html-items}}} | |||
</ul> | |||
</div> | |||
</div> | |||
{{/data-personal}} | |||
{{/data-portlets}} | |||
<!-- NEW PLACE outside of column-one --> | |||
</div> | |||
<div id="column-one" {{{html-user-language-attributes}}}> | |||
<!--{{#data-portlets}}--> | |||
<h2>{{msg-navigation-heading}}</h2> | |||
<!-- MOVED outside of column-one | |||
<div role="navigation" class="portlet" id="p-cactions" aria-labelledby="p-cactions-label"> | |||
<h3 id="p-cactions-label" {{{html-user-language-attributes}}}>{{msg-monobook-cactions-label}}</h3> | |||
<div class="pBody"> | |||
<ul {{{html-user-language-attributes}}}> | |||
{{! comments used to avoid additional whitespace}} | |||
{{{data-namespaces.html-items}}}{{! | |||
}}{{{data-views.html-items}}}{{! | |||
}}{{{data-actions.html-items}}} | |||
{{{data-variants.html-items}}} | |||
</ul> | |||
</div> | |||
</div> | |||
{{#data-cactions-mobile}}{{>Portlet}}{{/data-cactions-mobile}} | |||
{{#data-personal}} | |||
<div role="navigation" class="portlet" id="{{id}}" aria-labelledby="{{id}}-label"> | |||
<h3 id="{{id}}-label" {{{html-user-language-attributes}}}>{{label}}</h3> | |||
<div class="pBody"> | |||
<ul {{{html-user-language-attributes}}}> | |||
{{{html-items}}} | |||
</ul> | |||
</div> | |||
</div> | |||
{{/data-personal}} | |||
--> | |||
<div class="portlet" id="p-logo" role="banner"> | |||
<a href="{{link-mainpage}}" class="mw-wiki-logo"></a> | |||
</div> | |||
<div id="sidebar"> | |||
<!--{{/data-portlets}}--> | |||
{{#data-search-box}} | |||
</filebox> | |||
= Remove unnecessary folders = | = Remove unnecessary folders = | ||
Ligne 629 : | Ligne 722 : | ||
# unused extensions | # unused extensions | ||
cd extensions | cd extensions | ||
sudo rm -rf AbuseFilter CategoryTree Cite CiteThisPage | sudo rm -rf AbuseFilter CategoryTree Cite CiteThisPage ConfirmEdit Gadgets ImageMap InputBox Interwiki Nuke OATHAuth PageImages ParserFunctions PdfHandler Poem Renameuser Scribunto SecureLinkFixer SpamBlacklist SyntaxHighlight_GeSHi TemplateData TextExtracts TitleBlacklist VisualEditor | ||
# lang | |||
setopt extended_glob | |||
cd languages/i18n | |||
sudo rm -- ^(en|fr).json | |||
cd languages/i18n/exif | |||
sudo rm -- ^(en|fr).json | |||
# unused skins | # unused skins | ||
cd skins | cd skins | ||
sudo rm -rf | sudo rm -rf MinervaNeue Timeless Vector | ||
# test files | # test files | ||
sudo rm -rf tests | sudo rm -rf tests | ||
# other sql providers | |||
sudo rm -rf maintenance/postgres maintenance/sqlite extensions/Math/sql/postgres extensions/Math/sql/sqlite | |||
</kode> | </kode> | ||
{| class="wikitable wtp" | |||
|+ Native extensions | |||
! Name | |||
! Description | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:AbuseFilter AbuseFilter] || Allows specific behavior-based restrictions to be placed on wiki activity | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:CategoryTree CategoryTree] || Provides a dynamic view of the wiki's category structure as a tree | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Cite Cite] || Allows footnotes for citing sources and helps for correctly citing content in offline media | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:CiteThisPage CiteThisPage] || Adds a special page that provides different citation formats for a particular article | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:CodeEditor CodeEditor] || Provides a syntax-highlighting code editor for site & user JS, CSS and Lua pages, integrating with advanced edit toolbar | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:ConfirmEdit ConfirmEdit] || Adds CAPTCHAs for page saves and other user actions | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Gadgets Gadgets] || Allow users to enable JS-based, user-provided gadgets from their preferences page | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:ImageMap ImageMap] || Allows clickable HTML image maps | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:InputBox InputBox] || Allows users to add predefined HTML forms to wiki pages | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Interwiki Interwiki] || Adds a special page to view and manipulate the interwiki table | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Math Math] || Allows to render mathematical formulas | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:MultimediaViewer MultimediaViewer] || Provides a better experience to users when they click on thumbnails in a page | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Nuke Nuke] || Gives sysops the ability to mass delete pages. | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:OATHAuth OATHAuth] || Provides two-factor authentication for logging in | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:PageImages PageImages] || Stores information about images representing a page | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:ParserFunctions ParserFunctions] || Enhances parser with logical and string functions | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:PdfHandler PdfHandler] || Shows uploaded PDF files in a multipage preview layout | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Poem Poem] || Allows easy formatting of poems and similar material | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Renameuser Renameuser] || Provides a special page that allows user accounts to be renamed | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Replace_Text Replace Text] || Provides a form to let administrators do string replacements on the entire wiki, for both page contents and page titles | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto] || Provides a framework for embedding scripting languages into MediaWiki pages | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:SecureLinkFixer SecureLinkFixer] || Rewrites URLs to HTTPS if domain always requires HTTPS | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:SpamBlacklist SpamBlacklist] || Provides a regex-based spam filter | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:SyntaxHighlight SyntaxHighlight] || Allows source code to be syntax highlighted on the wiki pages | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:TemplateData TemplateData] || Allows to store, retrieve and visualise information about templates | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:TextExtracts TextExtracts] || Provides API with plain-text or limited HTML extracts of page content | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:TitleBlacklist TitleBlacklist] || Blocks the creation of pages matching a regular expression blacklist | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:VisualEditor VisualEditor] || Allows for editing pages as rich content | |||
|- | |||
| [https://www.mediawiki.org/wiki/Extension:WikiEditor WikiEditor] || Provides an extendable wikitext editing interface and many feature-providing modules | |||
|} | |||
= Clean = | = Clean = |
Dernière version du 6 septembre 2023 à 16:32
Environment
- Ubuntu ARM 20.04
- NGINX with PHP-FPM
Disable the website
# disable the website sudo rm /etc/nginx/sites-enabled/wiki.conf sudo rm /etc/nginx/sites-enabled/kiwi.conf sc-reload nginx # at the end, re-enable the website sudo ln -s /etc/nginx/sites-available/wiki.conf /etc/nginx/sites-enabled/wiki.conf sudo ln -s /etc/nginx/sites-available/kiwi.conf /etc/nginx/sites-enabled/kiwi.conf sc-reload nginx |
Install the version 1.39
wget https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.4.tar.gz tar xf mediawiki-1.39.4.tar.gz cd /var/www # backup the previous version sudo mv mediawiki mediawiki.bak # copy the new mediawiki folder and needed files from previous install sudo mv -T ~/temp/mediawiki-1.39.4 mediawiki sudo cp -r mediawiki.bak/images/. mediawiki/images sudo cp -r mediawiki.bak/images-kiwi mediawiki/images-kiwi sudo mkdir mediawiki/cache-kiwi # copy the LocalSettings sudo cp mediawiki.bak/LocalSettings* mediawiki # copy the non-native extensions cd mediawiki.bak/extensions sudo cp -r ContactPage CustomTags Highlightjs_Integration NativeSvgHandler SimpleMathJax SummaryPage ../../mediawiki/extensions # highlight.js cd ../.. sudo cp -r mediawiki.bak/resources/lib/highlight.js mediawiki/resources/lib/ cd mediawiki.bak/resources/assets sudo rm change-your-logo.svg change-your-logo-icon.svg poweredby_mediawiki_*.png wiki.png sudo cp arch-logo.svg banane.ico hljs-88x31.png kiwi.ico odroid.svg piwiklogo.png poweredby_mediawiki.svg wiki.png ../../../mediawiki/resources/assets/ # custom style for MonoBook sudo cp mediawiki.bak/skins/MonoBook/resources/custom.css mediawiki/skins/MonoBook/resources/ # additional images for MonoBook cd mediawiki.bak/skins/MonoBook/resources/images sudo cp list-plus.svg list-minus.svg ../../../../../mediawiki/skins/MonoBook/resources/images/ # update the owner sudo chown -R root:root mediawiki sudo chown -R www-data:www-data mediawiki/cache mediawiki/cache-kiwi mediawiki/images mediawiki/images-kiwi |
Upgrade the database
cd /var/www/mediawiki export SERVER_NAME=wiki.bananeatomic.fr php maintenance/update.php export SERVER_NAME=kiwi.bananeatomic.fr php maintenance/update.php |
Customize the Monobook skin
Add custom style
skins/MonoBook/skin.json |
{ "ResourceModules": { "skins.monobook.styles": { "styles": [ // add new resource sytle "resources/custom.css" ] |
skins/MonoBook/resources/custom.css |
/* ** MediaWiki 'darkmonobook' style sheet for CSS2-capable browsers. ** Copyright Nicolas ** License: GPL (http://www.gnu.org/copyleft/gpl.html) ** ** Addition to the MediaWiki 'monobook' style by Gabriel Wicke - http://wikidev.net/. ** Loosely based on http://www.positioniseverything.net/ordered-floats.html by Big John ** and the Plone 2.0 styles, see http://plone.org/ (Alexander Limi,Joe Geldart & Tom Croucher, ** Michael Zeltner and Geir Bækholt) ** All you guys rock :) */ /* pre, code */ pre, code { color: #D0D0D0 !important; background-color: #202020 !important; font-family: "Source Code Pro", Consolas, monospace !important; font-size: 105%; } pre { border: 0 !important; } /* arrière-plan dark */ body, div#content, div#footer, div#toc, /* sommaire */ div#catlinks, /* liste des catégories en bas de page */ .mw-search-formheader, /* Bandeau sur la page de résultats de recherche */ .mw-search-profile-tabs, /* Bandeau sur la page de résultats de recherche */ div.editOptions, /* les 2 dernières versions de la page Historique des versions */ ul#pagehistory>li.selected, /* menu de la page Fichier: */ table.mw_metadata th, table.mw_metadata td, /* table métadonnées dans la page Fichier: */ table.mw-datatable td, table.mw-datatable th, /* Catégories de suivi, Spécial:TrackingCategories */ div#p-cactions li, /* onglets */ ul#filetoc, div#userloginForm, .mw-ui-vform>div label, /* formulaire de login */ fieldset#mw-searchoptions, /* recherche avancée */ div.noarticletext, /* champs visible lors de l'annulation de la création d'une page */ div.pBody, /* groupes de la colonne de gauche */ div.mw-warning, /* message encadré Attention: */ .oo-ui-dropdownWidget, /* renommer, menu déroulant */ .oo-ui-textInputWidget input, .oo-ui-textInputWidget textarea, /* Résumé dans Modification */ /*.oo-ui-buttonElement-framed > .oo-ui-buttonElement-button,*/ /* redefinit plus bas */ /*.oo-ui-buttonElement > .oo-ui-buttonElement-button,*/ /* boutons dans Modification */ #column-content, /* fond colonne de gauche et du bamdeau du haut */ div.thumbinner { /* Texte dans les images miniaturisées */ background: #262626 !important; color: white !important; } input, textarea { /* champs de recherche e de modification, boutons */ background: #333333 !important; color: white !important; } /* onglets */ /* rogner le background des onglets pour qu'il ne déborde plus */ div#p-cactions li a { background: none !important; } /* bordure bleu pour liste des catégories en bas de page */ div#catlinks { border-color: #1c8bce; border-radius: 5px 0 5px 0; } /* bordures dorées et arrondies */ div#toc, /* sommaire */ div.pBody, /* groupes de la colonne de gauche */ div#content { border: 1px solid #ffd700; /* redéfinit la bordure en entier pour afficher la bordure droite dans div#content */ border-radius: 10px; } /* force la couleur des bordure pour les blocs de la colonne de gauche */ div#sidebar div.pBody { border: 1px solid #ffd700 !important; } #p-cactions li { border-color: #ffd700; border-radius: 5px 5px 0 0; } /* liens (balise a) + lien masquer sommaire */ a, a:visited, .toctogglelabel { color: #51AAFE !important; } /* liens (balise a) + span entourant les liens masque/affiche les blocs */ a, a:visited, .mw-collapsible-toggle { outline: none; } div#toc span { /* texte du sommaire en blanc */ color: white !important; } /* icon for internal links */ #mw-content-text a[href^="/wiki/"] { background: url(/resources/src/mediawiki.skinning/images/external-ltr.svg) center right no-repeat; padding-right: 15px; } /* titres */ h1, h2, h3, h4, h5, h6 { color: #ffd700 !important; border-bottom-color: #ffd700 !important; } /* décaler les titres 2 et 3 */ h2 { margin-left: 10px !important; } h3 { margin-left: 15px !important; } h4 { margin-left: 20px !important; } /* lien dans un titre * écrase #bodyContent a.external { color: #36b; } dans main.css */ .mw-headline>a { color: #ffd700 !important; /* afficher la petite icone pour les liens internes */ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAVElEQVR42n3PgQkAIAhEUXdqJ3dqJ3e6IoTPUSQcgj4EQ5IlUiLE0Jil3PECXhcHGBhZ8kg4hwxAu3MZeCGeyFnAXp4hqNQPnt7QL0nADpD6wHccLvnAKksq8iiaAAAAAElFTkSuQmCC') no-repeat scroll right center transparent; padding-right: 13px; } /* réduire l'espacement après les titres */ h1, h2, h3, h4 { margin-bottom: 0.2em !important; } /* puces */ /* meme margin que ul */ ol { margin-left: 1.6em !important; } /* Réduire l'espacement interligne entre <p> suivuit par <ul> */ .mw-content-ltr p+ul, .mw-content-rtl .mw-content-ltr p+ul { margin-top: -0.4em; } /*****************************************/ /* Page de résultats de recherche */ /* masquer les statistiques */ .mw-search-result-data { visibility: collapse; } /* marquer les correspondance à la recherche */ .searchmatch { color: #9D179D; font-weight: bold; } /*****************************************/ /* masquer les boutons de recherche et le label rechercher */ input#searchGoButton, input#mw-searchButton, input#searchButton, div#p-search>h3 { display: none; } /* enlever la bordure du champs "rechercher" */ input#searchInput { border: none; } /* pas d'effet focus sur le champs "rechercher" */ input#searchInput:focus-visible { outline: 0px; } /* lorsque le le champs "rechercher" est centré, la form s'aggrandit en hauteur * on limite ainsi la hauteur */ form#searchform { height: 18px; } /* champs de recherche */ div.suggestions-result { /* champs de recherche de la page de Résultats de la recherche */ background: #262626 !important; color: white !important; font-size: 11px !important; } div.suggestions-result:hover { text-decoration: underline; } /* menu déroulant "Contenant ..." dans la colonne de gauche sous le champs de recherche */ div.suggestions-special { background: #262626 !important; } div.suggestions-special div { color: white !important; } /* tableaux */ /* écraser les valeurs définie dans resources/src/mediawiki.legacy/shared.css */ table.wikitable { background-color: #262626; color: white; } table.wikitable>tr>th, table.wikitable>*>tr>th { background-color: #262626; } /* wikitableplus: classe étendue pour les tableaux */ table.wtp tr>th, table.wtp tr>td { padding: 5px; } /* monospace dans les colonnes */ table.wtmono1 tr td:first-child { font-family: Inconsolata-g, monospace; } table.wtmono2 tr td:nth-child(2) { font-family: Inconsolata-g, monospace; } table.wtmono3 tr td:nth-child(3) { font-family: Inconsolata-g, monospace; } table.wtmono4 tr td:nth-child(4) { font-family: Inconsolata-g, monospace; } /* colorer une ligne sur 2 */ table.bicolor tr:nth-child(2n) { background-color: DarkSlateGrey; } /*************************************************************/ /* figer la colonne de gauche */ /* dans le fichier MonoBookTemplate.php déplacer la ligne <div id="column-one"<?php $this->html('userlangattributes') ?>> en dessous de "cactions" et "p-personal" pour que le menu du haut fasse parti de la colonne 2 */ div#column-one { position: fixed; /* mettre la colonne au-dessus de la barre p-personal */ z-index: 3; } div#content { min-height: 420px; } /**************************************************************/ /* Tableau de la page Liste de fichiers */ .TablePager td, .TablePager th { background-color: #262626; } .TablePager tr:hover td { background-color: #111100; } /*************************************************************/ /* marges de la page à gauche */ #column-one { margin: 0 0 0 1px; } /* affichage du code JavaScript de la page MediaWiki:Common.js*/ pre.source-javascript { background-color: #ffffff; color: #000000; } /* Masquer les onglets discussion et suivre */ #ca-talk, #ca-watch { display: none !important; } /* Changer le fond de WikiEditor Preview */ .wikiEditor-preview-contents, .wikiEditor-ui-controls, .wikiEditor-ui-tabs div, .wikiEditor-ui-buttons { background-color: #262626 !important; } .wikiEditor-ui-tabs div.current a, .wikiEditor-ui-toolbar .tabs span.tab a.current, .wikiEditor-ui-toolbar .tabs span.tab a.current:visited { color: white !important; } .wikiEditor-ui-tabs div a, .wikiEditor-ui-toolbar .tabs span.tab a, .wikiEditor-ui-toolbar .tabs span.tab a:visited { color: #1C8BCE !important; } .wikiEditor-ui-buttons { border-top-color: #262626 !important; } .wikiEditor-ui-toolbar { background-image: none !important; background-color: #262626 !important; } #wikiEditor-ui-toolbar .oo-ui-iconElement { background-color: grey !important; } /* fond pour rendre les icones noires visibles */ /* Avancé */ #wikiEditor-section-advanced { background: #262626; } #wikiEditor-section-advanced .label { color: white; } #wikiEditor-section-advanced .tool-select { background: #262626; } .wikiEditor-ui-toolbar .group .tool-select .menu .options { background: #262626 !important; } /* bouton de la bar */ .tool-button, .tool.oo-ui-buttonElement-frameless.oo-ui-iconElement { border-color: black !important; } /*****************************************/ /* réduire la taille de la zone d'édition */ #wpTextbox1 { height: 340px; } /* table d'affichage des différences */ table.diff { background-color: #262626 !important; } td.diff-context { background-color: #262626 !important; color: white !important; } td.diff-deletedline { border-color: #FFB300 !important; } td.diff-deletedline .diffchange { background-color: #FFB300 !important; } td.diff-addedline { border-color: #0083FF !important; } td.diff-addedline .diffchange { background-color: #0083FF !important; } /**************************************************/ /* déplacer les liens "modifier" sur la droite */ .mw-content-ltr .mw-editsection, .mw-content-rtl .mw-content-ltr .mw-editsection { float: right; line-height: 1.5em !important; } /* masque le message Votre modification a été enregistrée */ .postedit { display: none !important; } /* masque les liens inutiles dans le groupe outils de la colonne de gauche */ #t-permalink, /* Adresse de cette version */ #t-print { /* version imprimable */ display: none; } /* menu en haut à droite */ div#p-personal a:hover { text-decoration: underline; background: none; /* masquer le fond blanc */ } /************************************************/ /* masquer le copyright dans le footer */ li#copyright { display: none !important; } /* page des préférences */ #preferences, .prefsection table, .prefsection legend, #preftoc li.selected, #preftoc li, .oo-ui-buttonElement-framed>.oo-ui-buttonElement-button, .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle, .mw-prefs-buttons { background: none; /* masquer le fond blanc */ } .oo-ui-tabSelectWidget-framed { background: none !important; border-bottom: 1px white solid; } .oo-ui-tabSelectWidget-framed .oo-ui-tabOptionWidget.oo-ui-optionWidget-selected, .oo-ui-tabSelectWidget-framed .oo-ui-tabOptionWidget.oo-ui-widget-enabled:hover { background: none !important; color: white !important; } .oo-ui-tabOptionWidget { color: white !important; } .oo-ui-buttonElement-framed>.oo-ui-buttonElement-button { text-shadow: none; } .mw-prefs-buttons { position: unset; } /************************************************/ /* zoom */ body { /* pour Chrome, IE, Opera, Safari, mais pas pour Firefox */ zoom: 1.2; } /****************************************************/ /*** mobile ***/ /* top icons */ #p-cactions-mobile li.selected a, #p-cactions-mobile li:hover a { background-color: unset; } #p-cactions-mobile li a { background-color: unset; } #p-cactions-mobile li { border: unset; } /* plus menu */ .mobile-menu-active { background-color: #202020 !important; } /* fisrt column of kode */ @media screen and (max-width: 550px) { table.kode td:first-child { display: none; } } /**************/ |
Fix column-one position
skins/MonoBook/resources/custom.less |
div#column-one { position: fixed; /* put column-one above p-personal */ z-index: 3; } div#content { min-height: 420px; } |
skins/MonoBook/templates/skin.mustache |
<!-- line 24 --> <div class="visualClear"></div> <!-- NEW PLACE outside of column-one --> {{#data-portlets}} <div role="navigation" class="portlet" id="p-cactions" aria-labelledby="p-cactions-label"> <h3 id="p-cactions-label" {{{html-user-language-attributes}}}>{{msg-monobook-cactions-label}}</h3> <div class="pBody"> <ul {{{html-user-language-attributes}}}> {{! comments used to avoid additional whitespace}} {{{data-namespaces.html-items}}}{{! }}{{{data-views.html-items}}}{{! }}{{{data-actions.html-items}}} {{{data-variants.html-items}}} </ul> </div> </div> {{#data-cactions-mobile}}{{>Portlet}}{{/data-cactions-mobile}} {{#data-personal}} <div role="navigation" class="portlet" id="{{id}}" aria-labelledby="{{id}}-label"> <h3 id="{{id}}-label" {{{html-user-language-attributes}}}>{{label}}</h3> <div class="pBody"> <ul {{{html-user-language-attributes}}}> {{{html-items}}} </ul> </div> </div> {{/data-personal}} {{/data-portlets}} <!-- NEW PLACE outside of column-one --> </div> <div id="column-one" {{{html-user-language-attributes}}}> <!--{{#data-portlets}}--> <h2>{{msg-navigation-heading}}</h2> <!-- MOVED outside of column-one <div role="navigation" class="portlet" id="p-cactions" aria-labelledby="p-cactions-label"> <h3 id="p-cactions-label" {{{html-user-language-attributes}}}>{{msg-monobook-cactions-label}}</h3> <div class="pBody"> <ul {{{html-user-language-attributes}}}> {{! comments used to avoid additional whitespace}} {{{data-namespaces.html-items}}}{{! }}{{{data-views.html-items}}}{{! }}{{{data-actions.html-items}}} {{{data-variants.html-items}}} </ul> </div> </div> {{#data-cactions-mobile}}{{>Portlet}}{{/data-cactions-mobile}} {{#data-personal}} <div role="navigation" class="portlet" id="{{id}}" aria-labelledby="{{id}}-label"> <h3 id="{{id}}-label" {{{html-user-language-attributes}}}>{{label}}</h3> <div class="pBody"> <ul {{{html-user-language-attributes}}}> {{{html-items}}} </ul> </div> </div> {{/data-personal}} --> <div class="portlet" id="p-logo" role="banner"> <a href="{{link-mainpage}}" class="mw-wiki-logo"></a> </div> <div id="sidebar"> <!--{{/data-portlets}}--> {{#data-search-box}} |
Remove unnecessary folders
# documentation sudo rm -rf docs # unused extensions cd extensions sudo rm -rf AbuseFilter CategoryTree Cite CiteThisPage ConfirmEdit Gadgets ImageMap InputBox Interwiki Nuke OATHAuth PageImages ParserFunctions PdfHandler Poem Renameuser Scribunto SecureLinkFixer SpamBlacklist SyntaxHighlight_GeSHi TemplateData TextExtracts TitleBlacklist VisualEditor # lang setopt extended_glob cd languages/i18n sudo rm -- ^(en|fr).json cd languages/i18n/exif sudo rm -- ^(en|fr).json # unused skins cd skins sudo rm -rf MinervaNeue Timeless Vector # test files sudo rm -rf tests # other sql providers sudo rm -rf maintenance/postgres maintenance/sqlite extensions/Math/sql/postgres extensions/Math/sql/sqlite |
Name | Description |
---|---|
AbuseFilter | Allows specific behavior-based restrictions to be placed on wiki activity |
CategoryTree | Provides a dynamic view of the wiki's category structure as a tree |
Cite | Allows footnotes for citing sources and helps for correctly citing content in offline media |
CiteThisPage | Adds a special page that provides different citation formats for a particular article |
CodeEditor | Provides a syntax-highlighting code editor for site & user JS, CSS and Lua pages, integrating with advanced edit toolbar |
ConfirmEdit | Adds CAPTCHAs for page saves and other user actions |
Gadgets | Allow users to enable JS-based, user-provided gadgets from their preferences page |
ImageMap | Allows clickable HTML image maps |
InputBox | Allows users to add predefined HTML forms to wiki pages |
Interwiki | Adds a special page to view and manipulate the interwiki table |
Math | Allows to render mathematical formulas |
MultimediaViewer | Provides a better experience to users when they click on thumbnails in a page |
Nuke | Gives sysops the ability to mass delete pages. |
OATHAuth | Provides two-factor authentication for logging in |
PageImages | Stores information about images representing a page |
ParserFunctions | Enhances parser with logical and string functions |
PdfHandler | Shows uploaded PDF files in a multipage preview layout |
Poem | Allows easy formatting of poems and similar material |
Renameuser | Provides a special page that allows user accounts to be renamed |
Replace Text | Provides a form to let administrators do string replacements on the entire wiki, for both page contents and page titles |
Scribunto | Provides a framework for embedding scripting languages into MediaWiki pages |
SecureLinkFixer | Rewrites URLs to HTTPS if domain always requires HTTPS |
SpamBlacklist | Provides a regex-based spam filter |
SyntaxHighlight | Allows source code to be syntax highlighted on the wiki pages |
TemplateData | Allows to store, retrieve and visualise information about templates |
TextExtracts | Provides API with plain-text or limited HTML extracts of page content |
TitleBlacklist | Blocks the creation of pages matching a regular expression blacklist |
VisualEditor | Allows for editing pages as rich content |
WikiEditor | Provides an extendable wikitext editing interface and many feature-providing modules |
Clean
# delete unused folder sudo rm -rf mediawiki.bak |