Skin:Chameleon: Difference between revisions
Blanked the page |
m Reverted edits by 201.25.97.87 (talk) to last revision by Krabina |
||
Line 1: | Line 1: | ||
{{TNT|Skin|templatemode= |
|||
|name = Chameleon |
|||
|status = stable |
|||
|username = F.trott |
|||
|author = Stephan Gambke |
|||
|description = Provides a skin using Twitter Bootstrap 3 |
|||
|image = Chameleon.svg |
|||
|imagesize = 220px |
|||
|version = 1.1.4 |
|||
|update = 2015-05-27 |
|||
|mediawiki = 1.22+ |
|||
|php = 5.3+ |
|||
|composer = mediawiki/chameleon-skin |
|||
|license = GPLv3+ |
|||
|download = see text |
|||
|readme = [https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/README.md README on GitHub] |
|||
|changelog = [https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/release-notes.md Changelog on GitHub] |
|||
|parameters = |
|||
|example = |
|||
|compatibility = |
|||
|phabricator = mediawiki-skins-chameleon |
|||
|CheckUsageNameOverride = chameleon |
|||
}} |
|||
'''Chameleon''' is a highly customizable MediaWiki skin that uses ''Twitter Bootstrap 3''<ref>Twitter Bootstrap: http://getbootstrap.com</ref>. |
|||
It currently provides five different layouts to chose from. The standard layout features a horizontal navigation menu with dropdowns at the top and a horizontal menu with dropups for the language links at the bottom. |
|||
Each layout is defined in an XML file and as such easily adaptable to your needs. |
|||
==Installation== |
|||
The Chameleon skin requires ''Composer''<ref>Composer: https://getcomposer.org</ref> for installation. ([[Composer#What_is_Composer|But why!?]]) |
|||
# If necessary [https://getcomposer.org/doc/00-intro.md#installation-nix install Composer]. |
|||
# Go to your MediaWiki installation directory |
|||
# If necessary (on MediaWiki up to 1.23) copy the file <code>composer.json.example</code> to <code>composer.json</code> |
|||
# With Composer installed, run <code>php composer.phar require mediawiki/chameleon-skin "1.*"</code> |
|||
# {{done}} – Navigate to ''Special:Version'' on your wiki to verify that the skin is successfully installed. |
|||
===Remarks=== |
|||
* To actually activate Chameleon as the default skin of your wiki, include <code>[[Manual:$wgDefaultSkin|$wgDefaultSkin]]='chameleon';</code> in your <code>LocalSettings.php</code> |
|||
* It is not necessary to install any dependencies anymore. Composer will take care of that. |
|||
* If instead of a proper installation you end up with a <code>mediawiki</code> subdirectory in the <code>vendor</code> directory of your MediaWiki installation directory, |
|||
** remove that <code>mediawiki</code> subdirectory and all its contents from the <code>vendor</code> directory and |
|||
** run <code>composer update</code> from the MediaWiki installation directory again (or <code>php composer.phar update</code> if applicable) |
|||
== Documentation == |
|||
The documentation will be successively moved into the sourcecode repository. This allows to better keep it in sync with the development of the code. Moreover it allows to go back in time and see the documentation for a particular version of the skin. |
|||
Use the [https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/index.md documentation index page] as a starting point. |
|||
==Customization== |
|||
===Fonts and Colors=== |
|||
You can customize the skin by loading additional LESS files and by setting LESS variables. |
|||
To import additional LESS files, add them to the array <code>$egChameleonExternalStyleModules</code> in <code>LocalSettings.php</code>: |
|||
<source lang='php'> |
|||
$egChameleonExternalStyleModules = array( |
|||
$localPathToLESSFile1 => $remotePathToLESSFile1Directory, |
|||
$localPathToLESSFile2 => $remotePathToLESSFile2Directory, |
|||
... |
|||
); |
|||
</source> |
|||
If your LESS file does not reference any other files (fonts, images, ...), you may omit the remote path. Just write: |
|||
<source lang='php'> |
|||
$egChameleonExternalStyleModules = array( $localPathToLESSFile1, $localPathToLESSFile2, ... ); |
|||
</source> |
|||
To add or change LESS variables add them to the array <code>$egChameleonExternalLessVariables</code> in <code>LocalSettings.php</code>: |
|||
<source lang='php'> |
|||
$egChameleonExternalLessVariables = array( |
|||
'key1' => 'value1', |
|||
'key2' => 'value2', |
|||
... |
|||
); |
|||
</source> |
|||
Regardless of the order of the calls, variables will always override imported files. A good starting point for customization is Bootstrap's list of variables: http://getbootstrap.com/customize/#less-variables |
|||
==== Example ==== |
|||
To use the Amelia theme from [http://bootswatch.com/ Bootswatch] you could download the <code>variables.less</code> and the <code>bootswatch.less</code> file to your MediaWiki installation directory and rename them to <code>amelia-variables.less</code> and <code>amelia-bootswatch.less</code>. You then add the following code to your <code>LocalSettings.php</code>: |
|||
<source lang='php'> |
|||
$egChameleonExternalStyleModules = array( |
|||
__DIR__ . '/amelia-variables.less' => $wgScriptPath, |
|||
__DIR__ . '/amelia-bootswatch.less' => $wgScriptPath, |
|||
); |
|||
</source> |
|||
To make the navigation bar a bit narrower you could add |
|||
<source lang='php'> |
|||
$egChameleonExternalLessVariables = array( |
|||
'navbar-height' => '30px', |
|||
); |
|||
</source> |
|||
===Layout of page elements=== |
|||
The layout of the page elements (nav bar, logo, search bar, etc.) is defined in an XML file. There are currently four pre-defined layouts available: standard, navhead, fixedhead and stickyhead. They can be activated by setting the variable <code>$egChameleonLayoutFile</code> in LocalSettings.php. E.g. to activate the fixedhead layout you could add |
|||
<source lang='php'> |
|||
$egChameleonLayoutFile= __DIR__ . '/skins/chameleon/layouts/fixedhead.xml'; |
|||
</source> |
|||
You can of course also define and use your own layout. Have a look at the available XML files to see what is possible. (Better documentation to follow.) |
|||
==Screenshots== |
|||
<gallery mode="packed" style="background-color: #f7f7f7;padding-top:1ex;"> |
|||
File:ChameleonSkin.png|Whole page in standard layout |
|||
File:ChameleonSkinNav.png|Navigation menu |
|||
File:ChameleonSkinLang.png|Language menu |
|||
File:ChameleonSkin-Amelia.png|With Amelia theme and narrower navigation bar |
|||
File:ChameleonSkin-NavHead.png|Using the NavHead layout |
|||
File:ChameleonSkin-FixedHead.png|Using the FixedHead layout |
|||
</gallery> |
|||
==Live examples== |
|||
*[http://solutions-web.eu/ Solutions-web.eu] and its [http://solutions-web.eu/index.php/Bootstrap_3_(en) test page of bootstrap features] with [[Manual:$wgRawHtml|$wgRawHtml]] set to '''false''' |
|||
*[http://docupedia.de Docupedia-Zeitgeschichte (in German)] |
|||
*[http://bootstrap.xn--smantique-b4a.com Bootstrap.sémantique] and its [http://bootstrap.xn--smantique-b4a.com/index.php/Bootstrap_et_MediaWiki test page of bootstrap features] with a paid skin and [[Manual:$wgRawHtml|$wgRawHtml]] set to '''true''' |
|||
*[https://star-citizen.wiki German Star Citizen Wiki] |
|||
* [http://lawsofaustralia.net Laws of Australia] |
|||
* [http://www.ogdcockpit.eu/index.php?title=OGD_Cockpit OGD Cockpit] |
|||
* [http://chameleon-test.nablawiki.ru a complete set of examples from ''geybootstrap.com''] (in wiki-markup mode and in raw html mode) |
|||
* add your wiki here |
|||
For further examples see [http://wikiapiary.com/wiki/Skin:Chameleon Chameleon's page on WikiApiary] |
|||
== Contributing to the project == |
|||
see https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/contribute.md |
|||
Bugs and feature requests should preferably be reported on the [http://bugzilla.wikimedia.org Wikimedia bug tracker]. |
|||
Comments, questions and suggestions should be sent or posted to: |
|||
* the [[Skin talk:Chameleon|Chameleon discussion page]] |
|||
* the [[Special:EmailUser/F.trott | author]] |
|||
== Roadmap (kind of) == |
|||
* Improve documentation |
|||
* Add many more components and layouts (suggestions welcome) |
|||
* Improve responsiveness |
|||
* Improve accessibility (see [https://developer.mozilla.org/en-US/docs/Accessibility/ARIA]) |
|||
* Make customizable (colors, fonts, sizes) via a Special page |
|||
* Put a selector for the layout on the user preferences page |
|||
* Compatibility with extensions |
|||
== Credits == |
|||
see https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/credits.md |
|||
== See also == |
|||
{{TNT|Skin based on Bootstrap}} |
|||
== References == |
|||
<references/> |
|||
[[Category:Extensions supporting Composer{{translation}}]] |
|||
[[Category:GPL licensed skins{{translation}}]] |
|||
[[Category:Mobile skins{{translation}}]] |
|||
[[Category:Stable skins{{translation}}]] |
Revision as of 00:43, 11 December 2015
Chameleon Release status: stable |
|
---|---|
Description | Provides a skin using Twitter Bootstrap 3 |
Author(s) | Stephan Gambke |
Latest version | 1.1.4 (2015-05-27) |
MediaWiki | 1.22+ |
PHP | 5.3+ |
Composer | mediawiki/chameleon-skin |
License | GPLv3 |
Download | see text README on GitHub Changelog on GitHub |
Public wikis using | 243 (Ranked 28th) |
Public wikis using as default skin | 195 |
Translate the Chameleon skin if it is available at translatewiki.net | |
Issues : | Open tasks · Report a bug |
Chameleon is a highly customizable MediaWiki skin that uses Twitter Bootstrap 3[1].
It currently provides five different layouts to chose from. The standard layout features a horizontal navigation menu with dropdowns at the top and a horizontal menu with dropups for the language links at the bottom. Each layout is defined in an XML file and as such easily adaptable to your needs.
Installation
The Chameleon skin requires Composer[2] for installation. (But why!?)
- If necessary install Composer.
- Go to your MediaWiki installation directory
- If necessary (on MediaWiki up to 1.23) copy the file
composer.json.example
tocomposer.json
- With Composer installed, run
php composer.phar require mediawiki/chameleon-skin "1.*"
- Done – Navigate to Special:Version on your wiki to verify that the skin is successfully installed.
Remarks
- To actually activate Chameleon as the default skin of your wiki, include
$wgDefaultSkin='chameleon';
in yourLocalSettings.php
- It is not necessary to install any dependencies anymore. Composer will take care of that.
- If instead of a proper installation you end up with a
mediawiki
subdirectory in thevendor
directory of your MediaWiki installation directory,- remove that
mediawiki
subdirectory and all its contents from thevendor
directory and - run
composer update
from the MediaWiki installation directory again (orphp composer.phar update
if applicable)
- remove that
Documentation
The documentation will be successively moved into the sourcecode repository. This allows to better keep it in sync with the development of the code. Moreover it allows to go back in time and see the documentation for a particular version of the skin.
Use the documentation index page as a starting point.
Customization
Fonts and Colors
You can customize the skin by loading additional LESS files and by setting LESS variables.
To import additional LESS files, add them to the array $egChameleonExternalStyleModules
in LocalSettings.php
:
$egChameleonExternalStyleModules = array(
$localPathToLESSFile1 => $remotePathToLESSFile1Directory,
$localPathToLESSFile2 => $remotePathToLESSFile2Directory,
...
);
If your LESS file does not reference any other files (fonts, images, ...), you may omit the remote path. Just write:
$egChameleonExternalStyleModules = array( $localPathToLESSFile1, $localPathToLESSFile2, ... );
To add or change LESS variables add them to the array $egChameleonExternalLessVariables
in LocalSettings.php
:
$egChameleonExternalLessVariables = array(
'key1' => 'value1',
'key2' => 'value2',
...
);
Regardless of the order of the calls, variables will always override imported files. A good starting point for customization is Bootstrap's list of variables: http://getbootstrap.com/customize/#less-variables
Example
To use the Amelia theme from Bootswatch you could download the variables.less
and the bootswatch.less
file to your MediaWiki installation directory and rename them to amelia-variables.less
and amelia-bootswatch.less
. You then add the following code to your LocalSettings.php
:
$egChameleonExternalStyleModules = array(
__DIR__ . '/amelia-variables.less' => $wgScriptPath,
__DIR__ . '/amelia-bootswatch.less' => $wgScriptPath,
);
To make the navigation bar a bit narrower you could add
$egChameleonExternalLessVariables = array(
'navbar-height' => '30px',
);
Layout of page elements
The layout of the page elements (nav bar, logo, search bar, etc.) is defined in an XML file. There are currently four pre-defined layouts available: standard, navhead, fixedhead and stickyhead. They can be activated by setting the variable $egChameleonLayoutFile
in LocalSettings.php. E.g. to activate the fixedhead layout you could add
$egChameleonLayoutFile= __DIR__ . '/skins/chameleon/layouts/fixedhead.xml';
You can of course also define and use your own layout. Have a look at the available XML files to see what is possible. (Better documentation to follow.)
Screenshots
-
Whole page in standard layout
-
Navigation menu
-
Language menu
-
With Amelia theme and narrower navigation bar
-
Using the NavHead layout
-
Using the FixedHead layout
Live examples
- Solutions-web.eu and its test page of bootstrap features with $wgRawHtml set to false
- Docupedia-Zeitgeschichte (in German)
- Bootstrap.sémantique and its test page of bootstrap features with a paid skin and $wgRawHtml set to true
- German Star Citizen Wiki
- Laws of Australia
- OGD Cockpit
- a complete set of examples from geybootstrap.com (in wiki-markup mode and in raw html mode)
- add your wiki here
For further examples see Chameleon's page on WikiApiary
Contributing to the project
see https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/contribute.md
Bugs and feature requests should preferably be reported on the Wikimedia bug tracker.
Comments, questions and suggestions should be sent or posted to:
- the Chameleon discussion page
- the author
Roadmap (kind of)
- Improve documentation
- Add many more components and layouts (suggestions welcome)
- Improve responsiveness
- Improve accessibility (see [1])
- Make customizable (colors, fonts, sizes) via a Special page
- Put a selector for the layout on the user preferences page
- Compatibility with extensions
Credits
see https://github.com/wikimedia/mediawiki-skins-chameleon/blob/master/docs/credits.md
See also
Other skins and extensions related to the Bootstrap framework:
- Skins based on Bootstrap - Overview of skins based on the Bootstrap framework
- Extension:Bootstrap - Provides the Bootstrap framework to MediaWiki
- Extension:BootstrapComponents - Provides further components to the Bootstrap framework for MediaWiki
References
- ↑ Twitter Bootstrap: http://getbootstrap.com
- ↑ Composer: https://getcomposer.org
[[Category:Extensions supporting ComposerTemplate:Translation]] [[Category:GPL licensed skinsTemplate:Translation]] [[Category:Mobile skinsTemplate:Translation]] [[Category:Stable skinsTemplate:Translation]]