Jump to content

MediaWiki - Configure Theme: Difference between revisions

From jeankn.app WIKI
Created page with "== LocalSettings.php == Download LocalSettings.php, apply the changes below and reupload it to the root folder of the Wiki. === Enable the modern version of the Vector skin === Set the following commands:<pre>$wgDefaultSkin = "vector-2022"; $wgVectorNightMode['beta'] = true; $wgVectorNightMode['logged_out'] = true; $wgVectorNightMode['logged_in'] = true;</pre> === Enable Dark Mode === Set the following command:<pre> $wgDefaultUserOptions['vector-theme'] = 'night'; </pr..."
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 20: Line 20:
$wgDefaultUserOptions['vector-appearance-pinned'] = 0;
$wgDefaultUserOptions['vector-appearance-pinned'] = 0;
</pre>
</pre>
== MediaWiki:Common.css ==
=== Initial settings ===
Open your browser and go to:<pre>
https://your-domain.com/mediawiki/MediaWiki:Common.css
</pre>Click edit source and add the following styles:<pre>
.mw-logo, .mw-logo:visited, .mw-logo:active, .mw-logo:hover {
color: #000000;
}
.mw-logo-icon {
display: none;
}
.vector-main-menu-action-opt-out {
display: none;
}
.mw-header, .mw-page-container, .vector-pinned-container {
background-color: #00000000 !important;
}
.vector-sticky-pinned-container::after {
background: none;
}
</pre>
=== Background color ===
Add the following style:<pre>
body {
background-color: #101418;
}
</pre>
== MediaWiki:Sidebar ==
Go to:<pre>
https://your-domain.com/mediawiki/MediaWiki:Sidebar
</pre>Keep only the following links:<pre>
* navigation
** mainpage|mainpage-description
** recentchanges-url|recentchanges
</pre>
[[Category:Google Cloud]]
[[Category:MediaWiki]]

Latest revision as of 20:39, 19 October 2025

LocalSettings.php

Download LocalSettings.php, apply the changes below and reupload it to the root folder of the Wiki.

Enable the modern version of the Vector skin

Set the following commands:

$wgDefaultSkin = "vector-2022";
$wgVectorNightMode['beta'] = true;
$wgVectorNightMode['logged_out'] = true;
$wgVectorNightMode['logged_in'] = true;

Enable Dark Mode

Set the following command:

$wgDefaultUserOptions['vector-theme'] = 'night';

Hide useless panels

Set the following commands:

$wgDefaultUserOptions['vector-main-menu-pinned'] = 1;
$wgDefaultUserOptions['vector-page-tools-pinned'] = 0;
$wgDefaultUserOptions['vector-toc-pinned'] = 1;
$wgDefaultUserOptions['vector-appearance-pinned'] = 0;

MediaWiki:Common.css

Initial settings

Open your browser and go to:

https://your-domain.com/mediawiki/MediaWiki:Common.css

Click edit source and add the following styles:

.mw-logo, .mw-logo:visited, .mw-logo:active, .mw-logo:hover { color: #000000; }

.mw-logo-icon { display: none; }

.vector-main-menu-action-opt-out { display: none; }

.mw-header, .mw-page-container, .vector-pinned-container { background-color: #00000000 !important; }

.vector-sticky-pinned-container::after { background: none; }

Background color

Add the following style:

body {
	background-color: #101418;
}

MediaWiki:Sidebar

Go to:

https://your-domain.com/mediawiki/MediaWiki:Sidebar

Keep only the following links:

  • navigation
    • mainpage|mainpage-description
    • recentchanges-url|recentchanges