summaryrefslogtreecommitdiff
path: root/www/wiki/skins/chameleon
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /www/wiki/skins/chameleon
first commit
Diffstat (limited to 'www/wiki/skins/chameleon')
-rw-r--r--www/wiki/skins/chameleon/.gitignore6
-rw-r--r--www/wiki/skins/chameleon/.travis.yml46
-rw-r--r--www/wiki/skins/chameleon/COPYING688
-rw-r--r--www/wiki/skins/chameleon/Chameleon.i18n.php60
-rw-r--r--www/wiki/skins/chameleon/Chameleon.php100
-rw-r--r--www/wiki/skins/chameleon/Gruntfile.js59
-rw-r--r--www/wiki/skins/chameleon/README.md37
-rw-r--r--www/wiki/skins/chameleon/build/travis/build.sh110
-rw-r--r--www/wiki/skins/chameleon/composer.json54
-rw-r--r--www/wiki/skins/chameleon/docs/Chameleon.svg162
-rw-r--r--www/wiki/skins/chameleon/docs/components.md949
-rw-r--r--www/wiki/skins/chameleon/docs/contact.md19
-rw-r--r--www/wiki/skins/chameleon/docs/contribute.md67
-rw-r--r--www/wiki/skins/chameleon/docs/copying.md476
-rw-r--r--www/wiki/skins/chameleon/docs/credits.md55
-rw-r--r--www/wiki/skins/chameleon/docs/customization.md135
-rw-r--r--www/wiki/skins/chameleon/docs/index.md30
-rw-r--r--www/wiki/skins/chameleon/docs/installation-linux.md38
-rw-r--r--www/wiki/skins/chameleon/docs/installation-troubleshooting.md6
-rw-r--r--www/wiki/skins/chameleon/docs/installation-windows.md31
-rw-r--r--www/wiki/skins/chameleon/docs/installation.md59
-rw-r--r--www/wiki/skins/chameleon/docs/layouts.md20
-rw-r--r--www/wiki/skins/chameleon/docs/legal.md127
-rw-r--r--www/wiki/skins/chameleon/docs/licenses.md23
-rw-r--r--www/wiki/skins/chameleon/docs/release-notes.md292
-rw-r--r--www/wiki/skins/chameleon/docs/testing.md26
-rw-r--r--www/wiki/skins/chameleon/docs/variables.md405
-rw-r--r--www/wiki/skins/chameleon/layouts/clean.xml61
-rw-r--r--www/wiki/skins/chameleon/layouts/fixedhead.xml71
-rw-r--r--www/wiki/skins/chameleon/layouts/layout.rng570
-rw-r--r--www/wiki/skins/chameleon/layouts/navhead.xml73
-rw-r--r--www/wiki/skins/chameleon/layouts/standard.xml98
-rw-r--r--www/wiki/skins/chameleon/layouts/stickyhead.xml75
-rw-r--r--www/wiki/skins/chameleon/maintenance/validateLayout.php98
-rw-r--r--www/wiki/skins/chameleon/package.json37
-rw-r--r--www/wiki/skins/chameleon/phpunit.xml.dist55
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ar.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/arq.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ast.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/av.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/azb.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ba.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/bcc.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/bcl.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/be-tarask.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/bg.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/bn.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/br.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/bs.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ca.json15
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ce.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/cs.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/csb.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/da.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/de.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/diq.json16
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/dty.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/el.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/en.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/es.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/eu.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/fa.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/fi.json15
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/fo.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/fr.json15
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/gcr.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/gl.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/got.json8
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/gu.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/he.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/hi.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/hr.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/hu.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/hy.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ia.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/id.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/is.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/it.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ja.json15
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/jv.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/kab.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/km.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ko-kp.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ko.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ksh.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/lb.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/lt.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/lzh.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/mg.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/min.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/mk.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/mn.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ms.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/my.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/nah.json8
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/nap.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/nb.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/nl.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/oc.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/olo.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/pa.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/pl.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ps.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/pt-br.json15
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/pt.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/qqq.json16
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ro.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/roa-tara.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ru.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sah.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/scn.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sco.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sd.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sgs.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sl.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sq.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sr-ec.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sr-el.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/su.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/sv.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/szl.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ta.json10
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/tg-cyrl.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/tr.json11
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/tt-cyrl.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/uk.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/ur.json12
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/vi.json13
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/xmf.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/yi.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/zgh.json9
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/zh-hans.json14
-rw-r--r--www/wiki/skins/chameleon/resources/i18n/zh-hant.json14
-rw-r--r--www/wiki/skins/chameleon/resources/js/Components/Modifications/sticky.js38
-rw-r--r--www/wiki/skins/chameleon/resources/js/sticky-kit/jquery.sticky-kit.js273
-rw-r--r--www/wiki/skins/chameleon/resources/styles/Components/Modifications/Sticky.less29
-rw-r--r--www/wiki/skins/chameleon/resources/styles/Components/NavbarHorizontal.less238
-rw-r--r--www/wiki/skins/chameleon/resources/styles/core.less44
-rw-r--r--www/wiki/skins/chameleon/resources/styles/extensionfixes.less118
-rw-r--r--www/wiki/skins/chameleon/resources/styles/forms.less39
-rw-r--r--www/wiki/skins/chameleon/resources/styles/images.less104
-rw-r--r--www/wiki/skins/chameleon/resources/styles/mixins.less64
-rw-r--r--www/wiki/skins/chameleon/resources/styles/print.less45
-rw-r--r--www/wiki/skins/chameleon/resources/styles/screen.less444
-rw-r--r--www/wiki/skins/chameleon/resources/styles/specialpages.less74
-rw-r--r--www/wiki/skins/chameleon/resources/styles/utils.less90
-rw-r--r--www/wiki/skins/chameleon/resources/styles/variables.less56
-rw-r--r--www/wiki/skins/chameleon/src/ChameleonTemplate.php117
-rw-r--r--www/wiki/skins/chameleon/src/ComponentFactory.php265
-rw-r--r--www/wiki/skins/chameleon/src/Components/Cell.php57
-rw-r--r--www/wiki/skins/chameleon/src/Components/Component.php222
-rw-r--r--www/wiki/skins/chameleon/src/Components/Container.php60
-rw-r--r--www/wiki/skins/chameleon/src/Components/ContentBody.php218
-rw-r--r--www/wiki/skins/chameleon/src/Components/ContentHeader.php76
-rw-r--r--www/wiki/skins/chameleon/src/Components/FooterIcons.php73
-rw-r--r--www/wiki/skins/chameleon/src/Components/FooterInfo.php83
-rw-r--r--www/wiki/skins/chameleon/src/Components/FooterPlaces.php64
-rw-r--r--www/wiki/skins/chameleon/src/Components/Grid.php59
-rw-r--r--www/wiki/skins/chameleon/src/Components/Html.php61
-rw-r--r--www/wiki/skins/chameleon/src/Components/LastmodInfo.php85
-rw-r--r--www/wiki/skins/chameleon/src/Components/LegalInfo.php85
-rw-r--r--www/wiki/skins/chameleon/src/Components/Logo.php98
-rw-r--r--www/wiki/skins/chameleon/src/Components/MainContent.php215
-rw-r--r--www/wiki/skins/chameleon/src/Components/Menu.php96
-rw-r--r--www/wiki/skins/chameleon/src/Components/Modifications/HideFor.php71
-rw-r--r--www/wiki/skins/chameleon/src/Components/Modifications/Modification.php174
-rw-r--r--www/wiki/skins/chameleon/src/Components/Modifications/ShowOnlyFor.php71
-rw-r--r--www/wiki/skins/chameleon/src/Components/Modifications/Sticky.php51
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavMenu.php221
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal.php256
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Logo.php54
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Menu.php51
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/NavMenu.php51
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageTools.php159
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageToolsAdaptable.php209
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PersonalTools.php117
-rw-r--r--www/wiki/skins/chameleon/src/Components/NavbarHorizontal/SearchBar.php55
-rw-r--r--www/wiki/skins/chameleon/src/Components/NewtalkNotifier.php57
-rw-r--r--www/wiki/skins/chameleon/src/Components/PageTools.php267
-rw-r--r--www/wiki/skins/chameleon/src/Components/PersonalTools.php82
-rw-r--r--www/wiki/skins/chameleon/src/Components/Row.php45
-rw-r--r--www/wiki/skins/chameleon/src/Components/SearchBar.php144
-rw-r--r--www/wiki/skins/chameleon/src/Components/Silent.php51
-rw-r--r--www/wiki/skins/chameleon/src/Components/SiteNotice.php59
-rw-r--r--www/wiki/skins/chameleon/src/Components/Structure.php96
-rw-r--r--www/wiki/skins/chameleon/src/Components/ToolbarHorizontal.php142
-rw-r--r--www/wiki/skins/chameleon/src/Hooks/SetupAfterCache.php242
-rw-r--r--www/wiki/skins/chameleon/src/IdRegistry.php122
-rw-r--r--www/wiki/skins/chameleon/src/Menu/Menu.php118
-rw-r--r--www/wiki/skins/chameleon/src/Menu/MenuFactory.php91
-rw-r--r--www/wiki/skins/chameleon/src/Menu/MenuFromLines.php273
-rw-r--r--www/wiki/skins/chameleon/src/PermissionsHelper.php195
-rw-r--r--www/wiki/skins/chameleon/src/SkinChameleon.php122
-rw-r--r--www/wiki/skins/chameleon/tests/bootstrap.php77
-rw-r--r--www/wiki/skins/chameleon/tests/mw-phpunit-runner.php91
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Cell.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Container.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterIcons.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterInfo.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterPlaces.xml4
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Grid.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Html.xml9
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Logo.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/MainContent.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Menu.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/HideFor.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/ShowOnlyFor.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/NavMenu.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal.xml11
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PageToolsAdaptable.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PersonalTools.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/NewtalkNotifier.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/PageTools.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/PersonalTools.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Row.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/SearchBar.xml4
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Silent.xml5
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/SiteNotice.xml4
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/Structure.xml2
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/ToolbarHorizontal.xml4
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Fixture/externalmodule.less0
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Integration/StylesCompileTest.php75
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Integration/XmlLayoutFileValidityTest.php68
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/ChameleonTemplateTest.php83
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/CellTest.php98
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ComponentTest.php340
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ContainerTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterIconsTest.php85
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterInfoTest.php78
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterPlacesTest.php71
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GenericComponentTestCase.php345
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GridTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/HtmlTest.php67
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/LogoTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MainContentTest.php63
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MenuTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/GenericModificationTestCase.php57
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/HideForTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/ShowOnlyForTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavMenuTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontalTest.php78
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PageToolsAdaptableTest.php326
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PersonalToolsTest.php84
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NewtalkNotifierTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PageToolsTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PersonalToolsTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/RowTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SearchBarTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SilentTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SiteNoticeTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/StructureTest.php57
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ToolbarHorizontalTest.php44
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Hooks/SetupAfterCacheTest.php498
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Unit/Menu/MenuFromLinesTest.php127
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Util/ColoringTextUIResultPrinter.php105
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Util/DocumentElementFinder.php124
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Util/MockupFactory.php335
-rw-r--r--www/wiki/skins/chameleon/tests/phpunit/Util/XmlFileProvider.php85
258 files changed, 17858 insertions, 0 deletions
diff --git a/www/wiki/skins/chameleon/.gitignore b/www/wiki/skins/chameleon/.gitignore
new file mode 100644
index 00000000..c4dff55e
--- /dev/null
+++ b/www/wiki/skins/chameleon/.gitignore
@@ -0,0 +1,6 @@
+# -*- mode: gitignore; -*-
+*~
+\#*\#
+.\#*
+node_modules
+npm-debug.log
diff --git a/www/wiki/skins/chameleon/.travis.yml b/www/wiki/skins/chameleon/.travis.yml
new file mode 100644
index 00000000..b051d14a
--- /dev/null
+++ b/www/wiki/skins/chameleon/.travis.yml
@@ -0,0 +1,46 @@
+#####
+# This file is part of the MediaWiki skin Chameleon.
+#
+# @copyright 2013 - 2017, Stephan Gambke, mwjames
+# @license GNU General Public License, version 3 (or any later version)
+#
+# The Chameleon skin is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# The Chameleon skin is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# @file
+#
+# @author mwjames
+# @since 1.0
+# @ingroup Skins
+#####
+
+language: php
+sudo: false
+
+matrix:
+ include:
+ - env: DBTYPE=mysql; MW=master
+ php: 5.6
+ - env: DBTYPE=mysql; MW=1.29.1
+ php: 7.1
+ - env: DBTYPE=mysql; MW=1.27.3
+ php: 5.6
+ - env: DBTYPE=mysql; MW=1.25.6
+ php: 5.3
+ dist: precise
+ sudo: required
+ - env: DBTYPE=sqlite; MW=1.22.1
+ php: 5.5
+
+script:
+ - bash ./build/travis/build.sh
diff --git a/www/wiki/skins/chameleon/COPYING b/www/wiki/skins/chameleon/COPYING
new file mode 100644
index 00000000..18c25f5b
--- /dev/null
+++ b/www/wiki/skins/chameleon/COPYING
@@ -0,0 +1,688 @@
+<pre>
+The license text below "----" applies to all files within this distribution,
+other than those that are in a directory which contains files named "LICENSE"
+or "COPYING", or a subdirectory thereof. For those files, the license text
+contained in said file overrides any license information contained in
+directories of smaller depth. Alternative licenses are typically used for
+software that is provided by external parties, and merely packaged with this
+software for convenience.
+
+You may (at your option) instead use any later version of the GNU Public
+License.
+
+----
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+</pre>
diff --git a/www/wiki/skins/chameleon/Chameleon.i18n.php b/www/wiki/skins/chameleon/Chameleon.i18n.php
new file mode 100644
index 00000000..ad669523
--- /dev/null
+++ b/www/wiki/skins/chameleon/Chameleon.i18n.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+
+/**
+ * This is a backwards-compatibility shim, generated by:
+ * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
+ *
+ * Beginning with MediaWiki 1.23, translation strings are stored in json files,
+ * and the EXTENSION.i18n.php file only exists to provide compatibility with
+ * older releases of MediaWiki. For more information about this migration, see:
+ * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
+ *
+ * This shim maintains compatibility back to MediaWiki 1.17.
+ */
+$messages = array();
+if ( !function_exists( 'wfJsonI18nShimf931c1431e4504b8' ) ) {
+ function wfJsonI18nShimf931c1431e4504b8( $cache, $code, &$cachedData ) {
+ $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
+ foreach ( $codeSequence as $csCode ) {
+ $fileName = dirname( __FILE__ ) . "/resources/i18n//$csCode.json";
+ if ( is_readable( $fileName ) ) {
+ $data = FormatJson::decode( file_get_contents( $fileName ), true );
+ foreach ( array_keys( $data ) as $key ) {
+ if ( $key === '' || $key[0] === '@' ) {
+ unset( $data[$key] );
+ }
+ }
+ $cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
+ }
+
+ $cachedData['deps'][] = new FileDependency( $fileName );
+ }
+ return true;
+ }
+
+ $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimf931c1431e4504b8';
+}
diff --git a/www/wiki/skins/chameleon/Chameleon.php b/www/wiki/skins/chameleon/Chameleon.php
new file mode 100644
index 00000000..6e87d03a
--- /dev/null
+++ b/www/wiki/skins/chameleon/Chameleon.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ * The Chameleon skin. A Mediawiki skin using Twitter Bootstrap.
+ *
+ * @see https://www.mediawiki.org/wiki/Skin:Chameleon
+ *
+ * @author Stephan Gambke
+ *
+ */
+
+/**
+ * This is the main file of the Chameleon skin
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2018, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ *
+ * @codeCoverageIgnore
+ */
+
+call_user_func( function () {
+
+ if ( !defined( 'MEDIAWIKI' ) ) {
+ die( 'This file is part of a MediaWiki extension, it is not a valid entry point.' );
+ }
+
+ if ( !defined( 'BS_VERSION' ) ) {
+ die( '<b>Error:</b> The <a href="https://www.mediawiki.org/wiki/Skin:Chameleon">Chameleon</a> skin depends on the Bootstrap extension. You need to install the <a href="https://www.mediawiki.org/wiki/Extension:Bootstrap">Bootstrap</a> extension first.' );
+ }
+
+ // define the skin's version
+ define( 'CHAMELEON_VERSION', '1.7.1' );
+
+ // set credits
+ $GLOBALS[ 'wgExtensionCredits' ][ 'skin' ][ ] = array(
+ 'path' => __FILE__,
+ 'name' => 'Chameleon',
+ 'descriptionmsg' => 'chameleon-desc',
+ 'author' => '[https://www.mediawiki.org/wiki/User:F.trott Stephan Gambke]',
+ 'url' => 'https://www.mediawiki.org/wiki/Skin:Chameleon',
+ 'version' => CHAMELEON_VERSION,
+ 'license-name' => 'GPL-3.0+',
+ );
+
+ // register skin
+ $GLOBALS[ 'wgValidSkinNames' ][ 'chameleon' ] = 'Chameleon';
+
+ // register message file for i18n
+ $GLOBALS[ 'wgExtensionMessagesFiles' ][ 'Chameleon' ] = __DIR__ . '/Chameleon.i18n.php';
+ $GLOBALS[ 'wgMessagesDirs' ][ 'Chameleon' ] = __DIR__ . '/resources/i18n';
+
+ /**
+ * Using callbacks for hook registration
+ *
+ * The hook registry should contain as less knowledge about a process as
+ * necessary therefore a callback is used as Factory/Builder that instantiates
+ * a business / domain object.
+ *
+ * GLOBAL state should be encapsulated by the callback and not leaked into
+ * a instantiated class
+ */
+
+ /**
+ * @see https://www.mediawiki.org/wiki/Manual:Hooks/BeforeInitialize
+ */
+ $GLOBALS[ 'wgHooks' ][ 'SetupAfterCache' ][ ] = function() {
+
+ $setupAfterCache = new \Skins\Chameleon\Hooks\SetupAfterCache(
+ \Bootstrap\BootstrapManager::getInstance(),
+ $GLOBALS,
+ $GLOBALS['wgRequest']
+ );
+
+ $setupAfterCache->process();
+ };
+
+ // set default skin layout
+ $GLOBALS[ 'egChameleonLayoutFile' ] = dirname( __FILE__ ) . '/layouts/standard.xml';
+
+ // enable the VisualEditor for this skin
+ $GLOBALS[ 'egChameleonEnableVisualEditor' ] = true;
+
+} );
diff --git a/www/wiki/skins/chameleon/Gruntfile.js b/www/wiki/skins/chameleon/Gruntfile.js
new file mode 100644
index 00000000..ff13d514
--- /dev/null
+++ b/www/wiki/skins/chameleon/Gruntfile.js
@@ -0,0 +1,59 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+
+ 'use strict';
+
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+ grunt.initConfig( {
+ jshint: {
+ options: {
+ // Enforcing
+ "bitwise": true,
+ "curly": true,
+ "eqeqeq": true,
+ "freeze": true,
+ "latedef": "nofunc",
+ "noarg": true,
+ "nonew": true,
+ "undef": true,
+ "unused": true,
+ "strict": true,
+
+ // ECMAScript version
+ "esversion": 3,
+
+ // Environment
+ "browser": true,
+ "jquery": true,
+
+ // map of global variables, with keys as names and a boolean value to determine if they are assignable
+ "globals": {
+ "mediaWiki": false
+ },
+
+ "ignores": []
+ },
+ all: [
+ '**/*.js',
+ '!node_modules/**',
+ '!resources/js/sticky-kit/**'
+ ]
+ },
+ banana: {
+ all: 'resources/i18n/'
+ },
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'lint', [ 'jshint', 'jsonlint', 'banana' ] );
+ grunt.registerTask( 'test', [ 'lint' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/www/wiki/skins/chameleon/README.md b/www/wiki/skins/chameleon/README.md
new file mode 100644
index 00000000..fe5420d6
--- /dev/null
+++ b/www/wiki/skins/chameleon/README.md
@@ -0,0 +1,37 @@
+# Chameleon skin
+[![Build Status](https://travis-ci.org/cmln/chameleon.svg?branch=master)](https://travis-ci.org/cmln/chameleon)
+[![Code Coverage](https://scrutinizer-ci.com/g/cmln/chameleon/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/cmln/chameleon/?branch=master)
+[![Code Quality](https://scrutinizer-ci.com/g/cmln/chameleon/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/cmln/chameleon/?branch=master)
+[![Dependency Status](https://www.versioneye.com/php/mediawiki:chameleon-skin/badge.png)](https://www.versioneye.com/php/mediawiki:chameleon-skin)
+[![Latest Stable Version](https://poser.pugx.org/mediawiki/chameleon-skin/version.png)](https://packagist.org/packages/mediawiki/chameleon-skin)
+[![Packagist download count](https://poser.pugx.org/mediawiki/chameleon-skin/d/total.png)](https://packagist.org/packages/mediawiki/chameleon-skin)
+
+<img src='https://upload.wikimedia.org/wikipedia/mediawiki/thumb/3/31/Chameleon.svg/220px-Chameleon.svg.png' style='float:left;' align="left" title='Chameleon Skin Logo'>
+
+Chameleon is a highly customizable [MediaWiki][mw] skin that uses [Twitter
+Bootstrap 3][twbs].
+
+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.
+<br/>
+<br/>
+<br/>
+
+## Documentation
+1. [Installation, Update, De-Installation](docs/installation.md)
+2. [Customization](docs/customization.md)
+3. [Release Notes](docs/release-notes.md)
+4. [Testing](docs/testing.md)
+5. [How to contribute](docs/contribute.md)
+6. [Credits](docs/credits.md)
+7. [Licenses](docs/licenses.md)
+8. [Contact](docs/contact.md)
+
+[mw]: https://www.mediawiki.org
+[mw-chameleon]: https://www.mediawiki.org/wiki/Skin:Chameleon
+[mw-chameleon-talk]: https://www.mediawiki.org/wiki/Skin_talk:Chameleon
+[composer]: https://getcomposer.org/
+[twbs]: http://getbootstrap.com/
+[license]: https://www.gnu.org/copyleft/gpl.html
diff --git a/www/wiki/skins/chameleon/build/travis/build.sh b/www/wiki/skins/chameleon/build/travis/build.sh
new file mode 100644
index 00000000..d2adff96
--- /dev/null
+++ b/www/wiki/skins/chameleon/build/travis/build.sh
@@ -0,0 +1,110 @@
+#! /bin/bash
+
+#####
+# This file is part of the MediaWiki skin Chameleon.
+#
+# @copyright 2013 - 2016, Stephan Gambke, mwjames
+# @license GNU General Public License, version 3 (or any later version)
+#
+# The Chameleon skin is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# The Chameleon skin is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# @author mwjames
+# @since 1.0
+# @ingroup Skins
+#####
+
+set -x # display commands and their expanded arguments
+set -u # treat unset variables as an error when performing parameter expansion
+set -o pipefail # pipelines exit with last (rightmost) non-zero exit code
+set -e # exit immediately if a command exits with an error
+
+originalDirectory=$(pwd)
+
+function installMediaWiki {
+ cd ..
+
+ wget https://github.com/wikimedia/mediawiki/archive/$MW.tar.gz
+ tar -zxf $MW.tar.gz
+ mv mediawiki-$MW mw
+
+ cd mw
+
+ ## MW 1.25+ installs packages using composer
+ if [ -f composer.json ]
+ then
+ composer install --prefer-source
+ fi
+
+ mysql -e 'create database its_a_mw;'
+ php maintenance/install.php --dbtype $DBTYPE --dbuser root --dbname its_a_mw --dbpath $(pwd) --pass nyan TravisWiki admin
+}
+
+function installSkinViaComposerOnMediaWikiRoot {
+
+ if [ ! -f composer.json ]
+ then
+ composer init
+ fi
+
+ composer remove --dev --update-with-dependencies 'phpunit/phpunit'
+ composer require 'phpunit/phpunit=~4.0' 'mediawiki/chameleon-skin=@dev' --prefer-source
+
+ cd skins
+ cd chameleon
+
+ # Pull request number, "false" if it's not a pull request
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]
+ then
+ git fetch origin +refs/pull/"$TRAVIS_PULL_REQUEST"/merge:
+ git checkout -f FETCH_HEAD
+ else
+ git fetch origin "$TRAVIS_BRANCH"
+ git checkout -f FETCH_HEAD
+ fi
+
+ git log HEAD^..HEAD
+
+ cd ../..
+
+ # Rebuild the class map after git fetch
+ composer dump-autoload
+
+ echo 'error_reporting(E_ALL| E_STRICT);' >> LocalSettings.php
+ echo 'ini_set("display_errors", 1);' >> LocalSettings.php
+ echo '$wgShowExceptionDetails = true;' >> LocalSettings.php
+ echo '$wgDevelopmentWarnings = true;' >> LocalSettings.php
+ echo "putenv( 'MW_INSTALL_PATH=$(pwd)' );" >> LocalSettings.php
+
+ php maintenance/update.php --quick --skip-external-dependencies
+}
+
+function uploadCoverageReport {
+ wget https://scrutinizer-ci.com/ocular.phar
+ php ocular.phar code-coverage:upload --repository='g/cmln/chameleon' --format=php-clover coverage.clover
+}
+
+composer self-update
+
+installMediaWiki
+installSkinViaComposerOnMediaWikiRoot
+
+cd skins/chameleon
+
+if [ "$MW" == "master" ]
+then
+ php ../../tests/phpunit/phpunit.php --group skins-chameleon -c phpunit.xml.dist --coverage-clover=coverage.clover
+ uploadCoverageReport
+else
+ php ../../tests/phpunit/phpunit.php --group skins-chameleon -c phpunit.xml.dist
+fi
diff --git a/www/wiki/skins/chameleon/composer.json b/www/wiki/skins/chameleon/composer.json
new file mode 100644
index 00000000..60bbc074
--- /dev/null
+++ b/www/wiki/skins/chameleon/composer.json
@@ -0,0 +1,54 @@
+{
+ "name" : "mediawiki/chameleon-skin",
+ "type" : "mediawiki-skin",
+ "description": "A highly flexible MediaWiki skin using Twitter Bootstrap 3",
+ "keywords" : [
+ "wiki",
+ "MediaWiki",
+ "skin",
+ "Twitter",
+ "Bootstrap"
+ ],
+ "homepage" : "https://github.com/cmln/chameleon",
+ "license" : "GPL-3.0+",
+ "authors" : [
+ {
+ "name" : "Stephan Gambke",
+ "email": "s7eph4n@gmail.com",
+ "role" : "Developer"
+ }
+ ],
+ "support" : {
+ "docs" : "https://github.com/cmln/chameleon",
+ "source": "https://github.com/cmln/chameleon.git",
+ "issues": "https://github.com/cmln/chameleon/issues",
+ "irc" : "irc://irc.freenode.org/mediawiki"
+ },
+ "require" : {
+ "php" : ">=5.3.2",
+ "ext-dom" : "*",
+ "ext-filter" : "*",
+ "composer/installers": ">1.0.12",
+ "mediawiki/bootstrap": "~1.1"
+ },
+ "autoload" : {
+ "files": [ "Chameleon.php", "src/SkinChameleon.php" ],
+ "psr-4": {
+ "Skins\\Chameleon\\Tests\\" : "tests/phpunit",
+ "Skins\\Chameleon\\" : "src"
+ }
+ },
+ "extra" : {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "scripts": {
+ "phpunit": "php ../../tests/phpunit/phpunit.php -c phpunit.xml.dist",
+ "test": [
+ "npm test",
+ "@phpunit"
+ ],
+ "build": "npm run build"
+ }
+}
diff --git a/www/wiki/skins/chameleon/docs/Chameleon.svg b/www/wiki/skins/chameleon/docs/Chameleon.svg
new file mode 100644
index 00000000..a604647b
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/Chameleon.svg
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- This "Chameleon Skin Logo" was derived from the "Chameleon free icon"
+(http://www.flaticon.com/free-icon/chameleon_36320) made by Freepik
+(http://www.freepik.com) from www.flaticon.com (http://www.flaticon.com),
+which is licensed under CC BY 3.0 (http://creativecommons.org/licenses/by/3.0/).
+The "Chameleon Skin Logo"
+(https://github.com/cmln/chameleon/blob/master/docs/Chameleon.svg)
+itself was made by Stephan Gambke (https://www.mediawiki.org/wiki/User:F.trott)
+and is licensed under CC BY 3.0 (http://creativecommons.org/licenses/by/3.0/)
+as well.
+ -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ x="0px"
+ y="0px"
+ width="169.79723"
+ height="135.93365"
+ viewBox="0 0 169.79722 135.93366"
+ enable-background="new 0 0 50 50"
+ xml:space="preserve"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="Chameleon.svg"><metadata
+ id="metadata3082"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ id="defs3080"><linearGradient
+ id="linearGradient6292"><stop
+ style="stop-color:#005800;stop-opacity:1;"
+ offset="0"
+ id="stop6294" /><stop
+ id="stop6296"
+ offset="0.37156528"
+ style="stop-color:#3e7e00;stop-opacity:1;" /><stop
+ id="stop6298"
+ offset="0.54123485"
+ style="stop-color:#a48000;stop-opacity:1;" /><stop
+ style="stop-color:#ca6900;stop-opacity:1;"
+ offset="0.71649456"
+ id="stop6300" /><stop
+ id="stop6302"
+ offset="1"
+ style="stop-color:#f00000;stop-opacity:1;" /></linearGradient><marker
+ inkscape:stockid="Arrow2Sstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Sstart"
+ style="overflow:visible"><path
+ id="path5498"
+ style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="matrix(0.3,0,0,0.3,-0.69,0)"
+ inkscape:connector-curvature="0" /></marker><marker
+ inkscape:stockid="Arrow1Lstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Lstart"
+ style="overflow:visible"><path
+ id="path5468"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+ transform="matrix(0.8,0,0,0.8,10,0)"
+ inkscape:connector-curvature="0" /></marker><linearGradient
+ id="linearGradient5440"><stop
+ id="stop5452"
+ offset="0"
+ style="stop-color:#008000;stop-opacity:1;" /><stop
+ style="stop-color:#4d9c00;stop-opacity:1;"
+ offset="0.25"
+ id="stop5462" /><stop
+ style="stop-color:#b6b800;stop-opacity:1;"
+ offset="0.5"
+ id="stop5456" /><stop
+ id="stop5458"
+ offset="0.75"
+ style="stop-color:#d46e00;stop-opacity:1;" /><stop
+ style="stop-color:#f00000;stop-opacity:1;"
+ offset="1"
+ id="stop5444" /></linearGradient><filter
+ id="filter3128"
+ inkscape:label="filter1"
+ color-interpolation-filters="sRGB" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5440"
+ id="linearGradient5446"
+ x1="40.438602"
+ y1="31.862434"
+ x2="9.5576677"
+ y2="26.854158"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.9103956,0,0,4.9103956,-156.98426,-138.95327)" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6292"
+ id="linearGradient6290"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(4.7197199,0,0,4.7197199,-143.09072,-126.16233)"
+ x1="40.438602"
+ y1="31.862434"
+ x2="9.5576677"
+ y2="26.854158" /><linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient6292"
+ id="linearGradient3004"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-4.7197199,0,0,4.7197199,202.88608,-50.037325)"
+ x1="40.438602"
+ y1="31.862434"
+ x2="9.5576677"
+ y2="26.854158" /></defs><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1060"
+ id="namedview3078"
+ showgrid="false"
+ inkscape:zoom="5.6568542"
+ inkscape:cx="100.26752"
+ inkscape:cy="73.341098"
+ inkscape:window-x="1917"
+ inkscape:window-y="-3"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1"
+ fit-margin-top="10"
+ fit-margin-left="10"
+ fit-margin-bottom="10"
+ fit-margin-right="10" /><g
+ id="g3011"><circle
+ cx="16.858999"
+ cy="16.249001"
+ r="0.82700002"
+ id="circle3074"
+ d="m 17.685999,16.249001 c 0,0.456739 -0.37026,0.827 -0.827,0.827 -0.456739,0 -0.827,-0.370261 -0.827,-0.827 0,-0.45674 0.370261,-0.827 0.827,-0.827 0.45674,0 0.827,0.37026 0.827,0.827 z"
+ sodipodi:cx="16.858999"
+ sodipodi:cy="16.249001"
+ sodipodi:rx="0.82700002"
+ sodipodi:ry="0.82700002"
+ transform="matrix(-4.7197199,0,0,4.7197199,208.89614,-46.148465)" /><path
+ d="M 56.461489,13.329625 C 75.340365,8.55327 90.438752,9.752078 110.4126,21.68825 c 0.45782,-4.361021 11.94089,-17.448805 25.94431,-8.25951 14.92375,-1.84541 14.92375,13.540876 14.92375,13.540876 0,0 8.15567,14.343229 8.26423,19.747309 0.0755,3.615304 -2.105,4.592287 -4.19111,5.215291 -10.78457,-6.140356 -20.57327,-4.681963 -28.52599,-3.492594 -4.14391,0.618283 -7.73562,1.142171 -10.42115,0.387019 -0.92978,-0.269042 -1.90676,0.283172 -2.17106,1.217687 -0.26432,0.929787 0.28316,1.906765 1.21296,2.175788 3.41708,0.958106 7.34861,0.377582 11.89842,-0.302061 7.11733,-1.061937 15.81105,-2.293784 25.14667,2.525052 -8.86364,15.442927 -33.42507,20.681817 -51.2656,8.349183 -3.893775,0.245419 -9.000503,0.825949 -14.508426,1.283765 -1.014734,0.08026 -0.01875,3.289641 0.967542,6.489622 0.344541,1.11385 13.512564,3.870166 13.772144,4.847146 0.4767,1.835967 -11.97393,0.339821 -12.861234,1.609429 -0.882593,1.274318 1.6047,7.117332 0.457814,9.878366 -0.76459,1.835977 -6.985189,-0.04719 -8.726761,-4.365735 -0.873153,-2.152192 2.79879,-6.418821 1.982278,-8.127366 -2.44953,-5.116168 -4.597003,-9.78398 -4.979308,-9.774542 -2.553364,0.08026 -5.097291,0.08496 -7.565706,-0.03306 -5.153932,-0.235987 -10.133238,-0.717387 -14.73496,-1.118568 -0.585246,-0.0519 -1.566955,2.00588 -2.605287,4.403498 -0.471972,1.094973 8.627645,2.756315 8.155673,3.83714 -0.958103,2.194666 -8.953308,0.717388 -11.936171,3.464265 -2.987584,2.756315 -3.08198,10.175722 -5.281365,11.025271 -1.212976,0.467248 -6.296109,-3.181099 -5.281374,-7.806418 1.481998,-6.749201 9.609354,-15.457085 9.184575,-15.475965 -5.640062,-0.259578 -10.326742,0.0095 -13.54559,1.675503 -11.940891,6.178116 -3.21885,52.143469 26.633377,54.441969 16.259431,1.25073 21.691832,-11.75682 19.671793,-19.01103 C 78.030599,92.866324 69.077293,88.967833 62.87558,89.892899 c -6.196992,0.9109 -7.343878,6.654808 -4.592282,10.553291 0.363418,0.51446 0.783468,0.99114 1.231844,1.43007 1.061937,-1.07609 2.539206,-1.75101 4.172232,-1.75101 3.237726,0 5.86189,2.62889 5.86189,5.86189 0,3.24245 -2.624164,5.8619 -5.86189,5.8619 -2.93094,0 -5.333286,-2.14748 -5.772223,-4.96515 -1.576375,-0.39174 -3.133891,-1.15633 -4.455403,-2.52977 -5.281374,-5.512632 -4.129758,-15.386287 5.87132,-18.775042 11.190465,-3.785217 26.87409,3.247164 27.336624,15.188052 0.457805,11.93617 -10.496657,25.93958 -29.361375,24.86349 C 29.294777,124.01649 9.146293,94.933587 10.274301,68.083094 11.246562,45.338765 23.395122,21.68825 56.461489,13.329625 z m 70.413501,25.812147 c 6.27722,0 11.36508,-5.087855 11.36508,-11.365084 0,-6.277227 -5.08786,-11.365085 -11.36508,-11.365085 -6.27252,0 -11.36037,5.087858 -11.36037,11.365085 0,6.277229 5.08313,11.365084 11.36037,11.365084 z"
+ id="path3076"
+ inkscape:connector-curvature="0"
+ style="fill:url(#linearGradient3004);fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-mid:none"
+ sodipodi:nodetypes="cccccccccccccccccccccccccccccccscccssscccccccsssss" /><path
+ inkscape:connector-curvature="0"
+ id="path3009"
+ d="m 124.55664,38.535352 c -0.63198,-0.14224 -1.78544,-0.574751 -2.56326,-0.961133 -5.52199,-2.743062 -7.67517,-9.334077 -4.85811,-14.870989 0.94183,-1.85117 2.90602,-3.813677 4.7673,-4.763233 2.03593,-1.038652 5.24575,-1.431054 7.42704,-0.90796 1.49263,0.357944 3.71159,1.518534 4.85957,2.541709 1.23734,1.102829 2.55958,3.06423 3.09552,4.591882 0.48821,1.391623 0.66713,4.2598 0.36415,5.837429 -0.49023,2.552607 -2.46007,5.446258 -4.73928,6.96188 -2.31095,1.536728 -5.68456,2.170993 -8.35293,1.570415 z m 6.05496,-4.231795 c 1.64197,-0.58596 2.63235,-1.975862 2.63235,-3.694225 0,-2.322833 -1.61862,-3.995243 -3.87582,-4.004628 -2.29167,-0.0095 -3.96296,1.638954 -3.96296,3.908872 0,2.25405 1.72762,4.026677 3.92444,4.026677 0.3403,0 0.91719,-0.106513 1.28199,-0.236696 z"
+ style="fill:#ffffff" /></g></svg>
diff --git a/www/wiki/skins/chameleon/docs/components.md b/www/wiki/skins/chameleon/docs/components.md
new file mode 100644
index 00000000..003b589d
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/components.md
@@ -0,0 +1,949 @@
+## Components & Modifications
+
+Components are the building blocks of any layout. They are the functional units
+of the website, like the logo or the navigation bar. There are also four special
+component types - structure, grid, row and cell - that define the general layout
+of the page and assign the other components their place on the page.
+Modifications can be added to most components to change their general behavior.
+
+The following components and modifications are available:
+<!-- START doctoc generated TOC please keep comment here to allow auto update -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+
+
+- [`Structure`](#structure)
+- [`Grid`](#grid)
+- [`Row`](#row)
+- [`Cell`](#cell)
+- [Component `Container`](#component-container)
+- [Component `FooterIcons`](#component-footericons)
+- [Component `FooterInfo`](#component-footerinfo)
+- [Component `FooterPlaces`](#component-footerplaces)
+- [Component `Html`](#component-html)
+- [Component `Logo`](#component-logo)
+- [Component `MainContent`](#component-maincontent)
+- [Component `Menu`](#component-menu)
+- [Component `NavbarHorizontal`](#component-navbarhorizontal)
+- [Component `NavMenu`](#component-navmenu)
+- [Component `NewtalkNotifier`](#component-newtalknotifier)
+- [Component `PageTools`](#component-pagetools)
+- [Component `PageToolsAdaptable`](#component-pagetoolsadaptable)
+- [Component `PersonalTools`](#component-personaltools)
+- [Component `SearchBar`](#component-searchbar)
+- [Component `Silent`](#component-silent)
+- [Component `SiteNotice`](#component-sitenotice)
+- [Component `ToolbarHorizontal`](#component-toolbarhorizontal)
+- [Modification `HideFor`](#modification-hidefor)
+- [Modification `ShowOnlyFor`](#modification-showonlyfor)
+- [Modification `Sticky`](#modification-sticky)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+
+### `Structure`
+
+The root element of any layout.
+
+#### Example usage
+
+``` xml
+<structure xmlns="https://github.com/cmln/chameleon/layout/1.0">
+ ...
+</structure>
+```
+
+#### Attributes:
+* `xmlns`:
+ * Allowed values: URI of XML namespace definition
+ * Optional.
+
+ Ignored by the skin itself, but may be specified to validate the layout. See
+ [Layouts](layouts.md).
+
+#### Allowed Parent Elements:
+None.
+
+#### Allowed Child Elements:
+* [Grid](#grid)
+* Any component
+
+-------------------------------------------------------------------------------
+### `Grid`
+
+The grid system is used for creating page layouts through a series of rows and
+cells. While it is possible to place components outside of a grid it is not
+recommended.
+
+#### Example usage
+
+``` xml
+<grid>
+ ...
+</grid>
+```
+
+#### Attributes:
+* `mode`:
+ * Allowed values: String (`fixedwidth`|`fluid`)
+ * Default: `fixedwidth`
+ * Optional.
+
+ Use `fixedwidth` for a responsive fixed width layout. Use `fluid` for a full
+ width layout, spanning the entire width of the viewport.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+
+#### Allowed Child Elements:
+* [Row](#row)
+* Any modification
+
+-------------------------------------------------------------------------------
+### `Row`
+
+Use rows to create horizontal groups of cells. Content should be placed within
+cells, and only cells may be immediate children of rows.
+
+#### Example usage
+
+``` xml
+<row>
+ ...
+</row>
+```
+
+#### Attributes:
+None.
+
+#### Allowed Parent Elements:
+* [Grid](#grid)
+
+#### Allowed Child Elements:
+* [Cell](#cell)
+* Any modification
+
+-------------------------------------------------------------------------------
+### `Cell`
+
+Holds components.
+
+For each cell specify the number of columns you wish to span.
+
+#### Example usage
+
+``` xml
+<cell span="12">
+ ...
+</cell>
+```
+
+#### Attributes:
+* `span`:
+ * Allowed values: Numbers (1 ... 12)
+ * Default: `12`
+
+ The number of columns this cell shall span. All cells of a row should together
+ span 12 columns. If more than 12 columns are placed within a single row, each
+ group of extra columns will, as one unit, wrap onto a new line.
+
+#### Allowed Parent Elements:
+* [Row](#row)
+
+#### Allowed Child Elements:
+* [Row](#row)
+* Any component
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `Container`
+
+This component will wrap its content elements in a `<div>`. It may be used to
+assign a CSS class for styling purposes.
+
+#### Example usage
+
+``` xml
+<component type="container" class="foo bar">
+ ...
+</component>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: Any string
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the `<div>` element.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any component
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `FooterIcons`
+
+A list containing the "powered by" icons.
+
+#### Example usage
+
+``` xml
+<component type="FooterIcons"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `FooterInfo`
+
+A list of footer items (last modified time, view count, number of watching
+users, credits, copyright). Does not include so called places (about, privacy
+policy, and disclaimer links).
+
+#### Example usage
+
+``` xml
+<component type="FooterInfo"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `FooterPlaces`
+
+A list containing links to places (about, privacy policy, and disclaimer links).
+
+#### Example usage
+
+``` xml
+<component type="FooterPlaces"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `Html`
+
+This component allows insertion of raw HTML into the page.
+
+#### Example usage
+
+
+``` xml
+<component type="Html"><![CDATA[
+ <b>Hello World!</b>
+]]></component>
+```
+
+#### Attributes:
+None.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `Logo`
+
+The Logo component displays the logo of the wiki as defined in `$wgLogo`.
+
+The alternative text of the image is set to the sitename of the wiki as defined
+in `$wgSitename`. Depending on the `addLink` attribute the logo may link to the
+main page of the wiki. The name of the main page of the wiki is defined in the
+`mainpage` message and can thus be modified on the `Mediawiki:Mainpage` page of
+the wiki.
+
+#### Example usage
+
+``` xml
+<component type="Logo" addLink="yes" />
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `addLink`:
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `yes`
+ * Optional.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `MainContent`
+
+The main content of the page, the wiki article itself.
+
+Includes:
+* Title: title of the page
+* Subtitle: used for various things like the subpage hierarchy
+* Tagline: usually something like "From WikiName", hidden by default, used for printing
+* Undelete message
+* [Page status indicators](https://www.mediawiki.org/wiki/Help:Page_status_indicators): icons that provide quick information about the status of the article
+* Article text
+* Data after content: Additional text block useable by extensions
+* Category links
+
+#### Example usage
+
+``` xml
+<component type="MainContent"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `Menu`
+
+An additional menu.
+
+The structure of the menu can be specified either in a [MediaWiki
+message](https://www.mediawiki.org/wiki/Help:System_message) or directly in the
+layout file. The format is the same as that of the [MediaWiki
+sidebar](https://www.mediawiki.org/wiki/Manual:Interface/Sidebar).
+
+This component is intended to be used inside a
+[NavbarHorizontal](#component-navbarhorizontal) component. It will work in other
+places, but will require additional styling effort.
+
+#### Example usage
+
+Using the message _MediaWiki:Secondary-menu_:
+``` xml
+<component type="Menu" message="secondary-menu" />
+```
+
+Using an inline description:
+``` xml
+<component type="Menu" >
+ * Foo
+ ** FooBar
+ * Test | Bar
+</component>
+```
+
+#### Attributes:
+* `message`
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The name of the MediaWiki message that holds the menu description.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `NavbarHorizontal`
+
+A horizontal navbar that takes its contents from its child elements.
+
+#### Example usage
+
+From [navhead.xml](../layouts/navhead.xml):
+``` xml
+<component type="NavbarHorizontal">
+ <component type="Logo" position="head"/>
+ <component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no"/>
+ <component type="PageTools" position="right" hideSelectedNameSpace="yes"/>
+ <component type="SearchBar" position="right"/>
+ <component type="PersonalTools" position="right"/>
+</component>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `fixed`:
+ * **Deprecated.** Use the [Sticky](#modification-sticky) modification instead.
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Component [`Logo`](#component-logo)
+* Component [`Menu`](#component-menu)
+* Component [`NavMenu`](#component-navmenu)
+* Component [`PageTools`](#component-pagetools)
+* Component [`PersonalTools`](#component-personaltools)
+* Component [`PageToolsAdaptable`](#component-pagetoolsadaptable)
+* Component [`SearchBar`](#component-searchbar)
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `NavMenu`
+
+A menu containing the
+[sidebar](https://www.mediawiki.org/wiki/Manual:Interface/Sidebar) items.
+
+Does not include the search bar. Toolbox and language links can be included
+optionally.
+
+This component is intended to be used inside a
+[NavbarHorizontal](#component-navbarhorizontal) component. It will work in other
+places, but will require additional styling effort.
+
+#### Example usage
+
+Using the message _MediaWiki:Secondary-menu_:
+``` xml
+<component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no" />
+```
+
+#### Attributes:
+* `flatten`
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ A semicolon separated list of section names that are to be flattened, i.e.
+ whose menu items should appear not in a submenu, but as elements of the top
+ structure.
+
+ This list may also be given in the message
+ _MediaWiki:skin-chameleon-navmenu-flatten_ instead. If both the message and
+ the attribute are used, the message takes precedence.
+
+* `showTools`
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ If set to `yes` the toolbox will be included in the NavMenu. It is usually not
+ included here, but shown in a dedicated
+ [ToolbarHorizontal](#component-toolbarhorizontal) instead.
+
+ The MediaWiki toolbox contains various links. Some are general links like a
+ link to a list of Special Pages so a user always has a way to access them.
+ Others are page-sensitive links like permalinks, printable links, block links,
+ feed links, and a link to a list of pages linking to the current page.
+
+* `showLanguages`
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ A MediaWiki page may have links to the same page in other languages on the
+ wiki when inter-language links are added to the page. If the attribute is set
+ to `yes` the language links will be included in the NavMenu. They are usually
+ not included here, but shown in a dedicated
+ [ToolbarHorizontal](#component-toolbarhorizontal) instead.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `NewtalkNotifier`
+
+A message to a user about new messages on their talkpage. Usually goes something
+like "You have [a new message]() ([last change]())."
+
+#### Example usage
+
+``` xml
+<component type="NewtalkNotifier"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `PageTools`
+
+A component containing content navigation links (Page, Discussion, Edit,
+History, Move, ...)
+
+#### Example usage
+
+``` xml
+<component type="PageTools"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `hideSelectedNameSpace`
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ If set the link to the current page will not be shown among the page tools.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `PageToolsAdaptable`
+
+- [Component `PageToolsAdaptable`](#component-pagetoolsadaptable)
+
+
+Renders the same component as [Component `PageTools`](#component-pagetools), except
+you can define in your structure file which actions are shown directly in the navbar
+before the ... pop-down.
+
+#### Example usage
+
+``` xml
+<component type="PageToolsAdaptable" show="edit,ve-edit,history"/>
+```
+
+#### Attributes:
+Same as [Component `PageTools`](#component-pagetools). Additionally:
+* `show`
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The actions that will be shown in the navbar directly and also removed from the PageTools drop-down.
+ Among other, possible actions are:
+
+ * delete
+ * edit
+ * formedit
+ * history
+ * move
+ * protect
+ * purge
+ * undelete
+ * unprotect
+ * unwatch
+ * ve-edit
+ * view
+ * watch
+
+ Note that button for actions, that are not valid for a given page will be omitted automatically.
+ So in the above example, the visual-editor edit action button will only be shown for pages in a valid
+ visual-editor namespace.
+ Note also, that the valid buttons will be shown in the order you provided in the show attribute of
+ your structure.xml. In the example above, history would be last action right before the ellipsis.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+#### Integration with VisualEditor
+Visual Editor has a late-executed javascript function, that replaces the content of certain page tool
+action links. Unfortunately, that also concerns corresponding buttons, you indicated to show.
+
+The solution is to remove the corresponding tab messages from the Visual Editor configuration in your
+LocalSettings.php. So for example:
+```$php
+ wfLoadExtension( 'VisualEditor' );
+ $wgVisualEditorTabMessages['editsource'] = null;
+ $wgVisualEditorTabMessages['createsource'] = null;
+```
+
+-------------------------------------------------------------------------------
+### Component `PersonalTools`
+
+A component containing the personal tools like link to user page and user's talk
+page, preferences, watchlist, etc. Also shows the new talk notifier, when
+applicable.
+
+#### Example usage
+
+``` xml
+<component type="PersonalTools"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `hideNewtalkNotifier`
+ * **Deprecated.**
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ If set the newtalk notifier will not be shown.
+
+ This attribute has no effect when used inside the
+ [NavbarHorizontal](#component-navbar-horizontal) component.
+
+ This attribute was introduced to keep backwards compatibility. If the
+ PersonalTools component is used, it is recommended to always set this
+ attribute to *yes* and use an independent
+ [NewtalkNotifier](#component-newtalknotifier) component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `SearchBar`
+
+The search bar.
+
+#### Example usage
+
+``` xml
+<component type="SearchBar"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `buttons`:
+ * Allowed values: String (`search`|`go`|`search go`)
+ * Default: `search go`
+ * Optional.
+
+ The buttons that should be shown with the search bar.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+* [NavbarHorizontal](#component-navbarhorizontal)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `Silent`
+
+This component does not output anything. It may be used as a placeholder during development.
+
+#### Example usage
+
+``` xml
+<component type="Silent"/>
+```
+
+#### Attributes:
+None.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `SiteNotice`
+
+The wiki's [site notice](https://www.mediawiki.org/wiki/Manual:Interface/Sitenotice).
+
+#### Example usage
+
+``` xml
+<component type="SiteNotice"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Component `ToolbarHorizontal`
+
+A horizontal toolbar containing standard sidebar items (toolbox, language links).
+
+The MediaWiki toolbox contains various links. Some are general links like a link
+to a list of Special Pages so a user always has a way to access them. Others are
+page-sensitive links like permalinks, printable links, block links, feed links,
+and a link to a list of pages linking to the current page.
+
+[Language links](https://www.mediawiki.org/wiki/Interlanguage_links) are links
+to the same page in other languages on the wiki that are available when
+inter-language links are added to the page.
+
+#### Example usage
+
+``` xml
+<component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"/>
+```
+
+#### Attributes:
+* `class`:
+ * Allowed values: String
+ * Default: -
+ * Optional.
+
+ The class (or classes) that should be assigned to the top-level html element
+ of this component.
+
+* `hideTools`
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ If set to `yes` the toolbox links will be hidden.
+
+* `hideLanguages`
+ * Allowed values: Boolean (`yes`|`no`)
+ * Default: `no`
+ * Optional.
+
+ If the attribute is set to `yes` the language links will be hidden.
+
+#### Allowed Parent Elements:
+* [Structure](#structure)
+* [Cell](#cell)
+
+#### Allowed Child Elements:
+* Any modification
+
+-------------------------------------------------------------------------------
+### Modification `HideFor`
+
+A modification that allows to hide the parent component if the condition
+specified by the attributes is fulfilled.
+
+This is a restrictive filter. It will hide the component if _all_ of the
+attributes match. However, the attributes containing lists of values will match,
+if one of the values matches.
+
+#### Example usage
+
+``` xml
+<modification type="HideFor" permission="edit" namespace="NS_MAIN, NS_TALK" />
+```
+
+This will hide the parent component of the modification if the user has the
+_edit_ right and the current page is in the 'Main' or 'Talk' namespace.
+
+#### Attributes
+
+* group
+ * Allowed values: String value
+ * Example: `group="emailconfirmed, autoconfirmed"`
+
+ A comma-separated list of [user
+ groups](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_groups) for
+ which the component should be hidden.
+
+ It is generally not advised to use the _group_ attribute, as it
+ bypasses the permission system. Use _permission_ instead.
+
+* permission
+ * Allowed values: String value
+ * Example: `permission="createpage, createtalk"`
+
+ A comma-separated list of [user
+ permissions](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_permissions)
+ for which the component should be hidden.
+
+* namespace
+ * Allowed values: String value
+ * Example: `group="NS_MAIN, NS_TALK"`
+
+ A comma-separated list of
+ [namespaces](https://www.mediawiki.org/wiki/Manual:Namespace_constants) for
+ which the component should be hidden. The namespaces may be specified as
+ namespace constants or as namespace index numbers.
+
+-------------------------------------------------------------------------------
+### Modification `ShowOnlyFor`
+
+A modification that allows to show the parent component only if the condition
+specified by the attributes is fulfilled.
+
+This is a permissive filter. It will show the component if _any_ of the
+attributes match.
+
+#### Example usage
+
+``` xml
+<modification type="ShowOnlyFor" permission="edit" namespace="NS_TALK" />
+```
+
+This will show the parent component of the modification if the user has the
+_edit_ right or if the current page is in the 'Talk' namespace (or both).
+
+#### Attributes
+
+* group
+ * Allowed values: Any string
+ * Example: `group="emailconfirmed, autoconfirmed"`
+
+ A comma-separated list of [user
+ groups](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_groups) for
+ which the component should be shown.
+
+ It is generally not advised to use the _group_ attribute, as it bypasses the
+ permission system. Use _permission_ instead.
+
+* permission
+ * Allowed values: Any string
+ * Example: `permission="createpage, createtalk"`
+
+ A comma-separated list of [user
+ permissions](https://www.mediawiki.org/wiki/Manual:User_rights#List_of_permissions)
+ for which the component should be shown.
+
+* namespace
+ * Allowed values: Any string
+ * Example: `group="NS_MAIN, NS_TALK"`
+
+ A comma-separated list of
+ [namespaces](https://www.mediawiki.org/wiki/Manual:Namespace_constants) for
+ which the component should be shown. The namespaces may be specified as
+ namespace constants or as namespace index numbers.
+
+-------------------------------------------------------------------------------
+### Modification `Sticky`
+
+A modification that will ensure that the parent component stays always visible
+when the user scrolls.
+
+#### Example usage
+
+``` xml
+<modification type="Sticky" />
+```
+
+This will make the parent component of the modification stick to the page.
+
+#### Attributes
+None.
diff --git a/www/wiki/skins/chameleon/docs/contact.md b/www/wiki/skins/chameleon/docs/contact.md
new file mode 100644
index 00000000..464fec94
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/contact.md
@@ -0,0 +1,19 @@
+## Contact
+
+For bug reports and feature requests please see, if it is already reported on
+the list of [open bugs][open bugs]. If not, [report it][report bugs]. Also see the
+[Contribute](contribute.md) section for instructions on bug reporting.
+
+For general questions, comments or suggestions you might use the [Chameleon skin
+talk page on MediaWiki.org][chameleon-talk]. For direct contact with the author
+please use the [Email functionality on MediaWiki.org.][mw-mail]
+
+Finally there are the MediaWiki IRC channel (Server: [freenode.net][irc],
+Channel: #mediawiki) and the [MediaWiki mailing list][mw-ml].
+
+[open bugs]: https://github.com/cmln/chameleon/issues
+[report bugs]: https://github.com/cmln/chameleon/issues/new
+[chameleon-talk]: https://www.mediawiki.org/wiki/Skin_talk:Chameleon
+[mw-mail]: https://www.mediawiki.org/wiki/Special:EmailUser/F.trott
+[irc]: http://webchat.freenode.net/
+[mw-ml]: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
diff --git a/www/wiki/skins/chameleon/docs/contribute.md b/www/wiki/skins/chameleon/docs/contribute.md
new file mode 100644
index 00000000..449d706c
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/contribute.md
@@ -0,0 +1,67 @@
+## How to contribute
+
+There are different ways to make a contribution to Chameleon. A few guidelines
+are provided here to keep the workflow and review process most efficient.
+
+### Report bugs, ask for features
+
+You may help by reporting bugs and feature requests. First check if an open bug
+already exists on the list of [open bugs][open bugs] and if you have new
+information, comment on it. If the bug is not yet reported,
+[open a new bug report][report bugs].
+
+When you report a bug, please include:
+* Exact steps to reproduce the bug
+* Expected result
+* Observed result
+* Versions of PHP, MediaWiki, Chameleon, Browsers, other relevant software (web server, MediaWiki extensions)
+* Other information that may be relevant, e.g. the used layout file, custom Less files, configuration settings, etc.
+* If available a web link, where this bug can be seen
+
+If in doubt, don't worry. You will be asked for what is missing.
+
+MediaWiki has some more advice on [how to report a bug][how to report a bug].
+
+### Improve the documentation
+
+* You would really help by creating, updating or amending the documentation of
+ the skin in the `/docs` folder. Although the documentation is the main source
+ of information for anybody who would want to use the skin it never gets the
+ attention it deserves.
+* You may provide a [screenshot][screenshots] of the Chameleon skin used on
+ your wiki. If you customized the skin, add some descriptions what you did. And
+ if you want, link back to your wiki.
+* Finally, you may help by providing translations via [translatewiki.net][twn].
+ See their [progress statistics][twn-stats] to find out if there is still work
+ to do for your language.
+
+### Provide patches
+
+The Chameleon skin is hosted on GitHub. To provide patches you need to get an
+account.
+
+A few points to ease the process:
+* Please ensure that patches are based on the current master.
+* Code should be easily readable and if necessary be put into separate
+ components (or classes). Also, please follow the [MediaWiki coding
+ conventions][coding].
+* Newly added features should not alter existing tests but instead provide
+ additional test coverage to verify the expected new behaviour. For a
+ description on how to write and run PHPUnit test, please consult the
+ [manual][mw-testing].
+* Finally, legal matters have to be taken care of. Please have a look at
+ the [legal stuff][legal.md].
+
+
+[chameleon]: https://www.mediawiki.org/wiki/Skin:Chameleon
+[open bugs]: https://github.com/cmln/chameleon/issues
+[report bugs]: https://github.com/cmln/chameleon/issues/new
+[how to report a bug]: https://www.mediawiki.org/wiki/How_to_report_a_bug
+[screenshots]: https://www.mediawiki.org/wiki/Skin:Chameleon#Screenshots
+[twn]: https://translatewiki.net/
+[twn-stats]: https://translatewiki.net/w/i.php?title=Special%3AMessageGroupStats&x=D&group=mediawiki-skin-chameleon&suppressempty=1
+[patch uploader]: https://tools.wmflabs.org/gerrit-patch-uploader/
+[gerrit-tutorial]: https://www.mediawiki.org/wiki/Gerrit/Tutorial
+[coding]: https://www.mediawiki.org/wiki/Manual:Coding_conventions
+[mw-testing]: https://www.mediawiki.org/wiki/Manual:PHP_unit_testing
+[legal.md]: legal.md
diff --git a/www/wiki/skins/chameleon/docs/copying.md b/www/wiki/skins/chameleon/docs/copying.md
new file mode 100644
index 00000000..e42f2066
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/copying.md
@@ -0,0 +1,476 @@
+The files within the _docs_ directory and its subdirectories in their entirety -
+with the exception of the file [Chameleon.svg](Chameleon.svg) containing the
+"Chameleon Skin Logo" - make up the Chameleon Skin documentation, subsequently
+referred to as the _Document_.
+
+Permission is granted to copy, distribute and/or modify this Document under the
+terms of the GNU Free Documentation License, Version 1.3 or any later version
+published by the Free Software Foundation; with no Invariant Sections, no
+Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in
+the section entitled "GNU Free Documentation License".
+
+
+## GNU Free Documentation License
+__Version 1.3, 3 November 2008__
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+### 0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+### 1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+### 2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+### 3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+### 4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+D. Preserve all the copyright notices of the Document.
+
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+
+H. Include an unaltered copy of this License.
+
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+### 5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+### 6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+### 7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+### 8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+### 9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+### 10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+### 11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+### ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/www/wiki/skins/chameleon/docs/credits.md b/www/wiki/skins/chameleon/docs/credits.md
new file mode 100644
index 00000000..f8e7cf57
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/credits.md
@@ -0,0 +1,55 @@
+## Credits
+
+### Author & Contributors
+
+The author of the Chameleon skin is Stephan Gambke.
+
+However, significant portions of code were contributed by James Hong Kong.
+
+Translations have been provided by the members of the [Translatewiki.net
+project](https://translatewiki.net).
+
+The "Chameleon Skin Logo" was derived from the ["Chameleon free
+icon"](http://www.flaticon.com/free-icon/chameleon_36320) made by
+[Freepik](http://www.freepik.com) from
+[www.flaticon.com](http://www.flaticon.com), which is licensed under [CC BY
+3.0](http://creativecommons.org/licenses/by/3.0/). The ["Chameleon Skin
+Logo"](Chameleon.svg) itself
+was created by [Stephan Gambke](https://www.mediawiki.org/wiki/User:F.trott) and
+is licensed under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/) as
+well.
+
+### Included libraries
+
+The following libraries are included:
+* [Sticky-kit](http://leafo.net/sticky-kit/), which provides an easy way to
+ attach elements to the page when the user scrolls such that the element is
+ always visible. Author: Leaf Corcoran
+
+
+### Dependencies
+
+The Chameleon skin uses several other libraries. These, while not included
+directly in, nor delivered with the code, are pulled in automatically by the
+Composer tool during installation. These are:
+* MediaWiki Bootstrap extension, which provides the Twitter Bootstrap
+ framework (version 3) to other MediaWiki extensions and skins. Author: Stephan
+ Gambke. See https://www.mediawiki.org/wiki/Extension:Bootstrap
+* Twitter Bootstrap, the most popular HTML, CSS, and JS framework for
+ developing responsive, mobile first projects on the web. Maintained by the
+ [TWBS core team](https://github.com/orgs/twbs/people). See
+ http://getbootstrap.com/
+* Glyphicons Halflings, a library of precisely prepared monochromatic icons
+ and symbols contained in and delivered with the Twitter Bootstrap framework.
+ Author: Jan Kovařík. See http://glyphicons.com/.
+* Less.php, a PHP port of the official LESS processor. Author: Josh Schmidt.
+ See https://github.com/oyejorge/less.php
+* loads of other software that I either forgot, am not aware of or that should
+ be obvious (e.g. PHP, MediaWiki, etc.)
+
+### Thanks!
+
+To all the above people and projects my sincere thanks. This skin would not be
+possible without them.
+
+If I forgot somebody, sorry. Please drop me a note, so I can add them here.
diff --git a/www/wiki/skins/chameleon/docs/customization.md b/www/wiki/skins/chameleon/docs/customization.md
new file mode 100644
index 00000000..b38f88cf
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/customization.md
@@ -0,0 +1,135 @@
+# Customization
+
+The Chameleon skin can be highly customized. There are two main areas that you can change:
+
+1. Layout (defined by a XML file)
+2. Styles (defined by LESS files and/or LESS variables)
+
+## 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 five pre-defined layouts available:
+* [standard](../layouts/standard.xml)
+* [navhead](../layouts/navhead.xml)
+* [fixedhead](../layouts/fixedhead.xml)
+* [stickyhead](../layouts/stickyhead.xml)
+* [clean](../layouts/clean.xml)
+
+They can be activated by setting the
+variable `$egChameleonLayoutFile` in LocalSettings.php. E.g. to activate the
+fixedhead layout you could add
+```php
+$egChameleonLayoutFile= __DIR__ . '/skins/chameleon/layouts/fixedhead.xml';
+```
+
+### Selecting the layout from the browser address bar
+
+To select a specific layout different from the one defined in
+`$egChameleonLayoutFile` you can add the `uselayout` parameter to the URL.
+However for some wikis it might not be desirable to have this feature. So to
+make this work you have to define the available layouts in
+LocalSettings.php. E.g. to include all layouts delivered with Chameleon add
+```php
+$egChameleonAvailableLayoutFiles = array(
+ 'standard' => __DIR__ . '/skins/chameleon/layouts/standard.xml',
+ 'navhead' => __DIR__ . '/skins/chameleon/layouts/navhead.xml',
+ 'fixedhead' => __DIR__ . '/skins/chameleon/layouts/fixedhead.xml',
+ 'stickyhead' => __DIR__ . '/skins/chameleon/layouts/stickyhead.xml',
+ 'clean' => __DIR__ . '/skins/chameleon/layouts/clean.xml',
+);
+```
+
+### Creating a custom layout
+
+You can of course also define and use your own layout. To start have a look at the
+[documentation of the components](components.md) and at the exisiting
+[layout description files](../layouts).
+
+## Changing styles: Fonts, Colors, Padding etc.
+
+You can customize the styles of the skin by
+* importing additional LESS files (for example existing Bootstrap themes)
+* and/or by changing existing [LESS variables](variables.md).
+
+Regardless of the order of the calls, variables will always override imported files.
+
+### Importing additional LESS files
+
+To import additional LESS files, add them to the array
+`$egChameleonExternalStyleModules` in `LocalSettings.php`:
+```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:
+```php
+$egChameleonExternalStyleModules = array( $localPathToLESSFile1, $localPathToLESSFile2, ... );
+```
+
+**Example:**
+
+To use the Cyborg theme from [Bootswatch](http://bootswatch.com/3/) you could
+download the `variables.less` and the `bootswatch.less` file to your MediaWiki
+installation directory, rename them to `cyborg-variables.less` and
+`cyborg-bootswatch.less` and then add the following code to your
+`LocalSettings.php`:
+
+```php
+$egChameleonExternalStyleModules = array(
+ __DIR__ . '/cyborg-variables.less' => $wgScriptPath,
+ __DIR__ . '/cyborg-bootswatch.less' => $wgScriptPath,
+);
+```
+
+You can of course define your own LESS file too: Just place it in your MediaWiki installation
+directory and import it like shown above.
+
+Remark: When downloading a theme from [Bootswatch](http://bootswatch.com/3/), make sure to
+choose one that is compatible with Bootstrap 3. Themes for Bootstrap 2 or Bootstrap 4 will not work.
+
+### Changing existing LESS variables
+
+Chameleon comes with many LESS variables (see [this list](variables.md)). All of them have a default value. To change those values you should not edit the LESS files that come with Chameleon, because if you update Chameleon your changes will be overridden. Instead change the values of the LESS variables in your `LocalSettings.php` by adding them to the array
+`$egChameleonExternalLessVariables`:
+
+```php
+$egChameleonExternalLessVariables = array(
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ ...
+);
+```
+
+If you add variables to the array (to change them), make sure you omit the `@` before the variable name.
+
+Apart from the LESS variables defined in Chameleon itself, you can also change LESS variables of LESS files that you [imported yourself](#importing-additional-less-files).
+
+**Example:**
+
+To make the navigation bar a bit narrower you could add
+```php
+$egChameleonExternalLessVariables = array(
+ 'navbar-height' => '30px',
+);
+```
+
+### Triggering a cache update
+
+Compiling the style files is time-consuming. For this reason the styles are
+not compiled on every page request. Instead they are cached after being
+compiled. For changes to the styles to become effective it is necessary to
+trigger an update of the style cache. There are two ways to do that:
+
+1. A cache update is triggered when the `LocalSettings.php` file has a modification time later than the last cache update time. So you have to resave the `LocalSettings.php` to trigger a cache update. This can be achieved by using the `touch` utility on UNIX and friends or by using `copy /b LocalSettings.php +,,` from the MediaWiki installation directory on Windows. Alternatively, just open the file and re-save it.
+
+2. If the above becomes to cumbersome, you could add the following to your `LocalSettings.php`:
+`\Bootstrap\BootstrapManager::getInstance()->addCacheTriggerFile( __DIR__ . '/your-less-file.less' );`.
+
+
+
+
diff --git a/www/wiki/skins/chameleon/docs/index.md b/www/wiki/skins/chameleon/docs/index.md
new file mode 100644
index 00000000..aa7f7bd1
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/index.md
@@ -0,0 +1,30 @@
+# The Chameleon Documentation
+
+<img src='https://upload.wikimedia.org/wikipedia/mediawiki/thumb/3/31/Chameleon.svg/220px-Chameleon.svg.png' align='left' title='Chameleon Skin Logo'>
+Chameleon is a highly customizable [MediaWiki][mw] skin that uses [Twitter
+Bootstrap 3][twbs].
+
+It currently provides four 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.
+
+This is the documentation for the Chameleon skin. It is maintained in the
+sourcecode repository, which allows to 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.
+
+## Contents
+1. [Installation, Update, De-Installation](installation.md)
+2. [Customization](customization.md)
+ 1. [Less Variables](variables.md)
+3. [Release Notes](release-notes.md)
+4. [Testing](testing.md)
+5. [How to contribute](contribute.md)
+ 1. [Legal stuff](legal.md)
+6. [Credits](credits.md)
+7. [Licenses](copying.md)
+8. [Contact](contact.md)
+
+[mw]: https://www.mediawiki.org/
+[twbs]: http://getbootstrap.com/
diff --git a/www/wiki/skins/chameleon/docs/installation-linux.md b/www/wiki/skins/chameleon/docs/installation-linux.md
new file mode 100644
index 00000000..482f559c
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/installation-linux.md
@@ -0,0 +1,38 @@
+## Installation on Linux - Step by Step
+
+Here is a step by step procedure for Linux, that should work for other unixy
+operating systems as well:
+
+1. Open a command line window (e.g. using Konsole or XTerm).
+2. If necessary [install Composer][]:
+ ``` sh
+ curl -sS https://getcomposer.org/installer | php
+ sudo mv composer.phar /usr/local/bin/composer
+ ```
+3. Navigate to the root folder of your MediaWiki installation. That's the one
+ with the `LocalSettings.php` file in it.
+4. Open the `composer.local.json` file in an editor and add the Chameleon skin
+ to the `require` section:
+ `require` section:
+ ```
+ "require": {
+ "mediawiki/chameleon-skin": "~1.0"
+ }
+ ```
+ * Remark 1: If you do not have a `composer.local.json` file (MediaWiki <1.25),
+ use `composer.json` instead.
+
+ * Remark 2: If you do not have a `composer.json` file (MediaWiki <1.23.5),
+ copy `composer.json.example` to `composer.json` first.
+5. To actually install Chameleon run the command
+ `composer update "mediawiki/chameleon-skin"`
+6. If there were no errors, close the command line window.
+7. Open `LocalSettings.php` in an editor (e.g. Kate). Include
+ `$wgDefaultSkin='chameleon';` as the last line. Save the file and close the
+ editor.
+8. Open your wiki in a browser. Chameleon should be installed.
+9. If not, force reload the page to [refresh your browser cache][cache-refresh].
+ (On Firefox or Chrome press Ctrl+F5)
+
+[Install Composer]: https://getcomposer.org/doc/00-intro.md#installation-nix
+[cache-refresh]: http://www.refreshyourcache.com/en/home/
diff --git a/www/wiki/skins/chameleon/docs/installation-troubleshooting.md b/www/wiki/skins/chameleon/docs/installation-troubleshooting.md
new file mode 100644
index 00000000..0bc0c585
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/installation-troubleshooting.md
@@ -0,0 +1,6 @@
+## Installation Troubleshooting
+
+* To actually activate Chameleon as the default skin of your wiki, include
+ `$wgDefaultSkin='chameleon'` in your `LocalSettings.php`
+* It is not necessary to install any dependencies. Composer will take care of
+ that.
diff --git a/www/wiki/skins/chameleon/docs/installation-windows.md b/www/wiki/skins/chameleon/docs/installation-windows.md
new file mode 100644
index 00000000..cd42d4fc
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/installation-windows.md
@@ -0,0 +1,31 @@
+## Installation on Windows - Step by Step
+
+Here is a step by step procedure for Windows:
+
+1. You first need to install Composer. On Windows just [download the
+ installer][composer-installer] and run it.
+2. Open a Windows Explorer window and navigate to the root folder of
+ your MediaWiki installation. That's the one with the
+ `LocalSettings.php` file in it.
+3. For MediaWiki 1.22 and 1.23 you need to copy the file
+ `composer.json.example` to `composer.json`. For this, select
+ `composer.json.example`, press Ctrl+C, then Ctrl+V and then rename
+ the copy to `composer.json`.
+4. Right-click on the new file and select *Use composer here*. A
+ command line window will open.
+5. On the command line run the command
+ `composer require "mediawiki/chameleon-skin:~1.0"`
+6. If there were no errors, close the command line window.
+7. Open `LocalSettings.php` in an editor capable to do UNIX style line
+ endings (e.g. [Notepad++][] or [Kate][], but *not* the standard Notepad!)
+ Include `$wgDefaultSkin='chameleon';` as
+ the last line. Save the file and close the editor.
+8. Open your wiki in a browser. Chameleon should be installed.
+9. If not, force reload the page to
+ [refresh your browser cache][cache-refresh]. (Press Ctrl+F5 on Firefox,
+ Ctrl+Shift+F5 on Internet Explorer.)
+
+[composer-installer]: https://getcomposer.org/Composer-Setup.exe
+[Notepad++]: http://notepad-plus-plus.org/
+[Kate]:http://kate-editor.org/
+[cache-refresh]: http://www.refreshyourcache.com/en/home/
diff --git a/www/wiki/skins/chameleon/docs/installation.md b/www/wiki/skins/chameleon/docs/installation.md
new file mode 100644
index 00000000..03f5e86d
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/installation.md
@@ -0,0 +1,59 @@
+## Installation, Update, De-Installation
+
+### Requirements
+
+- PHP 5.3.2 or later (*)
+- MediaWiki 1.22 or later
+- [Composer][composer]
+
+Further required software packages will be installed automatically. It is *not*
+necessary to install any dependencies anymore. Composer will take care of that.
+
+(*) To use the *[Html](components.md#component-html)* component in [custom
+layouts](customization.md#creating-a-custom-layout) you need at least PHP 5.3.6.
+
+### Installation
+
+If unsure try the detailed installation instructions for
+[Windows](installation-windows.md) or [Linux](installation-linux.md).
+
+Here is the short version:
+
+1. On a command line go to your MediaWiki installation directory
+4. Open the `composer.local.json` file in an editor and add the Chameleon skin
+ to the `require` section:
+ ```
+ "require": {
+ "mediawiki/chameleon-skin": "~1.0"
+ }
+ ```
+ * Remark 1: If you do not have a `composer.local.json` file (MediaWiki <1.25),
+ use `composer.json` instead.
+
+ * Remark 2: If you do not have a `composer.json` file (MediaWiki <1.23.5),
+ copy `composer.json.example` to `composer.json` first.
+3. With Composer installed, run
+ `composer update "mediawiki/chameleon-skin"`
+4. To set Chameleon as the default skin, open `LocalSettings.php` in an editor,
+ find `$wgDefaultSkin` and amend it: `$wgDefaultSkin='chameleon';`
+5. __Done:__ Navigate to _Special:Version_ on your wiki to verify that the skin
+ is successfully installed.
+
+If you run into problems, try the
+[troubleshooting](installation-troubleshooting.md).
+
+### Update
+
+From your MediaWiki installation directory run `composer update
+"mediawiki/chameleon-skin"`
+
+### De-installation
+
+Before de-installation make sure you secure (move, backup) any custom files you
+might want to retain.
+
+Remove the Chameleon skin from the `composer.local.json` file. Then run
+`composer update "mediawiki/chameleon-skin"` from the MediaWiki installation
+directory.
+
+[composer]: https://getcomposer.org/
diff --git a/www/wiki/skins/chameleon/docs/layouts.md b/www/wiki/skins/chameleon/docs/layouts.md
new file mode 100644
index 00000000..677769f4
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/layouts.md
@@ -0,0 +1,20 @@
+## Layouts
+
+There are currently five pre-defined layouts available for the Chameleon skin.
+
+### `standard`
+
+The `standard` layout features a head area with a [logo](../components/Logo.md),
+[personal tools](../components/PersonalTools.md) and a [search
+bar](../components/Searchbar.md). This area is separated from the [main
+content](../components/MainContent.md) area by a horizontal menu bar holding the
+main navigation items.
+
+### `navhead`
+
+### `fixedhead`
+
+### `stickyhead`
+
+### `clean`
+
diff --git a/www/wiki/skins/chameleon/docs/legal.md b/www/wiki/skins/chameleon/docs/legal.md
new file mode 100644
index 00000000..2020c957
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/legal.md
@@ -0,0 +1,127 @@
+## Legal stuff
+
+The Chameleon skin is currently licensed under the GNU General Public License,
+version 3 (or any later version). Its documentation is currently licensed under
+GNU Free Documentation License, version 1.3 (or any later version). Any
+contributions must be made under these same licenses.
+
+However, it may in the future become necessary or desirable to change these
+licenses, e.g. to keep this skin legally compatible with a changed license of
+the MediaWiki software or to better position it in a changed legal context.
+
+For this reason every contributor needs to provide the following statement:
+```
+I understand and agree that the maintainer of the Chameleon skin shall have the
+irrevocable and perpetual right to make and distribute copies of any
+contribution, as well as to create and distribute collective works of any
+contribution, under the current license or under any other open source license
+chosen by the maintainer.
+```
+
+The current maintainer of the Chameleon skin is Stephan Gambke. He may appoint
+another maintainer in the future.
+
+Contributions are identified by the Git commit that introduces them.
+
+A contributor submitting a contribution as a patch to the [Wikimedia Git
+Server][wmf-git-server] using the `git review` command is unambiguously
+identified by the use of their ssh key. For this reason it is only necessary to
+provide the above statement once in the commit message of one contribution. This
+statement will then be deemed valid for all other contributions by that
+contributor.
+
+A contributor submitting a contribution using the [Gerrit Patch
+Uploader][patch-uploader] can not be unambiguously identified and thus needs to
+provide the above statement with each contribution. What's more, since it can
+not be ensured, that successive patch sets for the same patch uploaded using the
+[Gerrit Patch Uploader][patch-uploader] are indeed from the same person, this
+statement needs to be in the commit message of each and every patch set
+*starting from the very first*.
+
+### WTF!?
+
+I discussed the above text with various people. In the course of this discussion
+several questions (and answers) came up that are worth being recorded here.
+
+#### Why would you want to change the license?
+
+I do not have any specific reason in mind right now, but the above paragraph
+gives two examples for possible situations where changing the license could be
+useful: Compatibility with other software and license modernization.
+
+Some cases I can think of:
+* Right now the preferred installation method is to use Composer to install
+ Chameleon and all its dependencies. This way I can always claim, that the skin
+ is not distributed with the packages it depends on, and thus does not need to
+ take care of their licenses. However, should I want to provide a tarball with
+ the skin and all its dependencies I would have to more carefully check license
+ compatibility.
+* Chameleon itself might become part of a tarball, e.g. some pre-build,
+ pre-configured wiki for I don't know what purpose. Right now MW is GPL2
+ licensed which makes it incompatible for bundling with Chameleon at GPL3+.
+* Parts of the skin might actually be included in MW core. E.g. there is a
+ menu-building class proposed for MediaWiki, that would have a functionality
+ similar to what's contained in Chameleon. See
+ https://gerrit.wikimedia.org/r/#/c/108045/ (Ok, this is rather far-fetched,
+ but not completely impossible.)
+* If I get it right, it might be possible to use this skin (or a derivative)
+ for other frameworks. Didn't look into that, but it's conceivable.
+* I might want to include some code from elsewhere that requires a license
+ change. Although admittedly the GPL is at the more restrictive end of the
+ scale, so including software with less restrictive licenses is usually not a
+ problem. On the other hand MediaWiki on GPL2 would have for example have a
+ major problem including Apache licensed libraries.
+* Well, and finally there may be some shiny new GPL4 in the future, that
+ protects against whatever new scheme the big, bad industry has come up with.
+ For an example of such a situation see the article [Why Upgrade to
+ GPLv3][why-upgrade] by Richard Stallman.
+
+#### And what would you maybe change it to?
+
+Any open source license, that allows to maintain the Chameleon skin in a
+sensible way while still retaining as much of the spirit of the original license
+as possible. I certainly do not want to cheat contributors out of being
+recognized for their work, so while I like its radical simplicity I'd probably
+not go for [WTFPL][WTFPL].
+
+#### Don't you need to get signatures or something similar?
+
+The written signature is indeed a critical point. Many organizations (Python,
+GNU, Mozilla, Apache) actually ask for that. But I certainly do not want to
+involve myself in a lot of paperwork. So I try to get around that by asking to
+add the statement to the commit message. Sure, it is possible to change the
+history of a git repo, but doing so over all publicly available (and private)
+copies of the repo (including the ones on the WMF Git server and GitHub) should
+be not that easy.
+
+#### Isn't a MediaWiki skin (by its very nature) derivative from MediaWiki and thus infected by its license anyway?
+
+I do not think that skins and extensions are derivatives of MediaWiki. They do
+not fork and change. Instead they are pluggable libraries that may or may not be
+used with an MW installation. You could say they provide you with the means to
+create a derivative, where - if you were to actually distribute it - you would
+have to make sure all the licenses are compatible. So you might argue, that
+anybody providing a package of MediaWiki and some skins/extensions, creates a
+derivate. The MediaWiki tarball comes to mind.
+
+From a practical point of view, if skins and extensions actually were
+derivatives, it would be pointless to specify a separate license for them. And
+MediaWiki could never incorporate any library that does not have by chance the
+same license. Following that reasoning, you could even argue that all the
+software on a computer needs to be compatible with the OS license.
+
+#### Why not just wait until you come to the point where you want to change the license and ask people then?
+
+Two answers. First, it might just not be possible to get hold of all the people.
+Second, if anybody then disagrees, their contributions might have become an
+integral part of the software such that removing them would not be realistically
+feasible. And even if it were feasible it may be hard to remove their
+contributions and replace them with something having the same functionality. The
+new code will inevitably be similar to the old one and it might be hard to prove
+that the one was not derived from the other.
+
+
+[why-upgrade]: https://www.gnu.org/licenses/rms-why-gplv3.html
+[wmf-git-server]: https://git.wikimedia.org/
+[patch-uploader]: https://tools.wmflabs.org/gerrit-patch-uploader/
+[WTFPL]: http://www.wtfpl.net
diff --git a/www/wiki/skins/chameleon/docs/licenses.md b/www/wiki/skins/chameleon/docs/licenses.md
new file mode 100644
index 00000000..ce579190
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/licenses.md
@@ -0,0 +1,23 @@
+## Licenses
+
+Copyright 2013 - 2016, Stephan Gambke
+
+You can use the Chameleon skin under the [GNU General Public License, version
+3](https://www.gnu.org/copyleft/gpl.html) (or any later version). See the
+relevant [license statement](../COPYING).
+
+The documentation of the Chameleon skin is published under the [GNU Free
+Documentation License, version 1.3](https://www.gnu.org/copyleft/fdl.html) (or
+any later version). See the relevant [license statement](copying.md).
+
+The ["Chameleon Skin Logo"](Chameleon.svg) was derived from the ["Chameleon free
+icon"](http://www.flaticon.com/free-icon/chameleon_36320) made by
+[Freepik](http://www.freepik.com) from
+[www.flaticon.com](http://www.flaticon.com), which is licensed under [CC BY
+3.0](http://creativecommons.org/licenses/by/3.0/). The "Chameleon Skin Logo"
+itself was created by [Stephan
+Gambke](https://www.mediawiki.org/wiki/User:F.trott) and is licensed under [CC
+BY 3.0](http://creativecommons.org/licenses/by/3.0/) as well.
+
+Further licenses:
+* Sticky-kit v1.1.3, Copyright 2015, Leaf Corcoran (http://leafo.net), WTFPL
diff --git a/www/wiki/skins/chameleon/docs/release-notes.md b/www/wiki/skins/chameleon/docs/release-notes.md
new file mode 100644
index 00000000..27c174b9
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/release-notes.md
@@ -0,0 +1,292 @@
+## Release Notes
+
+### Chameleon 1.7.1
+
+Released on 10-May-2018
+
+Fixes the reported version in Special:Version.
+
+### Chameleon 1.7
+
+Released on 29-Apr-2018
+
+Changes:
+* (#49) Allows skins that build on top of Chameleon to set a specific layout
+ file without the need to manipulate the global config variables.
+ ([Robert Vogel (HalloWelt)](https://github.com/osnard)
+* (#60) Add PageToolsAdaptable, an adaptable NavbarHorizontal/PageTools
+ component ([Tobias Oetterer](https://github.com/oetterer))
+
+Fixes:
+* Create a stacking context on the main content to avoid elements with `z-index`
+ messing up the nav elements (e.g. being shown in front of a sticky navbar
+ instead of going behind it)
+* (#65) Fix z-index for Echo notifications
+* Remove usage of functions deprecated in MediaWiki 1.31
+
+### Chameleon 1.6
+
+Released on 08-Oct-2017
+
+Changes:
+* Grid: Add `mode` attribute. This allows to switch the grid to fluid mode.
+ ([Robert Vogel (HalloWelt)](https://github.com/osnard)
+* Allow full qualified class names as component type. This allows to use custom
+ components. ([Robert Vogel (HalloWelt)](https://github.com/osnard)
+* Searchbar: Add 'buttons' attribute. This allows to hide one of the Searchbar
+ buttons. Allowed values are `search`, `go` and `search go`.
+* Initial integration of the Echo extension. Mostly styles fixes to avoid
+ breaking the skin.
+* Improve documentation
+
+Fixes:
+* (#2) Fix font size and z-index of Echo popup
+* (#31) The Pencil button triggers "Edit with form" when
+ `$wgPageFormsRenameEditTabs` of PageForms is set
+* (#32) Sticky elements now appear on top of MW Indicators
+* (#34) Some MediaWiki styles (mw-headline and mw-body) interfered with
+ Bootstrap styles ([Dennis Groenewegen](https://github.com/D-Groenewegen))
+* (#35) Subcomponents of NavbarHorizontal have dedicated classes now and use
+ the central component factory now. This allows to us Modifications on them.
+
+### Chameleon 1.5
+
+Released on 23-Nov-2016
+
+Changes:
+* Move from WMF server to GitHub: Updates of documentation, some scripts,
+ registration with [translatewiki](https://translatewiki.net)
+* Improve documentation
+* Replace [jquery-sticky](https://github.com/garand/sticky) by
+ [sticky-kit](http://leafo.net/sticky-kit/)
+* Use sticky for the navbar of the fixedhead layout
+* NavbarHorizontal: Allow custom types and classes for Navbar elements
+* PersonalTools: Add attribute *hideNewtalkNotifier*
+* Standard layout: Use separate NewtalkNotifier and PersonalTools components
+* Add schema description for layout files: [layout.rng](../layouts/layout.rng)
+* Add validation script for layout files:<br>
+ Call `php maintenance/validateLayout.php <layout.xml>`
+* Add composer scripts: test, phpunit, build
+* Add JS linting for better code quality
+
+Fixes:
+* Javascript modules were not loading in MW 1.28+
+* Logo: Link to main page when *addLink* attribute is not present
+
+### Chameleon 1.4
+
+Released on 20-Sep-2016
+
+Changes:
+* Logo: add *addLink* attribute to Logo component
+
+Fixes:
+* Restore "Edit with form" link for Semantic Forms 3.5 and later
+* Show dropdown menus of NavBar in front of maps (Maps extension)
+
+### Chameleon 1.3
+
+Released on 08-Mar-2016
+
+Changes:
+* Add URL parameter 'uselayout'
+* Add attributes 'showTools' and 'showLanguages' for the NavMenu
+* Add attributes 'hideTools' and 'hideLanguages' for the ToolbarHorizontal
+* Add support for [Page status indicators]
+ (https://www.mediawiki.org/wiki/Help:Page_status_indicators)
+
+Fixes:
+* Correctly follow symlinks
+ ([Bug: T124714](https://phabricator.wikimedia.org/T124714))
+* Provide correct box-sizing model and z-index for VisualEditor components
+* Float the VisualEditor UI toolbar below a fixed or sticky navbar
+
+### Chameleon 1.2
+
+Released on 16-Jan-2016
+
+This release may break customized styles for the NavbarHorizontal component.
+
+Changes:
+* Restructured the Page Tools on Navbars: The 'Edit' action and the Page Tools'
+ menu button got icons and were offset from the rest of the menus.
+* 'Edit' link links to the proper Visual Editor action if the
+ [VE extension](https://www.mediawiki.org/wiki/VisualEditor) is present
+* 'Edit' link links to the proper Semantic Forms action if the
+ [SF extension](https://www.mediawiki.org/wiki/Extension:Semantic_Forms) is
+ present and `$sfgRenameEditTabs` is set
+* Improve styleability of tool buttons in NavbarHorizontal (wrap the button
+ label in a span) and rework styling of the buttons
+* Add ChameleonNavbarHorizontalPersonalToolsLinkText hook
+* Add ChameleonNavbarHorizontalNewTalkLinkText hook
+* New less style variables @toolbar-height, @toolbar-padding-vertical,
+ @toolbar-padding-horizontal
+
+Fixes:
+* Use variable @hr-border for color of lower border of first heading
+* Some style issues for VisualEditor
+* The 'Page' link was not shown in Edit mode
+* Some themes (e.g. spacelab, cerulian) overrode the toolbar padding when the
+ mouse hovered over links
+
+### Chameleon 1.1.4
+
+Released on 27-May-2015
+
+Fixes:
+* Do not show mw-headline-anchor
+* Fix Message icon linking to non-existent page
+ ([Bug: T100550](https://phabricator.wikimedia.org/T100550))
+
+### Chameleon 1.1.3
+
+Released on 01-Mar-2015
+
+Bump minimum Bootstrap extension version to 1.1
+
+Fixes:
+* Set @navbar-default-link-active-bg to @navbar-default-bg color
+* Bullets for ULs respond to list-style:none again
+* Align personal tools drop-down with lower edge of navbar
+* Let .tleft float left
+* Let jumped-to section heads appear below fixed/sticky header
+* Add mediawiki.sectionAnchor module (for compatibility with MW 1.25)
+* Fix i18n for page tools link
+
+Other changes:
+* Minor doc fixes
+* Add integration test StylesCompileTest
+* Restructure test file layout
+
+### Chameleon 1.1.2
+
+Released on 19-Nov-2014
+
+Fixes:
+* Load shared.css with correct remote base path, so ref'd images are found
+* Display lists in File namespace without bullets
+* Set padding for td.mw-label and td.mw-input to have more space in between
+* Enable mw-phpunit-runner.php when started from outside dir
+* Use an
+ [spdx-compliant license identifier](https://getcomposer.org/doc/04-schema.md#license)
+ in composer.json
+* Set padding of mw-ui-input and -button on Special:Search so they have the
+ same height ([Bug: 73509](https://bugzilla.wikimedia.org/73509))
+* Remove table positioning from personal tools.
+ ([Bug: 73514](https://bugzilla.wikimedia.org/73514))
+
+Other changes:
+* Add [detailed installation instructions for Linux](installation-linux.md)
+* Introduce relative file paths throughout the skin to enable installation in
+ other directories then the standard .../skins. However it still expects some
+ layout assumptions to be true.
+* Reorganize directories
+* Refactor several components and helper classes
+* Refactor Menu package (+ add some testing)
+
+### Chameleon 1.1.1
+
+Released on 08-Nov-2014
+
+Fixes:
+* Fix styles for Special pages
+ ([Bug: 72872](https://bugzilla.wikimedia.org/72872))
+* Include dataAfterContent in bodyContent
+ ([Bug: 72869](https://bugzilla.wikimedia.org/72869))
+
+Other changes:
+* Some refactoring of the MainContent component
+
+### Chameleon 1.1
+
+Released on 06-Nov-2014
+
+New layouts:
+* __clean__: This is a minimalist layout intended for wikis that are not open
+ for general editing. A use case might be a blogging platform. For users, that
+ do not have edit rights, the layout will show only the main content of a wiki
+ page (and the site notice, if set). For users that do have edit rights it will
+ additionally show a sticky full-width navbar above, and a toolbar and an info
+ footer below the main content.
+
+New components and modifications:
+* __Silent__: Does nothing. Mainly intended for internal purposes, but may also
+ be used in custom layouts, e.g. as a placeholder during layout development
+* __HideFor__: Modification that allows to hide the parent component if the
+ condition specified by the attributes is fulfilled.
+ See its [description](Components/Modifications/HideFor.md)
+* __ShowOnlyFor__: Modification that allows to show the parent
+ component only if the condition specified by the attributes is fulfilled.
+ See its [description](Components/Modifications/ShowOnlyFor.md)
+
+Other changes:
+* Update CI test setup
+* Update localisation
+* Update documentation
+
+Known issues:
+* This version will identify as 1.1-alpha on Special:Version
+
+### Chameleon 1.0.1
+
+Released on 22-Oct-2014
+
+Fixes:
+* Fix TOC layout
+
+Other changes:
+* Add basic testing for Menu component (and fix a small bug)
+* Update documentation
+
+### Chameleon 1.0
+
+Released on 19-Oct-2014
+
+After nearly 1.5 years in development status, this is the first official version
+of the Chameleon skin for MediaWiki.
+
+It contains the following layouts:
+* __standard__ features a big logo, a horizontal nav bar containing the
+ sidebar navigation links to Main Page, Recent changes, etc. The personal tools
+ (user page, preferences, etc.) and the page tools (discussion, edit, history)
+ are kept as textual links above and below the nav bar. Same goes for the
+ search bar, it is kept above the nav bar on the right side of the page.
+* __navhead__ integrates the (now smaller) logo, page tools, personal tools,
+ and the search bar in the nav bar, leading to a more content oriented look.
+* __fixedhead__ takes the nav bar out of the content grid and puts it at the
+ top of the page over the full width of the browser window. The nav bar stays
+ fixed at its position when the page is scrolled.
+* __stickyhead__ is similar to fixedhead, only it has a secondary menu bar on
+ top of the main nav bar. When the page is scrolled, the secondary menu will
+ scroll with the page, while the main menu will scroll only up to the upper
+ window border and then stay there.
+
+This version contains the following components:
+* Cell
+* Container
+* FooterIcons
+* FooterInfo
+* FooterPlaces
+* Grid
+* Html
+* Logo
+* MainContent
+* Menu
+* NavbarHorizontal
+* NavMenu
+* NewtalkNotifier
+* PageTools
+* PersonalTools
+* Row
+* SearchBar
+* SiteNotice
+* Structure
+* ToolbarHorizontal
+
+Known Issues:
+* The available documentation is insufficient. For now, if you have questions,
+ just [ask](contact.md).
+* Many of the lesser used page elements are not properly styled yet.
+
+Compatibility:
+* Tests have been run against MediaWiki 1.22 and 1.25
diff --git a/www/wiki/skins/chameleon/docs/testing.md b/www/wiki/skins/chameleon/docs/testing.md
new file mode 100644
index 00000000..87c4180a
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/testing.md
@@ -0,0 +1,26 @@
+## Testing
+
+This skin provides unit tests that can be run by a [continuous integration
+platform][travis] or manually by executing the `mw-phpunit-runner.php` script or
+[`phpunit`][mw-testing] together with the PHPUnit configuration file found in
+the root directory of the skin.
+```sh
+php tests/mw-phpunit-runner.php [options]
+```
+
+Useful optional parameters:
+```
+--coverage-html ../../../report
+--debug
+```
+
+To test against an external HTML validation service
+(http://validator.w3.org/check) set the `USE_EXTERNAL_HTML_VALIDATOR` setting to
+`true` in `phpunit.xml.dist`. Please be careful with their resources and use
+this setting sparingly. If you do this, you may also want to set
+`printerClass="Skins\Chameleon\Tests\Util\ColoringTextUIResultPrinter"` as an
+additional attribute in the `phpunit` element to colorize then tests that
+connect to the external service.
+
+[travis]: https://travis-ci.org/cmln/chameleon
+[mw-testing]: https://www.mediawiki.org/wiki/Manual:PHP_unit_testing
diff --git a/www/wiki/skins/chameleon/docs/variables.md b/www/wiki/skins/chameleon/docs/variables.md
new file mode 100644
index 00000000..3ef61bde
--- /dev/null
+++ b/www/wiki/skins/chameleon/docs/variables.md
@@ -0,0 +1,405 @@
+## Less Variables
+
+This is the list of all Less variables defined in the various style files used
+by the Chameleon skin. (although not all of the variables are actually used).
+
+These variables may be modified to change the look of your wiki. However, you
+should __not__ modify the indicated files of the Bootstrap framework or the
+Chameleon skin directly. These files are given as a reference only, they may
+contain more information on the purpose of a specific variable. Moreover the
+values given here are the final calculated values, the exact definition text may
+again be found in the indicated files. The ... in the file names indicates the
+MediaWiki installation directory.
+
+ Name | Type | Value | File | Remark
+----------------------------------------------|------------|-----------------------------------------------|--------------------------------------------------------------|------------------------------
+ @abbr-border-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-danger-bg | Color | rgba( 242, 222, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-danger-border | Color | rgba( 235, 204, 209, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-danger-text | Color | rgba( 169, 68, 66, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-info-bg | Color | rgba( 217, 237, 247, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-info-border | Color | rgba( 188, 232, 241, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-info-text | Color | rgba( 49, 112, 143, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-link-font-weight | Keyword | bold | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-padding | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-success-bg | Color | rgba( 223, 240, 216, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-success-border | Color | rgba( 214, 233, 198, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-success-text | Color | rgba( 60, 118, 61, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-warning-bg | Color | rgba( 252, 248, 227, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-warning-border | Color | rgba( 250, 235, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @alert-warning-text | Color | rgba( 138, 109, 59, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-active-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-active-color | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-bg | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-border-radius | Dimension | 10px | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-font-weight | Keyword | bold | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-line-height | Dimension | 1 | .../vendor/twitter/bootstrap/less/variables.less |
+ @badge-link-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @blockquote-border-color | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @blockquote-font-size | Dimension | 17.5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @blockquote-small-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @body-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @border-radius-base | Dimension | 4px | .../vendor/twitter/bootstrap/less/variables.less |
+ @border-radius-large | Dimension | 6px | .../vendor/twitter/bootstrap/less/variables.less |
+ @border-radius-small | Dimension | 3px | .../vendor/twitter/bootstrap/less/variables.less |
+ @brand-danger | Color | rgba( 217, 83, 79, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @brand-info | Color | rgba( 91, 192, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @brand-primary | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @brand-success | Color | rgba( 92, 184, 92, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @brand-warning | Color | rgba( 240, 173, 78, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-active-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-color | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-padding-horizontal | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-padding-vertical | Dimension | 8px | .../vendor/twitter/bootstrap/less/variables.less |
+ @breadcrumb-separator | Quoted | "/" | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-danger-bg | Color | rgba( 217, 83, 79, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-danger-border | Color | rgba( 212, 63, 58, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-danger-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-default-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-default-border | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-default-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-font-weight | Keyword | normal | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-info-bg | Color | rgba( 91, 192, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-info-border | Color | rgba( 70, 184, 218, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-info-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-link-disabled-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-primary-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-primary-border | Color | rgba( 53, 126, 189, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-primary-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-success-bg | Color | rgba( 92, 184, 92, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-success-border | Color | rgba( 76, 174, 76, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-success-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-warning-bg | Color | rgba( 240, 173, 78, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-warning-border | Color | rgba( 238, 162, 54, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @btn-warning-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @caret-width-base | Dimension | 4px | .../vendor/twitter/bootstrap/less/variables.less |
+ @caret-width-large | Dimension | 5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-caption-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-control-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-control-font-size | Dimension | 20px | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-control-opacity | Dimension | 0.5 | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-control-width | Dimension | 15% | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-indicator-active-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-indicator-border-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @carousel-text-shadow | Expression | 0 1px 2px rgba( 0, 0, 0, 0.6 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @close-color | Color | rgba( 0, 0, 0, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @close-font-weight | Keyword | bold | .../vendor/twitter/bootstrap/less/variables.less |
+ @close-text-shadow | Expression | 0 1px 0 rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @code-bg | Color | rgba( 249, 242, 244, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @code-color | Color | rgba( 199, 37, 78, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @component-active-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @component-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @component-offset-horizontal | Dimension | 180px | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-desktop | Dimension | 970px | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-large-desktop | Dimension | 1170px | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-lg | Dimension | 1170 | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-md | Dimension | 970 | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-sm | Dimension | 750 | .../vendor/twitter/bootstrap/less/variables.less |
+ @container-tablet | Dimension | 750px | .../vendor/twitter/bootstrap/less/variables.less |
+ @dl-horizontal-offset | Dimension | 180 | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-border | Color | rgba( 0, 0, 0, 0.15 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-caret-color | Color | rgba( 0, 0, 0, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-divider-bg | Color | rgba( 229, 229, 229, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-fallback-border | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-header-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-active-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-disabled-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-hover-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @dropdown-link-hover-color | Color | rgba( 38, 38, 38, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-family-base | Value | "Helvetica Neue" Helvetica Arial sans-serif | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-family-monospace | Value | Menlo Monaco Consolas "Courier New" monospace | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-family-sans-serif | Value | "Helvetica Neue" Helvetica Arial sans-serif | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-family-serif | Value | Georgia "Times New Roman" Times serif | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-base | Dimension | 14px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h1 | Dimension | 36px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h2 | Dimension | 30px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h3 | Dimension | 24px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h4 | Dimension | 18px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h5 | Dimension | 14 | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-h6 | Dimension | 12px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-large | Dimension | 18px | .../vendor/twitter/bootstrap/less/variables.less |
+ @font-size-small | Dimension | 12px | .../vendor/twitter/bootstrap/less/variables.less |
+ @gray | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @gray-dark | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @gray-darker | Color | rgba( 34, 34, 34, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @gray-light | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @gray-lighter | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @grid-columns | Dimension | 12 | .../vendor/twitter/bootstrap/less/variables.less |
+ @grid-float-breakpoint | Dimension | 768 | .../vendor/twitter/bootstrap/less/variables.less |
+ @grid-float-breakpoint-max | Dimension | 767px | .../vendor/twitter/bootstrap/less/variables.less |
+ @grid-gutter-width | Dimension | 30px | .../vendor/twitter/bootstrap/less/variables.less |
+ @headings-color | Keyword | inherit | .../vendor/twitter/bootstrap/less/variables.less |
+ @headings-font-family | Keyword | inherit | .../vendor/twitter/bootstrap/less/variables.less |
+ @headings-font-weight | Dimension | 500 | .../vendor/twitter/bootstrap/less/variables.less |
+ @headings-line-height | Dimension | 1.1 | .../vendor/twitter/bootstrap/less/variables.less |
+ @headings-small-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @hr-border | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @icon-font-name | Quoted | "glyphicons-halflings-regular" | .../vendor/twitter/bootstrap/less/variables.less |
+ @icon-font-path | Quoted | ".../vendor/twitter/bootstrap/fonts/" | .../vendor/twitter/bootstrap/less/variables.less |
+ @icon-font-svg-id | Quoted | "glyphicons_halflingsregular" | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-bg-disabled | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-border | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-border-focus | Color | rgba( 102, 175, 233, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-color | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-color-placeholder | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-group-addon-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-group-addon-border-color | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-height-base | Dimension | 34px | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-height-large | Dimension | 46px | .../vendor/twitter/bootstrap/less/variables.less |
+ @input-height-small | Dimension | 30px | .../vendor/twitter/bootstrap/less/variables.less |
+ @item | Quoted | ".col-xs-1, .col-sm-1, .col-md-1, .col-lg-1" | .../vendor/twitter/bootstrap/less/mixins/grid-framework.less |
+ @jumbotron-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @jumbotron-color | Keyword | inherit | .../vendor/twitter/bootstrap/less/variables.less |
+ @jumbotron-font-size | Dimension | 21px | .../vendor/twitter/bootstrap/less/variables.less |
+ @jumbotron-heading-color | Keyword | inherit | .../vendor/twitter/bootstrap/less/variables.less |
+ @jumbotron-padding | Dimension | 30px | .../vendor/twitter/bootstrap/less/variables.less |
+ @kbd-bg | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @kbd-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-danger-bg | Color | rgba( 217, 83, 79, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-default-bg | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-info-bg | Color | rgba( 91, 192, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-link-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-primary-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-success-bg | Color | rgba( 92, 184, 92, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @label-warning-bg | Color | rgba( 240, 173, 78, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @legend-border-color | Color | rgba( 229, 229, 229, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @legend-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @line-height-base | Dimension | 1.428571429 | .../vendor/twitter/bootstrap/less/variables.less |
+ @line-height-computed | Dimension | 20px | .../vendor/twitter/bootstrap/less/variables.less |
+ @line-height-large | Dimension | 1.33 | .../vendor/twitter/bootstrap/less/variables.less |
+ @line-height-small | Dimension | 1.5 | .../vendor/twitter/bootstrap/less/variables.less |
+ @link-color | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @link-external-color | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @link-hover-color | Color | rgba( 42, 100, 150, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @link-interwiki-color | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @link-new-color | Color | rgba( 181, 43, 39, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @link-stub-color | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @list-bullet-color | Color | rgba( 119, 119, 119, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @list-bullet-size | Dimension | 0.7ex | .../skins/chameleon/resources/styles/variables.less |
+ @list-group-active-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-active-border | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-active-text-color | Color | rgba( 225, 237, 247, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-disabled-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-disabled-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-disabled-text-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-hover-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-link-color | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-link-heading-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-group-link-hover-color | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @list-level-indent | Dimension | 2.5ex | .../skins/chameleon/resources/styles/variables.less |
+ @modal-backdrop-bg | Color | rgba( 0, 0, 0, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-backdrop-opacity | Dimension | 0.5 | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-content-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-content-border-color | Color | rgba( 0, 0, 0, 0.2 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-content-fallback-border-color | Color | rgba( 153, 153, 153, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-footer-border-color | Color | rgba( 229, 229, 229, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-header-border-color | Color | rgba( 229, 229, 229, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-inner-padding | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-lg | Dimension | 900px | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-md | Dimension | 600px | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-sm | Dimension | 300px | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-title-line-height | Dimension | 1.428571429 | .../vendor/twitter/bootstrap/less/variables.less |
+ @modal-title-padding | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-collapse-max-height | Dimension | 340px | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-bg | Color | rgba( 248, 248, 248, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-border | Color | rgba( 231, 231, 231, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-brand-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-brand-hover-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-brand-hover-color | Color | rgba( 94, 94, 94, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-active-bg | Color | rgba( 231, 231, 231, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-active-color | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-disabled-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-disabled-color | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-hover-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-link-hover-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-toggle-border-color | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-toggle-hover-bg | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-default-toggle-icon-bar-bg | Color | rgba( 136, 136, 136, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-height | Dimension | 50px | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-bg | Color | rgba( 34, 34, 34, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-border | Color | rgba( 9, 9, 9, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-brand-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-brand-hover-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-brand-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-active-bg | Color | rgba( 9, 9, 9, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-disabled-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-disabled-color | Color | rgba( 68, 68, 68, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-hover-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-link-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-toggle-border-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-toggle-hover-bg | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-inverse-toggle-icon-bar-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-logo-height | Dimension | 45px | .../skins/chameleon/resources/styles/variables.less |
+ @navbar-margin-bottom | Dimension | 20 | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-newtalk-available | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @navbar-newtalk-not-available | Color | rgba( 196, 196, 196, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @navbar-padding-horizontal | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-padding-vertical | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @navbar-user-loggedin | Color | rgba( 66, 139, 202, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @navbar-user-not-loggedin | Color | rgba( 196, 196, 196, 1 ) | .../skins/chameleon/resources/styles/variables.less |
+ @nav-disabled-link-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-disabled-link-hover-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-link-hover-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-link-padding | Expression | 10px 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-open-link-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-pills-active-link-hover-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-pills-active-link-hover-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-pills-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-active-link-hover-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-active-link-hover-border-color | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-active-link-hover-color | Color | rgba( 85, 85, 85, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-border-color | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-justified-active-link-border-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-justified-link-border-color | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @nav-tabs-link-hover-border-color | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-base-horizontal | Dimension | 12px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-base-vertical | Dimension | 6px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-large-horizontal | Dimension | 16px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-large-vertical | Dimension | 10px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-small-horizontal | Dimension | 10px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-small-vertical | Dimension | 5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-xs-horizontal | Dimension | 5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @padding-xs-vertical | Dimension | 1px | .../vendor/twitter/bootstrap/less/variables.less |
+ @page-header-border-color | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-active-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-border-radius | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-disabled-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pager-hover-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-active-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-active-border | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-active-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-color | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-disabled-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-disabled-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-disabled-color | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-hover-bg | Color | rgba( 238, 238, 238, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-hover-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pagination-hover-color | Color | rgba( 42, 100, 150, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-body-padding | Dimension | 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-danger-border | Color | rgba( 235, 204, 209, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-danger-heading-bg | Color | rgba( 242, 222, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-danger-text | Color | rgba( 169, 68, 66, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-default-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-default-heading-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-default-text | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-footer-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-footer-padding | Expression | 10 15 | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-heading-padding | Expression | 10px 15px | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-info-border | Color | rgba( 188, 232, 241, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-info-heading-bg | Color | rgba( 217, 237, 247, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-info-text | Color | rgba( 49, 112, 143, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-inner-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-primary-border | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-primary-heading-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-primary-text | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-success-border | Color | rgba( 214, 233, 198, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-success-heading-bg | Color | rgba( 223, 240, 216, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-success-text | Color | rgba( 60, 118, 61, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-warning-border | Color | rgba( 250, 235, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-warning-heading-bg | Color | rgba( 252, 248, 227, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @panel-warning-text | Color | rgba( 138, 109, 59, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-arrow-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-arrow-outer-color | Color | rgba( 0, 0, 0, 0.25 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-arrow-outer-fallback-color | Color | rgba( 153, 153, 153, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-arrow-outer-width | Dimension | 11px | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-arrow-width | Dimension | 10px | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-border-color | Color | rgba( 0, 0, 0, 0.2 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-fallback-border-color | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-max-width | Dimension | 276px | .../vendor/twitter/bootstrap/less/variables.less |
+ @popover-title-bg | Color | rgba( 247, 247, 247, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pre-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pre-border-color | Color | rgba( 204, 204, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pre-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @pre-scrollable-max-height | Dimension | 340px | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-bg | Color | rgba( 66, 139, 202, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-danger-bg | Color | rgba( 217, 83, 79, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-info-bg | Color | rgba( 91, 192, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-success-bg | Color | rgba( 92, 184, 92, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bar-warning-bg | Color | rgba( 240, 173, 78, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @progress-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-desktop | Dimension | 992 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-lg-desktop | Dimension | 1200 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-lg | Dimension | 1200px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-lg-min | Dimension | 1200 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-md | Dimension | 992px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-md-max | Dimension | 1199px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-md-min | Dimension | 992 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-phone | Dimension | 480 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-sm | Dimension | 768px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-sm-max | Dimension | 991px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-sm-min | Dimension | 768 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-tablet | Dimension | 768 | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-xs | Dimension | 480px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-xs-max | Dimension | 767px | .../vendor/twitter/bootstrap/less/variables.less |
+ @screen-xs-min | Dimension | 480 | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-danger-bg | Color | rgba( 242, 222, 222, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-danger-border | Color | rgba( 235, 204, 209, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-danger-text | Color | rgba( 169, 68, 66, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-info-bg | Color | rgba( 217, 237, 247, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-info-border | Color | rgba( 188, 232, 241, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-info-text | Color | rgba( 49, 112, 143, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-success-bg | Color | rgba( 223, 240, 216, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-success-border | Color | rgba( 214, 233, 198, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-success-text | Color | rgba( 60, 118, 61, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-warning-bg | Color | rgba( 252, 248, 227, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-warning-border | Color | rgba( 250, 235, 204, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @state-warning-text | Color | rgba( 138, 109, 59, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-bg-accent | Color | rgba( 249, 249, 249, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-bg-active | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-bg | Color | transparent | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-bg-hover | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-border-color | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-cell-padding | Dimension | 8px | .../vendor/twitter/bootstrap/less/variables.less |
+ @table-condensed-cell-padding | Dimension | 5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @text-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @text-muted | Color | rgba( 119, 119, 119, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @thumbnail-bg | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @thumbnail-border | Color | rgba( 221, 221, 221, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @thumbnail-border-radius | Dimension | 4 | .../vendor/twitter/bootstrap/less/variables.less |
+ @thumbnail-caption-color | Color | rgba( 51, 51, 51, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @thumbnail-caption-padding | Dimension | 3px | .../skins/chameleon/resources/styles/variables.less |
+ @thumbnail-padding | Dimension | 4px | .../vendor/twitter/bootstrap/less/variables.less |
+ @toctitle-font-size | Dimension | 18 | .../skins/chameleon/resources/styles/variables.less |
+ @tooltip-arrow-color | Color | rgba( 0, 0, 0, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @tooltip-arrow-width | Dimension | 5px | .../vendor/twitter/bootstrap/less/variables.less |
+ @tooltip-bg | Color | rgba( 0, 0, 0, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @tooltip-color | Color | rgba( 255, 255, 255, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @tooltip-max-width | Dimension | 200px | .../vendor/twitter/bootstrap/less/variables.less |
+ @tooltip-opacity | Dimension | 0.9 | .../vendor/twitter/bootstrap/less/variables.less |
+ @well-bg | Color | rgba( 245, 245, 245, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @well-border | Color | rgba( 227, 227, 227, 1 ) | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-dropdown | Dimension | 1000 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-modal-background | Dimension | 1040 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-modal | Dimension | 1050 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-navbar | Dimension | 1000 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-navbar-fixed | Dimension | 1030 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-popover | Dimension | 1060 | .../vendor/twitter/bootstrap/less/variables.less |
+ @zindex-tooltip | Dimension | 1070 | .../vendor/twitter/bootstrap/less/variables.less |
diff --git a/www/wiki/skins/chameleon/layouts/clean.xml b/www/wiki/skins/chameleon/layouts/clean.xml
new file mode 100644
index 00000000..9b87eb72
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/clean.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+<?xml-model href="https://cmln.github.io/chameleon/schema/1.0/layout.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2016, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.1
+@ingroup Skins
+-->
+<structure xmlns="https://cmln.github.io/chameleon/schema/1.0/layout.rng">
+
+ <component type="NavbarHorizontal" >
+ <modification type="ShowOnlyFor" permission="edit"></modification>
+ <modification type="Sticky" ></modification>
+ <component type="Logo" position="head"></component>
+ <component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no"></component>
+ <component type="PageTools" position="right" hideSelectedNameSpace="yes"></component>
+ <component type="SearchBar" position="right"></component>
+ <component type="PersonalTools" position="right"></component>
+ </component>
+
+ <grid>
+ <row>
+ <cell span="12">
+ <component type="SiteNotice"></component>
+ <component type="MainContent"></component>
+ </cell>
+ </row>
+
+ <row>
+ <modification type="ShowOnlyFor" permission="edit"></modification>
+ <cell span="12">
+ <component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"></component>
+ </cell>
+ </row>
+
+ <row>
+ <modification type="ShowOnlyFor" permission="edit"></modification>
+ <cell span="12">
+ <component type="FooterInfo" class="list-inline"></component>
+ </cell>
+ </row>
+
+ </grid>
+</structure>
diff --git a/www/wiki/skins/chameleon/layouts/fixedhead.xml b/www/wiki/skins/chameleon/layouts/fixedhead.xml
new file mode 100644
index 00000000..305ca450
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/fixedhead.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+<?xml-model href="https://cmln.github.io/chameleon/schema/1.0/layout.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2016, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.0
+@ingroup Skins
+-->
+<structure xmlns="https://cmln.github.io/chameleon/schema/1.0/layout.rng">
+
+ <component type="NavbarHorizontal">
+ <modification type="Sticky"/>
+ <component type="Logo" position="head"/>
+ <component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no"/>
+ <component type="PageTools" position="right" hideSelectedNameSpace="yes"/>
+ <component type="SearchBar" position="right"/>
+ <component type="PersonalTools" position="right"/>
+ </component>
+
+ <grid>
+ <row>
+ <cell span="12">
+ <component type="SiteNotice"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="MainContent"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="FooterInfo"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="6">
+ <component type="FooterPlaces"/>
+ </cell>
+ <cell span="6">
+ <component type="FooterIcons"/>
+ </cell>
+ </row>
+ </grid>
+</structure>
diff --git a/www/wiki/skins/chameleon/layouts/layout.rng b/www/wiki/skins/chameleon/layouts/layout.rng
new file mode 100644
index 00000000..85161612
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/layout.rng
@@ -0,0 +1,570 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2017, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.5
+@ingroup Skins
+-->
+<grammar
+ xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+ ns="https://cmln.github.io/chameleon/schema/1.0/layout.rng"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
+>
+
+ <a:documentation>
+ Schema for Chameleon layout files
+ Version 1.2
+ Copyright 2013 - 2018, Stephan Gambke
+ GNU General Public License, version 3 (or any later version)
+ </a:documentation>
+
+ <start>
+ <ref name="Structure"/>
+ </start>
+
+ <!-- Common content available for all Components -->
+ <define name="Component.CommonContent">
+ <optional>
+ <attribute name="class"/>
+ </optional>
+ <zeroOrMore>
+ <ref name="Modification"/>
+ </zeroOrMore>
+ </define>
+
+ <!-- Special Components -->
+
+ <define name="Structure">
+ <element name="structure">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <zeroOrMore>
+ <choice>
+ <ref name="Grid"/>
+ <ref name="Component"/>
+ </choice>
+ </zeroOrMore>
+
+ </element>
+ </define>
+
+ <define name="Grid">
+ <element name="grid">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+
+ <optional>
+ <attribute name="mode" a:defaultValue="fixedwidth">
+ <choice>
+ <value>fixedwidth</value>
+ <value>fluid</value>
+ </choice>
+ </attribute>
+ </optional>
+
+ <zeroOrMore>
+ <ref name="Row"/>
+ </zeroOrMore>
+
+ </element>
+ </define>
+
+ <define name="Row">
+ <element name="row">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <zeroOrMore>
+ <ref name="Cell"/>
+ </zeroOrMore>
+
+ </element>
+ </define>
+
+ <define name="Cell">
+ <element name="cell">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <optional>
+ <attribute name="span" a:defaultValue="1">
+ <data type="positiveInteger">
+ <param name="minInclusive">1</param>
+ <param name="maxInclusive">12</param>
+ </data>
+ </attribute>
+ </optional>
+
+ <zeroOrMore>
+ <choice>
+ <ref name="Row"/>
+ <ref name="Component"/>
+ </choice>
+ </zeroOrMore>
+
+ </element>
+ </define>
+
+
+ <!-- Components -->
+
+ <!-- Basic Component -->
+ <define name="Component">
+ <element name="component">
+ <a:documentation>Basic Component. If the `type` attribute is not set
+ or set to an unknown value, a `Container` component will be
+ inserted.
+ </a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <optional>
+ <attribute name="type"/>
+ </optional>
+
+ </element>
+ </define>
+
+ <!-- NavbarHorizontal -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>NavbarHorizontal</value>
+ </attribute>
+
+ <optional>
+ <attribute name="fixed">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+
+ <zeroOrMore>
+ <ref name="NavbarHorizontal.Component"/>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component.CommonContent">
+ <optional>
+ <attribute name="position" a:defaultValue="left">
+ <choice>
+ <value>head</value>
+ <value>left</value>
+ <value>right</value>
+ </choice>
+ </attribute>
+
+ </optional>
+ </define>
+
+ <!-- NavMenu -->
+ <define name="NavMenu.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>NavMenu</value>
+ </attribute>
+
+ <optional>
+ <attribute name="flatten"/>
+ </optional>
+
+ <optional>
+ <attribute name="showTools" a:defaultValue="no">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+
+ <optional>
+ <attribute name="showLanguages" a:defaultValue="no">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="NavMenu.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="NavMenu.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- Logo -->
+ <define name="Logo.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>Logo</value>
+ </attribute>
+
+ <optional>
+ <attribute name="addLink" a:defaultValue="yes">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Logo.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Logo.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- PersonalTools -->
+ <define name="PersonalTools.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>PersonalTools</value>
+ </attribute>
+
+ <optional>
+ <attribute name="hideNewtalkNotifier" a:defaultValue="no">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="PersonalTools.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="PersonalTools.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- SearchBar -->
+ <define name="SearchBar.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>SearchBar</value>
+ </attribute>
+
+ <optional>
+ <attribute name="buttons" a:defaultValue="search go">
+ <choice>
+ <value>search</value>
+ <value>go</value>
+ <value>search go</value>
+ </choice>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="SearchBar.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="SearchBar.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- PageTools -->
+ <define name="PageTools.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>PageTools</value>
+ </attribute>
+
+ <optional>
+ <attribute name="hideSelectedNameSpace" a:defaultValue="no">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="PageTools.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="PageTools.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- PageTools -->
+ <define name="PageToolsAdaptable.Content">
+ <ref name="PageTools.Content"/>
+
+ <optional>
+ <attribute name="show">
+ <data type="string"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="PageToolsAdaptable.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- Menu -->
+ <define name="Menu.Content">
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>Menu</value>
+ </attribute>
+
+ <choice>
+ <text/>
+ <attribute name="message"/>
+ </choice>
+ </define>
+
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Menu.Content"/>
+ </element>
+ </define>
+
+ <define name="NavbarHorizontal.Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Menu.Content"/>
+ <ref name="NavbarHorizontal.Component.CommonContent"/>
+ </element>
+ </define>
+
+ <!-- SiteNotice -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>SiteNotice</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- MainContent -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>MainContent</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- NewtalkNotifier -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation>A message to a user about new messages on their
+ talkpage
+ </a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>NewtalkNotifier</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- ToolbarHorizontal -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>ToolbarHorizontal</value>
+ </attribute>
+
+ <optional>
+ <attribute name="hideTools">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+
+ <optional>
+ <attribute name="hideLanguages">
+ <ref name="BoolValues"/>
+ </attribute>
+ </optional>
+
+ </element>
+ </define>
+
+ <!-- FooterInfo -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>FooterInfo</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- FooterPlaces -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>FooterPlaces</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- FooterIcons -->
+ <define name="Component" combine="choice">
+ <element name="component">
+ <a:documentation></a:documentation>
+ <ref name="Component.CommonContent"/>
+
+ <attribute name="type">
+ <value>FooterIcons</value>
+ </attribute>
+
+ </element>
+ </define>
+
+
+ <!-- Modifications -->
+ <define name="Modification">
+ <element name="modification">
+ <a:documentation></a:documentation>
+
+ <attribute name="type">
+ <data type="string"/>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- Sticky -->
+ <define name="Modification" combine="choice">
+ <element name="modification">
+ <a:documentation></a:documentation>
+
+ <attribute name="type">
+ <value>Sticky</value>
+ </attribute>
+
+ </element>
+ </define>
+
+ <!-- ShowOnlyFor -->
+ <define name="Modification" combine="choice">
+ <element name="modification">
+ <a:documentation></a:documentation>
+
+ <attribute name="type">
+ <value>ShowOnlyFor</value>
+ </attribute>
+
+ <optional>
+ <attribute name="permission">
+ <data type="string"/>
+ </attribute>
+ </optional>
+
+ <optional>
+ <attribute name="group">
+ <data type="string"/>
+ </attribute>
+ </optional>
+
+ <optional>
+ <attribute name="namespace">
+ <data type="string"/>
+ </attribute>
+ </optional>
+
+ </element>
+ </define>
+
+ <!-- Helpers -->
+
+ <define name="BoolValues">
+ <choice>
+ <value>true</value>
+ <value>yes</value>
+ <value>on</value>
+ <value>1</value>
+
+ <value>false</value>
+ <value>no</value>
+ <value>off</value>
+ <value>0</value>
+ </choice>
+ </define>
+
+</grammar>
diff --git a/www/wiki/skins/chameleon/layouts/navhead.xml b/www/wiki/skins/chameleon/layouts/navhead.xml
new file mode 100644
index 00000000..e025efb8
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/navhead.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+<?xml-model href="https://cmln.github.io/chameleon/schema/1.0/layout.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2016, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.0
+@ingroup Skins
+-->
+<structure xmlns="https://cmln.github.io/chameleon/schema/1.0/layout.rng">
+ <grid>
+ <row>
+ <cell span="12">
+ <component type="NavbarHorizontal">
+ <component type="Logo" position="head"/>
+ <component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no"/>
+ <component type="PageTools" position="right" hideSelectedNameSpace="yes"/>
+ <component type="SearchBar" position="right"/>
+ <component type="PersonalTools" position="right"/>
+ </component>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="SiteNotice"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="MainContent"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="FooterInfo"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="6">
+ <component type="FooterPlaces"/>
+ </cell>
+ <cell span="6">
+ <component type="FooterIcons"/>
+ </cell>
+ </row>
+ </grid>
+</structure>
diff --git a/www/wiki/skins/chameleon/layouts/standard.xml b/www/wiki/skins/chameleon/layouts/standard.xml
new file mode 100644
index 00000000..ac9d09b5
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/standard.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+<?xml-model href="https://cmln.github.io/chameleon/schema/1.0/layout.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2016, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.0
+@ingroup Skins
+-->
+<structure xmlns="https://cmln.github.io/chameleon/schema/1.0/layout.rng">
+ <grid>
+ <row>
+ <cell span="3">
+ <component type="Logo" addLink="yes"/>
+ </cell>
+
+ <cell span="9">
+
+ <row>
+ <cell span="12">
+ <component type="PersonalTools" hideNewtalkNotifier="yes" class="pull-right"/>
+ <component type="NewtalkNotifier" class="pull-right"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="SearchBar" class="pull-right"/>
+ </cell>
+ </row>
+
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="NavbarHorizontal">
+ <component type="NavMenu" showTools="no" showLanguages="no"/>
+ </component>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="PageTools"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="SiteNotice"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="MainContent"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="FooterInfo"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="6">
+ <component type="FooterPlaces"/>
+ </cell>
+ <cell span="6">
+ <component type="FooterIcons"/>
+ </cell>
+ </row>
+ </grid>
+</structure>
diff --git a/www/wiki/skins/chameleon/layouts/stickyhead.xml b/www/wiki/skins/chameleon/layouts/stickyhead.xml
new file mode 100644
index 00000000..6a6cc162
--- /dev/null
+++ b/www/wiki/skins/chameleon/layouts/stickyhead.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+<?xml-model href="https://cmln.github.io/chameleon/schema/1.0/layout.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2016, Stephan Gambke
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author Stephan Gambke
+@since 1.0
+@ingroup Skins
+-->
+<structure xmlns="https://cmln.github.io/chameleon/schema/1.0/layout.rng">
+
+ <component type="NavbarHorizontal" class="full-width no-margin no-bottom-border">
+ <component type="Menu" message="secondary-menu"/>
+ </component>
+
+ <component type="NavbarHorizontal" class="full-width">
+ <modification type="Sticky"/>
+ <component type="Logo" position="head"/>
+ <component type="NavMenu" flatten="navigation" showTools="no" showLanguages="no"/>
+ <component type="PageTools" position="right" hideSelectedNameSpace="yes"/>
+ <component type="SearchBar" position="right"/>
+ <component type="PersonalTools" position="right"/>
+ </component>
+
+ <grid>
+ <row>
+ <cell span="12">
+ <component type="SiteNotice"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="MainContent"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="ToolbarHorizontal" hideTools="no" hideLanguages="no"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="12">
+ <component type="FooterInfo"/>
+ </cell>
+ </row>
+
+ <row>
+ <cell span="6">
+ <component type="FooterPlaces"/>
+ </cell>
+ <cell span="6">
+ <component type="FooterIcons"/>
+ </cell>
+ </row>
+ </grid>
+</structure>
diff --git a/www/wiki/skins/chameleon/maintenance/validateLayout.php b/www/wiki/skins/chameleon/maintenance/validateLayout.php
new file mode 100644
index 00000000..e555847a
--- /dev/null
+++ b/www/wiki/skins/chameleon/maintenance/validateLayout.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Validates layout files.
+ *
+ * @copyright (C) 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+
+function libxml_display_error( $error ) {
+ $return = '';
+
+ switch ( $error->level ) {
+ case LIBXML_ERR_WARNING:
+ $return .= "Warning $error->code: ";
+ break;
+ case LIBXML_ERR_ERROR:
+ $return .= "Error $error->code: ";
+ break;
+ case LIBXML_ERR_FATAL:
+ $return .= "Fatal Error $error->code: ";
+ break;
+ }
+
+ $return .= trim( $error->message );
+
+ if ( $error->file ) {
+ $return .= " in $error->file";
+ }
+
+ $return .= " on line $error->line\n";
+
+ return $return;
+}
+
+function libxml_display_errors() {
+
+ $errors = libxml_get_errors();
+
+ print "\n";
+
+ foreach ( $errors as $error ) {
+ print libxml_display_error( $error );
+ }
+
+ print "\n";
+
+ libxml_clear_errors();
+}
+
+// FIXME: WTF? Move into validateFile()?
+libxml_use_internal_errors( true );
+
+function validateFile( $filename ) {
+
+ print $filename . ': ';
+
+ if ( !file_exists( $filename ) ) {
+ print "File not found.\n";
+ return;
+ }
+
+ if ( !is_file( $filename ) ) {
+ print "Not a file.\n";
+ return;
+ }
+
+ $xml = new DOMDocument();
+ $xml->load( $filename );
+
+ if ( !$xml->relaxNGValidate( 'https://cmln.github.io/chameleon/schema/1.0/layout.rng' ) ) {
+ libxml_display_errors();
+ } else {
+ print "Ok!\n";
+ }
+}
+
+$files = $argv;
+array_shift( $files );
+foreach ( $files as $file ) {
+ validateFile( $file );
+}
diff --git a/www/wiki/skins/chameleon/package.json b/www/wiki/skins/chameleon/package.json
new file mode 100644
index 00000000..f3ee8f88
--- /dev/null
+++ b/www/wiki/skins/chameleon/package.json
@@ -0,0 +1,37 @@
+{
+ "scripts": {
+ "pretest": "npm install",
+ "test": "grunt test",
+ "lint": "grunt lint",
+ "prebuild": "npm install",
+ "build:sticky": "mkdir -p resources/js/sticky-kit && browserify node_modules/sticky-kit/dist/sticky-kit.js -o resources/js/sticky-kit/jquery.sticky-kit.js",
+ "build:docs": "grep -rl 'docs/' -e '<!-- START doctoc'|xargs doctoc --title '**Contents**' --maxlevel 3 --notitle",
+ "build": "npm run build:sticky && npm run build:docs"
+ },
+ "devDependencies": {
+ "browserify": "^13.1.0",
+ "browserify-shim": "^3.8.12",
+ "doctoc": "^1.2.0",
+ "grunt": "^0.4.0",
+ "grunt-banana-checker": "^0.4.0",
+ "grunt-cli": "^0.1.13",
+ "grunt-contrib-jshint": "^1.0.0",
+ "grunt-jsonlint": "^1.0.7"
+ },
+ "dependencies": {
+ "sticky-kit": "^1.1.3"
+ },
+ "browserify-shim": {
+ "../../resources/lib/jquery/jquery.js": {
+ "exports": [
+ "jquery",
+ "$"
+ ]
+ }
+ },
+ "browserify": {
+ "transform": [
+ "browserify-shim"
+ ]
+ }
+}
diff --git a/www/wiki/skins/chameleon/phpunit.xml.dist b/www/wiki/skins/chameleon/phpunit.xml.dist
new file mode 100644
index 00000000..b3d5a782
--- /dev/null
+++ b/www/wiki/skins/chameleon/phpunit.xml.dist
@@ -0,0 +1,55 @@
+<!--
+This file is part of the MediaWiki skin Chameleon.
+
+@copyright 2013 - 2014, Stephan Gambke, mwjames
+@license GNU General Public License, version 3 (or any later version)
+
+The Chameleon skin is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your option) any
+later version.
+
+The Chameleon skin is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+@author mwjames
+@author Stephan Gambke
+@since 1.0
+@ingroup Skins
+-->
+<phpunit backupGlobals="false"
+ backupStaticAttributes="false"
+ bootstrap="tests/bootstrap.php"
+ cacheTokens="false"
+ colors="true"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ beStrictAboutOutputDuringTests="true"
+ beStrictAboutTestsThatDoNotTestAnything="true"
+ checkForUnintentionallyCoveredCode="false"
+ verbose="true">
+ <testsuites>
+ <testsuite name="skins-chameleon">
+ <directory>tests/phpunit</directory>
+ </testsuite>
+ </testsuites>
+ <filter>
+ <whitelist addUncoveredFilesFromWhitelist="true">
+ <directory suffix=".php">src</directory>
+ <directory suffix=".php">tests/Util</directory>
+ </whitelist>
+ </filter>
+ <php>
+ <const name="USE_EXTERNAL_HTML_VALIDATOR" value="false"/>
+ </php>
+</phpunit>
diff --git a/www/wiki/skins/chameleon/resources/i18n/ar.json b/www/wiki/skins/chameleon/resources/i18n/ar.json
new file mode 100644
index 00000000..85ee6b98
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ar.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Khaled",
+ "ديفيد"
+ ]
+ },
+ "skinname-chameleon": "حرباء",
+ "chameleon-desc": "تصميم الحرباء",
+ "chameleon-loggedin": "تم تسجيل دخولك كـ $1.",
+ "chameleon-notloggedin": "لم تسجل الدخول.",
+ "chameleon-newmessages": "لديك رسالة جديدة.",
+ "chameleon-nonewmessages": "ليست لديك رسائل جديدة."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/arq.json b/www/wiki/skins/chameleon/resources/i18n/arq.json
new file mode 100644
index 00000000..f23f0e7d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/arq.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bachounda",
+ "Oldstoneage"
+ ]
+ },
+ "chameleon-desc": "تصميم التاتا",
+ "chameleon-loggedin": "راك سجلت دخلتك كـ $1.",
+ "chameleon-notloggedin": "ما راكش مسجّل الدخول تاعك.",
+ "chameleon-newmessages": "عندك براوات جدُد.",
+ "chameleon-nonewmessages": "ما عندكش براوات جدُد."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ast.json b/www/wiki/skins/chameleon/resources/i18n/ast.json
new file mode 100644
index 00000000..20a1685a
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ast.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Xuacu"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "El tema Chameleon.",
+ "chameleon-loggedin": "Aniciasti sesión como $1.",
+ "chameleon-notloggedin": "Nun aniciasti sesión",
+ "chameleon-newmessages": "Tienes mensaxes nuevos.",
+ "chameleon-nonewmessages": "Nun tienes mensaxes nuevos."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/av.json b/www/wiki/skins/chameleon/resources/i18n/av.json
new file mode 100644
index 00000000..7b42a9e7
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/av.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Gazimagomedov"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Chameleon сипат-сурат.",
+ "chameleon-loggedin": "Мун $1 гIадин жаниве лъугьана",
+ "chameleon-notloggedin": "Мун жаниве лъугьун гьечIо",
+ "chameleon-newmessages": "Духъе цIиял кагътал руго.",
+ "chameleon-nonewmessages": "Духъе цIиял кагътал гьечIо."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/azb.json b/www/wiki/skins/chameleon/resources/i18n/azb.json
new file mode 100644
index 00000000..dd2f684d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/azb.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Koroğlu",
+ "Ilğım"
+ ]
+ },
+ "chameleon-newmessages": "یئنی مساژلارینیز واردیر."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ba.json b/www/wiki/skins/chameleon/resources/i18n/ba.json
new file mode 100644
index 00000000..24af1f43
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ba.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Рустам Нурыев",
+ "Sagan"
+ ]
+ },
+ "chameleon-desc": "Chameleon биҙәү темаһы.",
+ "chameleon-loggedin": "Һеҙ $1 булып танылғанһығыҙ.",
+ "chameleon-notloggedin": "Һеҙ танылмағанһығыҙ.",
+ "chameleon-newmessages": "Һеҙгә яңы хәбәрҙәр бар",
+ "chameleon-nonewmessages": "Һеҙгә яңы хәбәрҙәр юҡ."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/bcc.json b/www/wiki/skins/chameleon/resources/i18n/bcc.json
new file mode 100644
index 00000000..a542d164
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/bcc.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Baloch Afghanistan"
+ ]
+ },
+ "chameleon-loggedin": "شما سایتِ تا $1 داخل بوته گیت",
+ "chameleon-notloggedin": "شما تا هنون سایتِ تا داخل نه بوته ایت"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/bcl.json b/www/wiki/skins/chameleon/resources/i18n/bcl.json
new file mode 100644
index 00000000..24a3c482
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/bcl.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Geopoet"
+ ]
+ },
+ "chameleon-newmessages": "Ika igwa nin baguhong mga mensahe.",
+ "chameleon-nonewmessages": "Ika mayo nin baguhong mga mensahe."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/be-tarask.json b/www/wiki/skins/chameleon/resources/i18n/be-tarask.json
new file mode 100644
index 00000000..14c2e96e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/be-tarask.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Red Winged Duck"
+ ]
+ },
+ "skinname-chameleon": "Хамэлеон",
+ "chameleon-desc": "Тэма афармленьня «Хамэлеон».",
+ "chameleon-loggedin": "Вы ўвайшлі як $1.",
+ "chameleon-notloggedin": "Вы не ўвайшлі ў сыстэму",
+ "chameleon-newmessages": "Вы маеце новыя паведамленьні.",
+ "chameleon-nonewmessages": "У вас няма новых паведамленьняў."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/bg.json b/www/wiki/skins/chameleon/resources/i18n/bg.json
new file mode 100644
index 00000000..8c7778dc
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/bg.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "DCLXVI",
+ "StanProg"
+ ]
+ },
+ "skinname-chameleon": "Хамелеон",
+ "chameleon-desc": "Облик „Хамелеон“",
+ "chameleon-loggedin": "Вие сте влезли като $1.",
+ "chameleon-notloggedin": "Вие не сте влезли в системата",
+ "chameleon-newmessages": "Имате нови съобщения.",
+ "chameleon-nonewmessages": "Нямате нови съобщения."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/bn.json b/www/wiki/skins/chameleon/resources/i18n/bn.json
new file mode 100644
index 00000000..7be9e1aa
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/bn.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Aftab1995",
+ "Aftabuzzaman",
+ "আজিজ"
+ ]
+ },
+ "chameleon-desc": "বহুরূপী আবরণ",
+ "chameleon-loggedin": "আপনি $1 হিসাবে প্রবেশ করেছেন।",
+ "chameleon-notloggedin": "আপনি প্রবেশ করেন নি",
+ "chameleon-newmessages": "আপনার নতুন বার্তা এসেছে।",
+ "chameleon-nonewmessages": "আপনার কোন নতুন বার্তা নেই।"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/br.json b/www/wiki/skins/chameleon/resources/i18n/br.json
new file mode 100644
index 00000000..5b8f92de
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/br.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Y-M D",
+ "Fulup"
+ ]
+ },
+ "skinname-chameleon": "Kameleon",
+ "chameleon-desc": "Gwisk Kameleon",
+ "chameleon-loggedin": "Kevreet oc'h evel $1.",
+ "chameleon-notloggedin": "N'hoc'h ket kevreet.",
+ "chameleon-newmessages": "Kemennadennoù nevez hoc'h eus.",
+ "chameleon-nonewmessages": "N'hoc'h eus kemennadenn nevez ."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/bs.json b/www/wiki/skins/chameleon/resources/i18n/bs.json
new file mode 100644
index 00000000..113f527a
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/bs.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Palapa",
+ "Srdjan m"
+ ]
+ },
+ "skinname-chameleon": "Kameleon",
+ "chameleon-desc": "Tema \"Kameleon\"",
+ "chameleon-loggedin": "Prijavljeni ste kao $1.",
+ "chameleon-notloggedin": "Niste prijavljeni.",
+ "chameleon-newmessages": "Imate nove poruke.",
+ "chameleon-nonewmessages": "Nemate nove poruke."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ca.json b/www/wiki/skins/chameleon/resources/i18n/ca.json
new file mode 100644
index 00000000..043ea50e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ca.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Fitoschido",
+ "Alvaro Vidal-Abarca",
+ "Toniher"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "L’aparença Chameleon.",
+ "chameleon-loggedin": "Esteu connectat com a $1.",
+ "chameleon-notloggedin": "No esteu connectat.",
+ "chameleon-newmessages": "Teniu missatges nous.",
+ "chameleon-nonewmessages": "No teniu missatges nous."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ce.json b/www/wiki/skins/chameleon/resources/i18n/ce.json
new file mode 100644
index 00000000..24fd8abb
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ce.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Умар"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Кечъяран тема Chameleon.",
+ "chameleon-loggedin": "Ахьа болх беш бу $1 санна.",
+ "chameleon-notloggedin": "Системин довзийтар",
+ "chameleon-newmessages": "Хьуна кхаьчна керла хаам.",
+ "chameleon-nonewmessages": "Хьан бац керла хаам."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/cs.json b/www/wiki/skins/chameleon/resources/i18n/cs.json
new file mode 100644
index 00000000..19778932
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/cs.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mormegil"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Vzhled Chameleon",
+ "chameleon-loggedin": "Jste {{GENDER:|přihlášen|přihlášena|přihlášeni}} jako $1.",
+ "chameleon-notloggedin": "Nejste přihlášeni",
+ "chameleon-newmessages": "Máte nové zprávy.",
+ "chameleon-nonewmessages": "Nemáte žádné nové zprávy."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/csb.json b/www/wiki/skins/chameleon/resources/i18n/csb.json
new file mode 100644
index 00000000..f7b248a0
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/csb.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kaszeba"
+ ]
+ },
+ "skinname-chameleon": "Kaméleòn",
+ "chameleon-desc": "Skórka Kaméleòn",
+ "chameleon-loggedin": "Jes wlogòwóny jakno $1.",
+ "chameleon-notloggedin": "Nie jes wlogòwóny",
+ "chameleon-newmessages": "Môsz nowé wiadła",
+ "chameleon-nonewmessages": "Nié môsz nowich wiadłów"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/da.json b/www/wiki/skins/chameleon/resources/i18n/da.json
new file mode 100644
index 00000000..10753dda
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/da.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Joedalton"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Temaet Chameleon",
+ "chameleon-loggedin": "Du er logget ind som $1.",
+ "chameleon-notloggedin": "Du er ikke logget ind.",
+ "chameleon-newmessages": "Du har nye beskeder.",
+ "chameleon-nonewmessages": "Du har ingen nye beskeder."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/de.json b/www/wiki/skins/chameleon/resources/i18n/de.json
new file mode 100644
index 00000000..63677cc7
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/de.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Metalhead64",
+ "Kghbln"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Stellt eine auf Twitter Bootstrap gestützte Benutzeroberfläche bereit",
+ "chameleon-loggedin": "Du bist als $1 angemeldet.",
+ "chameleon-notloggedin": "Du bist nicht angemeldet",
+ "chameleon-newmessages": "Du hast neue Nachrichten.",
+ "chameleon-nonewmessages": "Du hast keine neuen Nachrichten."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/diq.json b/www/wiki/skins/chameleon/resources/i18n/diq.json
new file mode 100644
index 00000000..f237be27
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/diq.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": [
+ "Gorizon",
+ "Mirzali",
+ "Kumkumuk",
+ "1917 Ekim Devrimi"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Becna marmariceke",
+ "chameleon-loggedin": "$1 nameya şıma ronıştış akerd o.",
+ "chameleon-notloggedin": "Şıma ronıştış nêakerd o.",
+ "chameleon-newmessages": "Şımaré mesaco newe esto",
+ "chameleon-nonewmessages": "Şımaré mesaco newe çıni yo"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/dty.json b/www/wiki/skins/chameleon/resources/i18n/dty.json
new file mode 100644
index 00000000..05290698
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/dty.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Nirajan pant"
+ ]
+ },
+ "chameleon-loggedin": "तम $1का रूपमी लगइन होइरैछऽ।",
+ "chameleon-notloggedin": "तमले लगइन नाइँअरिराख्याऽ।",
+ "chameleon-newmessages": "तम खिलाइ नौला सन्देशअन छन।",
+ "chameleon-nonewmessages": "तम खिलाइ कोइ लै नौलो सन्देश नाइँथिन।"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/el.json b/www/wiki/skins/chameleon/resources/i18n/el.json
new file mode 100644
index 00000000..9e9bf714
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/el.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Nikosguard",
+ "Glavkos"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Θέμα εμφάνισης The Chameleon",
+ "chameleon-loggedin": "Έχετε συνδεθεί ως $1.",
+ "chameleon-notloggedin": "Δεν έχετε συνδεθεί",
+ "chameleon-newmessages": "Έχετε νέα μηνύματα.",
+ "chameleon-nonewmessages": "Δεν έχετε νέα μηνύματα."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/en.json b/www/wiki/skins/chameleon/resources/i18n/en.json
new file mode 100644
index 00000000..29713b3a
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/en.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Stephan Gambke"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "The Chameleon skin",
+ "chameleon-loggedin": "You are logged in as $1.",
+ "chameleon-notloggedin": "You are not logged in.",
+ "chameleon-newmessages": "You have new messages.",
+ "chameleon-nonewmessages": "You have no new messages."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/es.json b/www/wiki/skins/chameleon/resources/i18n/es.json
new file mode 100644
index 00000000..99bd5c2b
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/es.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Fitoschido"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "La apariencia Chameleon.",
+ "chameleon-loggedin": "Has accedido como $1.",
+ "chameleon-notloggedin": "No has accedido",
+ "chameleon-newmessages": "Tienes mensajes nuevos.",
+ "chameleon-nonewmessages": "No tienes mensajes nuevos."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/eu.json b/www/wiki/skins/chameleon/resources/i18n/eu.json
new file mode 100644
index 00000000..ea340ad1
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/eu.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Subi",
+ "Mikel Ibaiba"
+ ]
+ },
+ "skinname-chameleon": "Kamaleoia",
+ "chameleon-desc": "Kamaleoiaren azala",
+ "chameleon-loggedin": "$1 bezala saioa hasita daukazu.",
+ "chameleon-notloggedin": "Ez duzu saioa hasi.",
+ "chameleon-newmessages": "Mezu berriak dituzu",
+ "chameleon-nonewmessages": "Ez duzu mezu berririk"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/fa.json b/www/wiki/skins/chameleon/resources/i18n/fa.json
new file mode 100644
index 00000000..bd47ae1c
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/fa.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Reza1615",
+ "Alirezaaa"
+ ]
+ },
+ "skinname-chameleon": "آفتابپرست",
+ "chameleon-desc": "پوسته آفتاب‌پرست.",
+ "chameleon-loggedin": "شما به عنوان $1 وارد شدید.",
+ "chameleon-notloggedin": "شما وارد نشده‌ايد",
+ "chameleon-newmessages": "پیام‌های جدیدی دارید",
+ "chameleon-nonewmessages": "پیام تازه ندارید."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/fi.json b/www/wiki/skins/chameleon/resources/i18n/fi.json
new file mode 100644
index 00000000..899dde97
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/fi.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "McSalama",
+ "01miki10",
+ "Nike"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "The Chameleon-teema",
+ "chameleon-loggedin": "Olet kirjautunut sisään nimellä $1.",
+ "chameleon-notloggedin": "Et ole kirjautunut sisään.",
+ "chameleon-newmessages": "Sinulla on uusia viestejä.",
+ "chameleon-nonewmessages": "Sinulla ei ole uusia viestejä."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/fo.json b/www/wiki/skins/chameleon/resources/i18n/fo.json
new file mode 100644
index 00000000..6fd0a1f8
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/fo.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "EileenSanda"
+ ]
+ },
+ "chameleon-desc": "Chameleon útsjóndin",
+ "chameleon-loggedin": "Tú ert innritað/ur sum $1.",
+ "chameleon-notloggedin": "Tú ert ikki innritað/ur.",
+ "chameleon-newmessages": "Tú hevur nýggj boð.",
+ "chameleon-nonewmessages": "Tú hevur ongi nýggj boð."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/fr.json b/www/wiki/skins/chameleon/resources/i18n/fr.json
new file mode 100644
index 00000000..a75b9e66
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/fr.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Gomoko",
+ "Orlodrim",
+ "Verdy p"
+ ]
+ },
+ "skinname-chameleon": "Caméléon",
+ "chameleon-desc": "L’habillage Caméléon.",
+ "chameleon-loggedin": "Vous êtes connecté{{GENDER:$1||e}} en tant que $1.",
+ "chameleon-notloggedin": "Vous n’êtes pas connecté(e).",
+ "chameleon-newmessages": "Vous avez de nouveaux messages.",
+ "chameleon-nonewmessages": "Vous n’avez aucun nouveau message."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/gcr.json b/www/wiki/skins/chameleon/resources/i18n/gcr.json
new file mode 100644
index 00000000..aa325220
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/gcr.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "LeGuyanaisPure"
+ ]
+ },
+ "skinname-chameleon": "Kaméléyon",
+ "chameleon-desc": "Abiyaj Kaméléyon."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/gl.json b/www/wiki/skins/chameleon/resources/i18n/gl.json
new file mode 100644
index 00000000..7644da8e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/gl.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Elisardojm"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "A aparencia Chameleon.",
+ "chameleon-loggedin": "Está conectado como $1.",
+ "chameleon-notloggedin": "Non está conectado.",
+ "chameleon-newmessages": "Ten mensaxes novas.",
+ "chameleon-nonewmessages": "Non ten mensaxes novas."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/got.json b/www/wiki/skins/chameleon/resources/i18n/got.json
new file mode 100644
index 00000000..50790b1f
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/got.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Gothicspeaker"
+ ]
+ },
+ "chameleon-notloggedin": "𐌽𐌹 𐌹𐍃 𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐍃/𐌰𐍄𐌲𐌰𐌲𐌲𐌰𐌽𐌰."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/gu.json b/www/wiki/skins/chameleon/resources/i18n/gu.json
new file mode 100644
index 00000000..6b253bd0
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/gu.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "KartikMistry"
+ ]
+ },
+ "chameleon-newmessages": "તમારા માટે નવા સંદેશાઓ છે.",
+ "chameleon-nonewmessages": "તમારા માટે કોઇ નવા સંદેશાઓ નથી."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/he.json b/www/wiki/skins/chameleon/resources/i18n/he.json
new file mode 100644
index 00000000..61b22994
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/he.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Amire80"
+ ]
+ },
+ "skinname-chameleon": "זיקית",
+ "chameleon-desc": "עיצוב זיקית",
+ "chameleon-loggedin": "נכנסת בשם $1.",
+ "chameleon-notloggedin": "לא נכנסת",
+ "chameleon-newmessages": "יש לך הודעות חדשות",
+ "chameleon-nonewmessages": "אין לך הודעות חדשות."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/hi.json b/www/wiki/skins/chameleon/resources/i18n/hi.json
new file mode 100644
index 00000000..999394a8
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/hi.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Siddhartha Ghai",
+ "Sfic"
+ ]
+ },
+ "skinname-chameleon": "केमेलोन",
+ "chameleon-desc": "कैमिलियन (गिरगिट) त्वचा",
+ "chameleon-loggedin": "आप $1 खाते में लॉग्ड इन हैं।",
+ "chameleon-notloggedin": "आप लॉग्ड इन नहीं हैं।",
+ "chameleon-newmessages": "आपके लिए नए सन्देश हैं।",
+ "chameleon-nonewmessages": "आपके लिए कोई नए सन्देश नहीं हैं।"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/hr.json b/www/wiki/skins/chameleon/resources/i18n/hr.json
new file mode 100644
index 00000000..1f43a712
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/hr.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bugoslav"
+ ]
+ },
+ "chameleon-desc": "Tema dizajna Chameleon",
+ "chameleon-loggedin": "Prijavljeni ste pod suradničkim imenom $1.",
+ "chameleon-notloggedin": "Trenutačno niste prijavljeni.",
+ "chameleon-newmessages": "Imate nove poruke.",
+ "chameleon-nonewmessages": "Trenutačno nemate novih poruka."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/hu.json b/www/wiki/skins/chameleon/resources/i18n/hu.json
new file mode 100644
index 00000000..f33a834e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/hu.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Tacsipacsi"
+ ]
+ },
+ "chameleon-desc": "A Kaméleon felület",
+ "chameleon-loggedin": "Be vagy jelentkezve $1 néven.",
+ "chameleon-notloggedin": "Nem vagy bejelentkezve.",
+ "chameleon-newmessages": "Új üzeneteid vannak.",
+ "chameleon-nonewmessages": "Nincsenek új üzeneteid."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/hy.json b/www/wiki/skins/chameleon/resources/i18n/hy.json
new file mode 100644
index 00000000..91604065
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/hy.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Vahe Gharakhanyan"
+ ]
+ },
+ "chameleon-loggedin": "Դուք մտել եք որպես $1:",
+ "chameleon-notloggedin": "Դուք չեք մտել համակարգ:",
+ "chameleon-newmessages": "Դուք նոր ուղերձներ ունեք:",
+ "chameleon-nonewmessages": "Դուք նոր ուղերձներ չունեք:"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ia.json b/www/wiki/skins/chameleon/resources/i18n/ia.json
new file mode 100644
index 00000000..8efa24fa
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ia.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "McDutchie"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Le apparentia Chameleon.",
+ "chameleon-loggedin": "Tu ha aperite session como $1.",
+ "chameleon-notloggedin": "Tu non ha aperite session",
+ "chameleon-newmessages": "Tu ha nove messages.",
+ "chameleon-nonewmessages": "Tu non ha nove messages."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/id.json b/www/wiki/skins/chameleon/resources/i18n/id.json
new file mode 100644
index 00000000..b88badb9
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/id.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Arifin.wijaya"
+ ]
+ },
+ "skinname-chameleon": "Bunglon",
+ "chameleon-desc": "Kulit Bunglon.",
+ "chameleon-loggedin": "Anda telah masuk log sebagai $1.",
+ "chameleon-notloggedin": "Anda belum masuk log",
+ "chameleon-newmessages": "Anda memiliki pesan baru.",
+ "chameleon-nonewmessages": "Anda tidak memiliki pesan baru."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/is.json b/www/wiki/skins/chameleon/resources/i18n/is.json
new file mode 100644
index 00000000..dd348165
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/is.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sveinn í Felli"
+ ]
+ },
+ "skinname-chameleon": "Kamelljón",
+ "chameleon-desc": "Kamelljón-skinnið",
+ "chameleon-loggedin": "Þú ert skráð/ur inn sem $1",
+ "chameleon-notloggedin": "Þú ert ekki skráð/ur inn.",
+ "chameleon-newmessages": "Þú átt ný skilaboð.",
+ "chameleon-nonewmessages": "Þú átt engin ný skilaboð."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/it.json b/www/wiki/skins/chameleon/resources/i18n/it.json
new file mode 100644
index 00000000..b5390475
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/it.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Beta16",
+ "Selven"
+ ]
+ },
+ "skinname-chameleon": "Camaleonte",
+ "chameleon-desc": "Tema Chameleon‎",
+ "chameleon-loggedin": "Hai effettuato l'accesso come $1.",
+ "chameleon-notloggedin": "Non hai effettuato l'accesso",
+ "chameleon-newmessages": "Hai nuovi messaggi.",
+ "chameleon-nonewmessages": "Non hai nuovi messaggi."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ja.json b/www/wiki/skins/chameleon/resources/i18n/ja.json
new file mode 100644
index 00000000..8e1f6241
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ja.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Shirayuki",
+ "SkyDaisy9",
+ "2nd-player"
+ ]
+ },
+ "skinname-chameleon": "カメレオン",
+ "chameleon-desc": "カメレオン・スキン",
+ "chameleon-loggedin": "$1 としてログインしています。",
+ "chameleon-notloggedin": "ログインしていません。",
+ "chameleon-newmessages": "新着メッセージがあります。",
+ "chameleon-nonewmessages": "新しいメッセージはありません。"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/jv.json b/www/wiki/skins/chameleon/resources/i18n/jv.json
new file mode 100644
index 00000000..2c3e4074
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/jv.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "NoiX180"
+ ]
+ },
+ "skinname-chameleon": "Bunglon",
+ "chameleon-desc": "Ules bunglon",
+ "chameleon-loggedin": "Panjenengan mlebu log minangka $1.",
+ "chameleon-notloggedin": "Panjenengan durung mlebu log",
+ "chameleon-newmessages": "Panjenengan éntuk layang anyar.",
+ "chameleon-nonewmessages": "Panjenengan ora duwé layang anyar."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/kab.json b/www/wiki/skins/chameleon/resources/i18n/kab.json
new file mode 100644
index 00000000..7176d98e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/kab.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Belkacem77"
+ ]
+ },
+ "skinname-chameleon": "Tata",
+ "chameleon-desc": "Asentel n ucebbeḥ Tata",
+ "chameleon-loggedin": "Teqqneḍ s yisem $1.",
+ "chameleon-notloggedin": "Ur teqqined ara.",
+ "chameleon-newmessages": "Ɣur-k iznan imaynuten.",
+ "chameleon-nonewmessages": "Ur ɣur-k ara iznan imaynuten."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/km.json b/www/wiki/skins/chameleon/resources/i18n/km.json
new file mode 100644
index 00000000..5588c4ae
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/km.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "គីមស៊្រុន"
+ ]
+ },
+ "chameleon-loggedin": "អ្នកកំពុងកត់ឈ្មោះចូលជា $1។",
+ "chameleon-notloggedin": "អ្នកមិនទាន់កត់ឈ្មោះចូលទេ។",
+ "chameleon-newmessages": "អ្នកមានសារថ្មីៗ។",
+ "chameleon-nonewmessages": "អ្នកគ្មានសារថ្មីៗទេ។"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ko-kp.json b/www/wiki/skins/chameleon/resources/i18n/ko-kp.json
new file mode 100644
index 00000000..082faa0a
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ko-kp.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Delim"
+ ]
+ },
+ "chameleon-loggedin": "$1님으로 가입하고있습니다.",
+ "chameleon-notloggedin": "가입하고있지 않습니다.",
+ "chameleon-newmessages": "새 통보문이 있습니다.",
+ "chameleon-nonewmessages": "새 통보문이 없습니다."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ko.json b/www/wiki/skins/chameleon/resources/i18n/ko.json
new file mode 100644
index 00000000..d1f568ea
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ko.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "아라"
+ ]
+ },
+ "skinname-chameleon": "카멜레온",
+ "chameleon-desc": "카멜레온 스킨",
+ "chameleon-loggedin": "$1님으로 로그인하고 있습니다.",
+ "chameleon-notloggedin": "로그인하고 있지 않습니다.",
+ "chameleon-newmessages": "새 메시지가 있습니다.",
+ "chameleon-nonewmessages": "새 메시지가 없습니다."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ksh.json b/www/wiki/skins/chameleon/resources/i18n/ksh.json
new file mode 100644
index 00000000..9ce23799
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ksh.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Purodha"
+ ]
+ },
+ "chameleon-desc": "De Kamehlejonn-Bovverfläsch.",
+ "chameleon-loggedin": "Do be als $1 enjelogg.",
+ "chameleon-notloggedin": "Do bes nit enjelogg.",
+ "chameleon-newmessages": "Do häs neu Nohreeschte.",
+ "chameleon-nonewmessages": "Do häs kein neu Nohreeschte."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/lb.json b/www/wiki/skins/chameleon/resources/i18n/lb.json
new file mode 100644
index 00000000..a0c8d771
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/lb.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Robby"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "D'Chameleon Ausgesinn.",
+ "chameleon-loggedin": "Dir sidd als $1 ageloggt.",
+ "chameleon-notloggedin": "Dir sidd net ageloggt",
+ "chameleon-newmessages": "Dir hutt nei Messagen.",
+ "chameleon-nonewmessages": "Dir hutt keng nei Messagen."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/lt.json b/www/wiki/skins/chameleon/resources/i18n/lt.json
new file mode 100644
index 00000000..8c2779d1
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/lt.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Eitvys200"
+ ]
+ },
+ "chameleon-desc": "Chameleon išvaizda",
+ "chameleon-loggedin": "Jūs esate prisijungęs kaip $1.",
+ "chameleon-notloggedin": "Jūs esate neprisijungęs.",
+ "chameleon-newmessages": "Jūs turite naujų žinučių.",
+ "chameleon-nonewmessages": "Jūs neturite naujų pranešimų."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/lzh.json b/www/wiki/skins/chameleon/resources/i18n/lzh.json
new file mode 100644
index 00000000..16c43038
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/lzh.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "SolidBlock"
+ ]
+ },
+ "chameleon-loggedin": "君登與$1。",
+ "chameleon-notloggedin": "未入簿。",
+ "chameleon-newmessages": "新訊",
+ "chameleon-nonewmessages": "無新訊"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/mg.json b/www/wiki/skins/chameleon/resources/i18n/mg.json
new file mode 100644
index 00000000..f1d23bb9
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/mg.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jagwar"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Ny skin chameleon",
+ "chameleon-loggedin": "Tafiditra amin'ny anarana $1 ianao.",
+ "chameleon-notloggedin": "Tsy tafiditra ianao.",
+ "chameleon-newmessages": "Misy hafatra vaovao.",
+ "chameleon-nonewmessages": "Tsy misy hafatra vaovao."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/min.json b/www/wiki/skins/chameleon/resources/i18n/min.json
new file mode 100644
index 00000000..ae0c391b
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/min.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Iwan Novirion"
+ ]
+ },
+ "chameleon-newmessages": "Sanak ado pasan baru.",
+ "chameleon-nonewmessages": "Sanak indak ado pasan baru."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/mk.json b/www/wiki/skins/chameleon/resources/i18n/mk.json
new file mode 100644
index 00000000..869cbf1c
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/mk.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bjankuloski06"
+ ]
+ },
+ "skinname-chameleon": "Камелеон",
+ "chameleon-desc": "Рувото „Камелеон“.",
+ "chameleon-loggedin": "Најавени сте како $1.",
+ "chameleon-notloggedin": "Не сте најавени",
+ "chameleon-newmessages": "Имате нови пораки",
+ "chameleon-nonewmessages": "Немате нови пораки."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/mn.json b/www/wiki/skins/chameleon/resources/i18n/mn.json
new file mode 100644
index 00000000..f6bdf57b
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/mn.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Wisdom"
+ ]
+ },
+ "chameleon-loggedin": "$1 -ээр логин хийгээгүй байна.",
+ "chameleon-notloggedin": "Та логин хийгээгүй байна",
+ "chameleon-newmessages": "Танд шинэ мэдээ ирсэн байна.",
+ "chameleon-nonewmessages": "Танд ямар мэдээ ирээгүй байна."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ms.json b/www/wiki/skins/chameleon/resources/i18n/ms.json
new file mode 100644
index 00000000..1d7b167d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ms.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Aviator"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Rupa Chameleon",
+ "chameleon-loggedin": "Anda telah log masuk sebagai $1.",
+ "chameleon-notloggedin": "Anda belum log masuk",
+ "chameleon-newmessages": "Anda mempunyai pesanan baru.",
+ "chameleon-nonewmessages": "Anda tidak mempunyai pesanan baru."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/my.json b/www/wiki/skins/chameleon/resources/i18n/my.json
new file mode 100644
index 00000000..e632ea6c
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/my.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sanlinnaing",
+ "Lionslayer"
+ ]
+ },
+ "chameleon-notloggedin": "သင်ဟာ log in ဝင်မထားပါဘူး။"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/nah.json b/www/wiki/skins/chameleon/resources/i18n/nah.json
new file mode 100644
index 00000000..28456838
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/nah.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Taresi"
+ ]
+ },
+ "chameleon-desc": "In Chameleon īēhuayo"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/nap.json b/www/wiki/skins/chameleon/resources/i18n/nap.json
new file mode 100644
index 00000000..2f91e807
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/nap.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "C.R."
+ ]
+ },
+ "chameleon-desc": "Skin Chameleon‎.",
+ "chameleon-loggedin": "Siete trasute comme $1.",
+ "chameleon-notloggedin": "Nun site trasuto/a",
+ "chameleon-newmessages": "Avite mmasciate nove.",
+ "chameleon-nonewmessages": "Nun avite mmasciate nove."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/nb.json b/www/wiki/skins/chameleon/resources/i18n/nb.json
new file mode 100644
index 00000000..17d571e0
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/nb.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jon Harald Søby"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Chameleon-drakten.",
+ "chameleon-loggedin": "Du er logget inn som $1.",
+ "chameleon-notloggedin": "Du er ikke logget inn.",
+ "chameleon-newmessages": "Du har nye meldinger.",
+ "chameleon-nonewmessages": "Du har ingen nye meldinger."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/nl.json b/www/wiki/skins/chameleon/resources/i18n/nl.json
new file mode 100644
index 00000000..bbeda0f3
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/nl.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sjoerddebruin",
+ "Siebrand"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Het uiterlijk Chameleon",
+ "chameleon-loggedin": "U bent aangemeld als $1 .",
+ "chameleon-notloggedin": "U bent niet aangemeld",
+ "chameleon-newmessages": "U hebt nieuwe berichten.",
+ "chameleon-nonewmessages": "U hebt geen nieuwe berichten."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/oc.json b/www/wiki/skins/chameleon/resources/i18n/oc.json
new file mode 100644
index 00000000..5c0d2ed5
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/oc.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Cedric31"
+ ]
+ },
+ "chameleon-desc": "L’aparéncia Cameleon.",
+ "chameleon-loggedin": "Sètz connectat en tant que $1.",
+ "chameleon-notloggedin": "Sètz pas connectat.",
+ "chameleon-newmessages": "Avètz de messatges novèls",
+ "chameleon-nonewmessages": "Avètz pas cap de messatges novèls."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/olo.json b/www/wiki/skins/chameleon/resources/i18n/olo.json
new file mode 100644
index 00000000..320db127
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/olo.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mashoi7"
+ ]
+ },
+ "chameleon-loggedin": "Olet kirjutannuhes käyttäjänny $1.",
+ "chameleon-notloggedin": "Et ole kirjutannuhes.",
+ "chameleon-newmessages": "Sinul on uuzii viestilöi.",
+ "chameleon-nonewmessages": "Sinul ei ole uuzii viestilöi."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/pa.json b/www/wiki/skins/chameleon/resources/i18n/pa.json
new file mode 100644
index 00000000..1db53036
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/pa.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Tow"
+ ]
+ },
+ "chameleon-newmessages": "ਤੁਹਾਡੇ ਲਈ ਨਵੇਂ ਸੁਨੇਹੇ ਹਨ।",
+ "chameleon-nonewmessages": "ਤੁਹਾਡੇ ਲਈ ਕੋਈ ਨਵੇਂ ਸੁਨੇਹੇ ਨਹੀੰ ਹਨ।"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/pl.json b/www/wiki/skins/chameleon/resources/i18n/pl.json
new file mode 100644
index 00000000..06661ca0
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/pl.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Matma Rex",
+ "Ty221"
+ ]
+ },
+ "skinname-chameleon": "Kameleon",
+ "chameleon-desc": "Skórka Kameleon.",
+ "chameleon-loggedin": "Jesteś zalogowany jako $1.",
+ "chameleon-notloggedin": "Nie jesteś zalogowany",
+ "chameleon-newmessages": "Masz nowe wiadomości.",
+ "chameleon-nonewmessages": "Nie masz nowych wiadomości."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ps.json b/www/wiki/skins/chameleon/resources/i18n/ps.json
new file mode 100644
index 00000000..666851be
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ps.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ahmed-Najib-Biabani-Ibrahimkhel"
+ ]
+ },
+ "chameleon-desc": "د کامېليون پوښۍ",
+ "chameleon-loggedin": "تاسې د $1 په توگه ننوتلئ.",
+ "chameleon-notloggedin": "تاسې نه ياست ورننوتلي.",
+ "chameleon-newmessages": "تاسې نوي پيغامونه لرئ.",
+ "chameleon-nonewmessages": "تاسې نوي پيغامونه نه لرئ."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/pt-br.json b/www/wiki/skins/chameleon/resources/i18n/pt-br.json
new file mode 100644
index 00000000..4c44ae34
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/pt-br.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jaideraf",
+ "!Silent",
+ "Felipe L. Ewald"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "O tema Chameleon",
+ "chameleon-loggedin": "Você está logado como $1.",
+ "chameleon-notloggedin": "Você não está logado.",
+ "chameleon-newmessages": "Você tem novas mensagens.",
+ "chameleon-nonewmessages": "Você não tem novas mensagens."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/pt.json b/www/wiki/skins/chameleon/resources/i18n/pt.json
new file mode 100644
index 00000000..fd974c8d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/pt.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Vitorvicentevalente"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "O tema Chameleon.",
+ "chameleon-loggedin": "Sessão iniciada como $1.",
+ "chameleon-notloggedin": "Não tem sessão iniciada",
+ "chameleon-newmessages": "Tem novas mensagens.",
+ "chameleon-nonewmessages": "Não tem novas mensagens."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/qqq.json b/www/wiki/skins/chameleon/resources/i18n/qqq.json
new file mode 100644
index 00000000..33fb33d0
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/qqq.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": [
+ "Stephan Gambke",
+ "Shirayuki",
+ "Liuxinyu970226",
+ "Umherirrender"
+ ]
+ },
+ "skinname-chameleon": "{{Optional}}\nThe name of this skin",
+ "chameleon-desc": "{{desc|name=Chameleon|url=https://www.mediawiki.org/wiki/Skin:Chameleon}}",
+ "chameleon-loggedin": "Text shown, when the user is logged in. Parameters:\n* $1 - username\nSee also:\n* {{msg-mw|Chameleon-notloggedin}}",
+ "chameleon-notloggedin": "Text shown, when the user is not logged in.\n\nSee also:\n* {{msg-mw|Chameleon-loggedin}}",
+ "chameleon-newmessages": "Text shown, when the user has new messages.\n\nSee also:\n* {{msg-mw|Chameleon-nonewmessages}}",
+ "chameleon-nonewmessages": "Text shown, when the user has no new messages.\n\nSee also:\n* {{msg-mw|Chameleon-newmessages}}"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ro.json b/www/wiki/skins/chameleon/resources/i18n/ro.json
new file mode 100644
index 00000000..930f82f3
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ro.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Strainu",
+ "Minisarm"
+ ]
+ },
+ "skinname-chameleon": "Cameleon",
+ "chameleon-desc": "Aspectul Cameleon",
+ "chameleon-loggedin": "V-ați autentificat ca $1.",
+ "chameleon-notloggedin": "Nu v-ați autentificat.",
+ "chameleon-newmessages": "Aveți mesaje noi.",
+ "chameleon-nonewmessages": "Nu aveți mesaje noi."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/roa-tara.json b/www/wiki/skins/chameleon/resources/i18n/roa-tara.json
new file mode 100644
index 00000000..96ff57ad
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/roa-tara.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Joetaras"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Skin 'U Camaleonde",
+ "chameleon-loggedin": "Tu è trasute cumme a $1.",
+ "chameleon-notloggedin": "Non gè trasute.",
+ "chameleon-newmessages": "Tìne 'nu messàgge nuève.",
+ "chameleon-nonewmessages": "Non ge tìne messàgge nuève."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ru.json b/www/wiki/skins/chameleon/resources/i18n/ru.json
new file mode 100644
index 00000000..900fb3bd
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ru.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Okras"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Тема оформления Chameleon.",
+ "chameleon-loggedin": "Вы вошли как $1.",
+ "chameleon-notloggedin": "Вы не вошли в систему",
+ "chameleon-newmessages": "У вас есть новые сообщения.",
+ "chameleon-nonewmessages": "У вас нет новых сообщений."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sah.json b/www/wiki/skins/chameleon/resources/i18n/sah.json
new file mode 100644
index 00000000..3e9c3647
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sah.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "HalanTul"
+ ]
+ },
+ "chameleon-desc": "Chameleon.",
+ "chameleon-loggedin": "$1 аатынан киирбиккин.",
+ "chameleon-notloggedin": "Бэлиэ-аатынан киирэ иликкин.",
+ "chameleon-newmessages": "Эйиэхэ саҥа сурук кэлбит.",
+ "chameleon-nonewmessages": "Саҥа сурук кэлэ илик."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/scn.json b/www/wiki/skins/chameleon/resources/i18n/scn.json
new file mode 100644
index 00000000..93e3fe87
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/scn.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Pippinu",
+ "Sarvaturi"
+ ]
+ },
+ "chameleon-desc": "La peddi Chameleon",
+ "chameleon-loggedin": "Trasisti comu $1.",
+ "chameleon-notloggedin": "Nun trasisti.",
+ "chameleon-newmessages": "Hai missaggî novi.",
+ "chameleon-nonewmessages": "Nun hai nuddu missaggiu novu."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sco.json b/www/wiki/skins/chameleon/resources/i18n/sco.json
new file mode 100644
index 00000000..855b6bd1
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sco.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "John Reid"
+ ]
+ },
+ "chameleon-desc": "The Chameleon skin.",
+ "chameleon-loggedin": "Ye'r loggit in aes $1.",
+ "chameleon-notloggedin": "Ye'r no loggit in",
+ "chameleon-newmessages": "Ye hae new messages.",
+ "chameleon-nonewmessages": "Ye'v nae new messages."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sd.json b/www/wiki/skins/chameleon/resources/i18n/sd.json
new file mode 100644
index 00000000..fc283155
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sd.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Aursani",
+ "Mehtab ahmed"
+ ]
+ },
+ "chameleon-loggedin": "توھان $1 نالي سان داخل ٿيل آھيو.",
+ "chameleon-notloggedin": "توھان داخل ٿيل نہ آھيو.",
+ "chameleon-newmessages": "توهان لاءِ نوان نياپا آهن.",
+ "chameleon-nonewmessages": "توهان لاءِ ڪو بہ نئون نياپو نہ آهي."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sgs.json b/www/wiki/skins/chameleon/resources/i18n/sgs.json
new file mode 100644
index 00000000..e800f14c
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sgs.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hugo.arg"
+ ]
+ },
+ "chameleon-loggedin": "Tamsta ī prisijongė̄s kap $1.",
+ "chameleon-notloggedin": "Tamsta nie prisijongė̄s.",
+ "chameleon-newmessages": "Tamstā parė̄jė naujės žėnotės.",
+ "chameleon-nonewmessages": "Pas Tamstā naujū žėnotiu nie."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sl.json b/www/wiki/skins/chameleon/resources/i18n/sl.json
new file mode 100644
index 00000000..24b9df34
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sl.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Dbc334"
+ ]
+ },
+ "chameleon-desc": "Koža Chameleon",
+ "chameleon-loggedin": "Prijavljeni ste kot $1.",
+ "chameleon-notloggedin": "Niste prijavljeni.",
+ "chameleon-newmessages": "Imate nova sporočila.",
+ "chameleon-nonewmessages": "Nimate novih sporočil."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sq.json b/www/wiki/skins/chameleon/resources/i18n/sq.json
new file mode 100644
index 00000000..0f91b81c
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sq.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kosovastar"
+ ]
+ },
+ "chameleon-newmessages": "Ti ke mesazhe të reja.",
+ "chameleon-nonewmessages": "Ti nuk ke mesazhe të reja."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sr-ec.json b/www/wiki/skins/chameleon/resources/i18n/sr-ec.json
new file mode 100644
index 00000000..d4f6ae64
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sr-ec.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Milicevic01",
+ "Obsuser"
+ ]
+ },
+ "skinname-chameleon": "Камелеон",
+ "chameleon-desc": "Тема „Камелеон”",
+ "chameleon-loggedin": "Пријављени сте као $1.",
+ "chameleon-notloggedin": "Нисте пријављени",
+ "chameleon-newmessages": "Имате нових порука.",
+ "chameleon-nonewmessages": "Немате нових порука."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sr-el.json b/www/wiki/skins/chameleon/resources/i18n/sr-el.json
new file mode 100644
index 00000000..0eb88043
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sr-el.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Milicevic01",
+ "Zoranzoki21"
+ ]
+ },
+ "skinname-chameleon": "Kameleon",
+ "chameleon-desc": "Tema „Kameleon”",
+ "chameleon-loggedin": "Prijavljeni ste kao $1.",
+ "chameleon-notloggedin": "Niste prijavljeni",
+ "chameleon-newmessages": "Imate novih poruka.",
+ "chameleon-nonewmessages": "Nemate novih poruka."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/su.json b/www/wiki/skins/chameleon/resources/i18n/su.json
new file mode 100644
index 00000000..1c43ae27
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/su.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kandar",
+ "Uchup19"
+ ]
+ },
+ "skinname-chameleon": "Londok",
+ "chameleon-desc": "Kulit Londok.",
+ "chameleon-loggedin": "Anjeun asup log salaku $1.",
+ "chameleon-notloggedin": "Anjeun can asup log",
+ "chameleon-newmessages": "Aya obrolan anyar.",
+ "chameleon-nonewmessages": "Taya obrolan anyar."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/sv.json b/www/wiki/skins/chameleon/resources/i18n/sv.json
new file mode 100644
index 00000000..4ece3720
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/sv.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Lokal Profil",
+ "WikiPhoenix"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Chameleon-utseendet",
+ "chameleon-loggedin": "Du är inloggad som $1.",
+ "chameleon-notloggedin": "Du är inte inloggad.",
+ "chameleon-newmessages": "Du har nya meddelanden.",
+ "chameleon-nonewmessages": "Du har inga nya meddelanden."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/szl.json b/www/wiki/skins/chameleon/resources/i18n/szl.json
new file mode 100644
index 00000000..caca8832
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/szl.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Krol111"
+ ]
+ },
+ "chameleon-loggedin": "Jeżeś zalogowany kej $1.",
+ "chameleon-notloggedin": "Ńy je żeś zalogowany.",
+ "chameleon-newmessages": "Mosz nowo nowina.",
+ "chameleon-nonewmessages": "Ńy mosz nowych nowin."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ta.json b/www/wiki/skins/chameleon/resources/i18n/ta.json
new file mode 100644
index 00000000..d97db860
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ta.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "ElangoRamanujam"
+ ]
+ },
+ "chameleon-loggedin": "தாங்கள் $1ஆக புகுபதிகை செய்திருக்கிறீர்கள்.",
+ "chameleon-notloggedin": "தாங்கள் புகு பதியவில்லை.",
+ "chameleon-nonewmessages": "தங்களுக்கு புதிய செய்திகள் ஏதுமில்லை."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/tg-cyrl.json b/www/wiki/skins/chameleon/resources/i18n/tg-cyrl.json
new file mode 100644
index 00000000..0f886336
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/tg-cyrl.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "ToJack"
+ ]
+ },
+ "chameleon-newmessages": "Шумо паёми нав доред.",
+ "chameleon-nonewmessages": "Шумо ягон паёми нав надоред."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/tr.json b/www/wiki/skins/chameleon/resources/i18n/tr.json
new file mode 100644
index 00000000..afbee1da
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/tr.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sayginer"
+ ]
+ },
+ "chameleon-loggedin": "$1 olarak oturum açtınız.",
+ "chameleon-notloggedin": "Oturum açmadınız",
+ "chameleon-newmessages": "Yeni mesajınız var.",
+ "chameleon-nonewmessages": "Yeni mesajınız yok."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/tt-cyrl.json b/www/wiki/skins/chameleon/resources/i18n/tt-cyrl.json
new file mode 100644
index 00000000..b063dcae
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/tt-cyrl.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ильнар"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "Chameleon күренеше бизәлеше.",
+ "chameleon-loggedin": "Сез $1 булып кергәнсез.",
+ "chameleon-notloggedin": "Сез системага кермәгәнсез.",
+ "chameleon-newmessages": "Сезнең яңа хатларыгыз бар.",
+ "chameleon-nonewmessages": "Сезнең яңа хатларыгыз юк."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/uk.json b/www/wiki/skins/chameleon/resources/i18n/uk.json
new file mode 100644
index 00000000..14e0a362
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/uk.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Alex Khimich"
+ ]
+ },
+ "skinname-chameleon": "Хамелеон",
+ "chameleon-desc": "Тема оформлення \"Хамелеон\"",
+ "chameleon-loggedin": "Ви увійшли як $1.",
+ "chameleon-notloggedin": "Ви не ввійшли в систему",
+ "chameleon-newmessages": "У Вас є нові повідомлення.",
+ "chameleon-nonewmessages": "У вас немає нових повідомлень."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/ur.json b/www/wiki/skins/chameleon/resources/i18n/ur.json
new file mode 100644
index 00000000..e5cd0381
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/ur.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Muhammad Shuaib"
+ ]
+ },
+ "chameleon-desc": "گرگٹ پوشاک",
+ "chameleon-loggedin": "آپ $1 کے نام سے داخل ہو چکے ہیں۔",
+ "chameleon-notloggedin": "آپ داخل نہیں ہوئے۔",
+ "chameleon-newmessages": "آپ کے لیے نئے پیغام۔",
+ "chameleon-nonewmessages": "آپ کے لیے کوئی نیا پیغام نہیں ہے۔"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/vi.json b/www/wiki/skins/chameleon/resources/i18n/vi.json
new file mode 100644
index 00000000..056fb66f
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/vi.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Minh Nguyen"
+ ]
+ },
+ "skinname-chameleon": "Tắc kè hoa",
+ "chameleon-desc": "Giao diện Tắc kè hoa",
+ "chameleon-loggedin": "Bạn đã đăng nhập với tên $1.",
+ "chameleon-notloggedin": "Bạn chưa đăng nhập",
+ "chameleon-newmessages": "Bạn có tin nhắn mới.",
+ "chameleon-nonewmessages": "Bạn không có tin nhắn mới."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/xmf.json b/www/wiki/skins/chameleon/resources/i18n/xmf.json
new file mode 100644
index 00000000..a39f0c3d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/xmf.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Silovan"
+ ]
+ },
+ "chameleon-loggedin": "თქვა მიშულირჷ რეთ მუჭოთ $1.",
+ "chameleon-notloggedin": "თქვა ვარეთ მიშულირჷ."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/yi.json b/www/wiki/skins/chameleon/resources/i18n/yi.json
new file mode 100644
index 00000000..958b0d9b
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/yi.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "פוילישער"
+ ]
+ },
+ "chameleon-newmessages": "איר האט נײַע מעלדונגען.",
+ "chameleon-nonewmessages": "איר האט נישט קיין נײַע מעלדונגען."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/zgh.json b/www/wiki/skins/chameleon/resources/i18n/zgh.json
new file mode 100644
index 00000000..741097ea
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/zgh.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "ⵕⴰⵊⵉ"
+ ]
+ },
+ "chameleon-newmessages": "ⵍⵍⴰⵏⵜ ⵖⵓⵔⴽ ⵜⵓⵣⵉⵏⵉⵏ ⵜⵉⵎⴰⵢⵏⵓⵜⵉⵏ.",
+ "chameleon-nonewmessages": "ⵓⵔ ⵍⵍⴰⵏⵜ ⵖⵓⵔⴽ ⵜⵓⵣⵉⵏⵉⵏ ⵜⵉⵎⴰⵢⵏⵓⵜⵉⵏ."
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/zh-hans.json b/www/wiki/skins/chameleon/resources/i18n/zh-hans.json
new file mode 100644
index 00000000..199f7efa
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/zh-hans.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Liuxinyu970226",
+ "Apflu"
+ ]
+ },
+ "skinname-chameleon": "变色龙",
+ "chameleon-desc": "变色龙皮肤",
+ "chameleon-loggedin": "您已作为$1登录。",
+ "chameleon-notloggedin": "您尚未登录。",
+ "chameleon-newmessages": "您有新消息。",
+ "chameleon-nonewmessages": "您没有新消息。"
+}
diff --git a/www/wiki/skins/chameleon/resources/i18n/zh-hant.json b/www/wiki/skins/chameleon/resources/i18n/zh-hant.json
new file mode 100644
index 00000000..6a74e4cf
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/i18n/zh-hant.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Cwlin0416",
+ "Liuxinyu970226"
+ ]
+ },
+ "skinname-chameleon": "Chameleon",
+ "chameleon-desc": "變色龍外觀",
+ "chameleon-loggedin": "您已登入為 $1。",
+ "chameleon-notloggedin": "您尚未登入",
+ "chameleon-newmessages": "您有新訊息。",
+ "chameleon-nonewmessages": "你沒有新訊息。"
+}
diff --git a/www/wiki/skins/chameleon/resources/js/Components/Modifications/sticky.js b/www/wiki/skins/chameleon/resources/js/Components/Modifications/sticky.js
new file mode 100644
index 00000000..eadb2fab
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/js/Components/Modifications/sticky.js
@@ -0,0 +1,38 @@
+/**
+ * This file integrates the jQuery Sticky plugin with the Chameleon skin
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+
+/*global window, document, jQuery, mediaWiki */
+
+;( function (window, document, $, mw, undefined) {
+
+ 'use strict';
+
+ mw.loader.using('skin.chameleon.jquery-sticky', function () {
+ $('.sticky').stick_in_parent();
+ });
+
+}(window, document, jQuery, mediaWiki) );
diff --git a/www/wiki/skins/chameleon/resources/js/sticky-kit/jquery.sticky-kit.js b/www/wiki/skins/chameleon/resources/js/sticky-kit/jquery.sticky-kit.js
new file mode 100644
index 00000000..238f77c7
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/js/sticky-kit/jquery.sticky-kit.js
@@ -0,0 +1,273 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+// Generated by CoffeeScript 1.6.2
+/**
+@license Sticky-kit v1.1.3 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
+*/
+
+
+(function() {
+ var $, win;
+
+ $ = this.jQuery || window.jQuery;
+
+ win = $(window);
+
+ $.fn.stick_in_parent = function(opts) {
+ var doc, elm, enable_bottoming, inner_scrolling, manual_spacer, offset_top, outer_width, parent_selector, recalc_every, sticky_class, _fn, _i, _len;
+
+ if (opts == null) {
+ opts = {};
+ }
+ sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming;
+ if (offset_top == null) {
+ offset_top = 0;
+ }
+ if (parent_selector == null) {
+ parent_selector = void 0;
+ }
+ if (inner_scrolling == null) {
+ inner_scrolling = true;
+ }
+ if (sticky_class == null) {
+ sticky_class = "is_stuck";
+ }
+ doc = $(document);
+ if (enable_bottoming == null) {
+ enable_bottoming = true;
+ }
+ outer_width = function(el) {
+ var computed, w, _el;
+
+ if (window.getComputedStyle) {
+ _el = el[0];
+ computed = window.getComputedStyle(el[0]);
+ w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right"));
+ if (computed.getPropertyValue("box-sizing") !== "border-box") {
+ w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right"));
+ }
+ return w;
+ } else {
+ return el.outerWidth(true);
+ }
+ };
+ _fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) {
+ var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick;
+
+ if (elm.data("sticky_kit")) {
+ return;
+ }
+ elm.data("sticky_kit", true);
+ last_scroll_height = doc.height();
+ parent = elm.parent();
+ if (parent_selector != null) {
+ parent = parent.closest(parent_selector);
+ }
+ if (!parent.length) {
+ throw "failed to find stick parent";
+ }
+ fixed = false;
+ bottomed = false;
+ spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : $("<div />");
+ if (spacer) {
+ spacer.css('position', elm.css('position'));
+ }
+ recalc = function() {
+ var border_top, padding_top, restore;
+
+ if (detached) {
+ return;
+ }
+ last_scroll_height = doc.height();
+ border_top = parseInt(parent.css("border-top-width"), 10);
+ padding_top = parseInt(parent.css("padding-top"), 10);
+ padding_bottom = parseInt(parent.css("padding-bottom"), 10);
+ parent_top = parent.offset().top + border_top + padding_top;
+ parent_height = parent.height();
+ if (fixed) {
+ fixed = false;
+ bottomed = false;
+ if (manual_spacer == null) {
+ elm.insertAfter(spacer);
+ spacer.detach();
+ }
+ elm.css({
+ position: "",
+ top: "",
+ width: "",
+ bottom: ""
+ }).removeClass(sticky_class);
+ restore = true;
+ }
+ top = elm.offset().top - (parseInt(elm.css("margin-top"), 10) || 0) - offset_top;
+ height = elm.outerHeight(true);
+ el_float = elm.css("float");
+ if (spacer) {
+ spacer.css({
+ width: outer_width(elm),
+ height: height,
+ display: elm.css("display"),
+ "vertical-align": elm.css("vertical-align"),
+ "float": el_float
+ });
+ }
+ if (restore) {
+ return tick();
+ }
+ };
+ recalc();
+ if (height === parent_height) {
+ return;
+ }
+ last_pos = void 0;
+ offset = offset_top;
+ recalc_counter = recalc_every;
+ tick = function() {
+ var css, delta, recalced, scroll, will_bottom, win_height;
+
+ if (detached) {
+ return;
+ }
+ recalced = false;
+ if (recalc_counter != null) {
+ recalc_counter -= 1;
+ if (recalc_counter <= 0) {
+ recalc_counter = recalc_every;
+ recalc();
+ recalced = true;
+ }
+ }
+ if (!recalced && doc.height() !== last_scroll_height) {
+ recalc();
+ recalced = true;
+ }
+ scroll = win.scrollTop();
+ if (last_pos != null) {
+ delta = scroll - last_pos;
+ }
+ last_pos = scroll;
+ if (fixed) {
+ if (enable_bottoming) {
+ will_bottom = scroll + height + offset > parent_height + parent_top;
+ if (bottomed && !will_bottom) {
+ bottomed = false;
+ elm.css({
+ position: "fixed",
+ bottom: "",
+ top: offset
+ }).trigger("sticky_kit:unbottom");
+ }
+ }
+ if (scroll < top) {
+ fixed = false;
+ offset = offset_top;
+ if (manual_spacer == null) {
+ if (el_float === "left" || el_float === "right") {
+ elm.insertAfter(spacer);
+ }
+ spacer.detach();
+ }
+ css = {
+ position: "",
+ width: "",
+ top: ""
+ };
+ elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick");
+ }
+ if (inner_scrolling) {
+ win_height = win.height();
+ if (height + offset_top > win_height) {
+ if (!bottomed) {
+ offset -= delta;
+ offset = Math.max(win_height - height, offset);
+ offset = Math.min(offset_top, offset);
+ if (fixed) {
+ elm.css({
+ top: offset + "px"
+ });
+ }
+ }
+ }
+ }
+ } else {
+ if (scroll > top) {
+ fixed = true;
+ css = {
+ position: "fixed",
+ top: offset
+ };
+ css.width = elm.css("box-sizing") === "border-box" ? elm.outerWidth() + "px" : elm.width() + "px";
+ elm.css(css).addClass(sticky_class);
+ if (manual_spacer == null) {
+ elm.after(spacer);
+ if (el_float === "left" || el_float === "right") {
+ spacer.append(elm);
+ }
+ }
+ elm.trigger("sticky_kit:stick");
+ }
+ }
+ if (fixed && enable_bottoming) {
+ if (will_bottom == null) {
+ will_bottom = scroll + height + offset > parent_height + parent_top;
+ }
+ if (!bottomed && will_bottom) {
+ bottomed = true;
+ if (parent.css("position") === "static") {
+ parent.css({
+ position: "relative"
+ });
+ }
+ return elm.css({
+ position: "absolute",
+ bottom: padding_bottom,
+ top: "auto"
+ }).trigger("sticky_kit:bottom");
+ }
+ }
+ };
+ recalc_and_tick = function() {
+ recalc();
+ return tick();
+ };
+ detach = function() {
+ detached = true;
+ win.off("touchmove", tick);
+ win.off("scroll", tick);
+ win.off("resize", recalc_and_tick);
+ $(document.body).off("sticky_kit:recalc", recalc_and_tick);
+ elm.off("sticky_kit:detach", detach);
+ elm.removeData("sticky_kit");
+ elm.css({
+ position: "",
+ bottom: "",
+ top: "",
+ width: ""
+ });
+ parent.position("position", "");
+ if (fixed) {
+ if (manual_spacer == null) {
+ if (el_float === "left" || el_float === "right") {
+ elm.insertAfter(spacer);
+ }
+ spacer.remove();
+ }
+ return elm.removeClass(sticky_class);
+ }
+ };
+ win.on("touchmove", tick);
+ win.on("scroll", tick);
+ win.on("resize", recalc_and_tick);
+ $(document.body).on("sticky_kit:recalc", recalc_and_tick);
+ elm.on("sticky_kit:detach", detach);
+ return setTimeout(tick, 0);
+ };
+ for (_i = 0, _len = this.length; _i < _len; _i++) {
+ elm = this[_i];
+ _fn($(elm));
+ }
+ return this;
+ };
+
+}).call(this);
+
+},{}]},{},[1]);
diff --git a/www/wiki/skins/chameleon/resources/styles/Components/Modifications/Sticky.less b/www/wiki/skins/chameleon/resources/styles/Components/Modifications/Sticky.less
new file mode 100644
index 00000000..d7a77e35
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/Components/Modifications/Sticky.less
@@ -0,0 +1,29 @@
+/**
+ * Styles for the Sticky modification
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+.sticky {
+ z-index: 2;
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/Components/NavbarHorizontal.less b/www/wiki/skins/chameleon/resources/styles/Components/NavbarHorizontal.less
new file mode 100644
index 00000000..ab06e51d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/Components/NavbarHorizontal.less
@@ -0,0 +1,238 @@
+/**
+ * Styles for the NavbarHorizontal component
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+// if the navbar is in the first row (i.e. at the top of the page), but inside a
+// container (i.e. not a fixed head), add some margin at the top
+.navbar {
+
+ z-index: 1;
+
+ .container > *:first-child & {
+ margin-top: (@grid-gutter-width / 2);
+ }
+
+ .dropdown-menu {
+
+ list-style: outside none none;
+ z-index: 1010;
+
+ > li {
+ > a {
+
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: @line-height-base;
+ color: @dropdown-link-color;
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
+ }
+
+ &.active, &.selected {
+ > a {
+ background-color: @navbar-default-link-active-bg;
+ font-style: normal;
+ }
+ }
+ }
+ }
+}
+
+// override some navbar-brand styles to accommodate an image and include a
+// separator to the rest of the navbar
+.navbar-brand {
+
+ padding: (( @navbar-height - @navbar-logo-height ) / 2 );
+ line-height: normal;
+
+ img {
+ max-height: @navbar-logo-height;
+ }
+
+ @media (min-width: @grid-float-breakpoint) {
+ // separator for logo
+ border-right: 1px solid @navbar-default-border;
+ }
+
+ @media (max-width: @grid-float-breakpoint) {
+ float: none
+ }
+}
+
+.navbar-collapse {
+ @media (min-width: @grid-float-breakpoint) {
+ padding-left: 0;
+ padding-right: 0;
+ }
+}
+
+.navbar-right-aligned {
+ @media (min-width: @grid-float-breakpoint) {
+
+ .pull-right();
+
+ > * {
+ float: left;
+ }
+
+ .navbar-tools:last-child {
+ margin-right: 0 - ( @grid-gutter-width / 2 ) - 1;
+ border-right: none;
+
+ li:first-child > a {
+ border-top-right-radius: @navbar-border-radius;
+ }
+
+ li:last-child > a {
+ border-bottom-right-radius: @navbar-border-radius;
+ }
+
+ }
+ }
+}
+
+.navbar-form {
+ // Undo 100% width for pull classes
+ @media (min-width: @grid-float-breakpoint) {
+ // separator for user's personal tools
+ border: 0;
+ border-left: 1px solid @navbar-default-border;
+ border-right: 1px solid @navbar-default-border;
+
+ width: auto;
+ padding: ((@navbar-height - @input-height-base) / 2) @navbar-padding-horizontal;
+ margin: 0 -1px 0 0;
+ }
+}
+
+// styles for personal tools in the navbar component
+.skin-chameleon .navbar-tools {
+ .nav();
+ .navbar-nav();
+
+ > li, >li.open {
+ > a {
+
+ &.navbar-newtalk-available {
+ .link(@navbar-newtalk-available);
+ }
+
+ &.navbar-newtalk-not-available {
+ .link(@navbar-newtalk-not-available);
+ }
+
+ &.navbar-userloggedin {
+ .link(@navbar-user-loggedin);
+ }
+
+ &.navbar-usernotloggedin {
+ .link(@navbar-user-not-loggedin);
+ }
+
+ }
+ }
+
+ @media (min-width: @grid-float-breakpoint) {
+
+ height: @navbar-height;
+ margin: 0 -1px 0 0;
+
+ // separator for user's personal tools
+ border-left: 1px solid @navbar-default-border;
+ border-right: 1px solid @navbar-default-border;
+
+ > li, li.open {
+ float: none;
+
+ height: @navbar-height/2;
+ min-width: 2 * @navbar-height/3;
+ text-align: center;
+
+ border-color: @navbar-default-border;
+ border-bottom: 1px solid @navbar-default-border;
+
+ &:last-child {
+ border: none;
+ }
+
+ > a, > a:hover, > a:focus {
+
+ height: 100%;
+ padding: 0;
+
+ overflow: hidden;
+
+ > * {
+ padding: @navbar-padding-vertical/2 @navbar-padding-vertical/2;
+ display: inline-block;
+ line-height: @line-height-computed/2;
+ }
+
+ > img {
+ top: 50%;
+ left: 50%;
+ position: absolute;
+ .translate(-50%; -50%);
+
+ padding: 0;
+ min-height: 101%;
+ min-width: 101%;
+
+ &:hover, &:focus {
+ opacity: .7;
+ }
+ }
+ }
+
+ &:first-child:last-child {
+
+ height: @navbar-height;
+
+ > a, > a:hover, > a:focus {
+ > * {
+ line-height: @line-height-computed;
+ padding: @navbar-padding-vertical @navbar-padding-vertical/2;
+ }
+ }
+ }
+
+ &:last-child > ul.dropdown-menu {
+ top: @navbar-height / 2 - 1;
+ }
+
+ &:first-child > ul.dropdown-menu {
+ top: @navbar-height;
+ }
+
+ }
+ }
+
+ @media (max-width: @grid-float-breakpoint) {
+ > li {
+ float: left;
+ }
+ }
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/core.less b/www/wiki/skins/chameleon/resources/styles/core.less
new file mode 100644
index 00000000..9f189d7a
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/core.less
@@ -0,0 +1,44 @@
+/**
+ * Central Chameleon style file
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+@import "variables";
+@import "mixins";
+@import "utils";
+@import "images";
+@import "forms";
+@import "screen";
+@import "specialpages";
+@import "print";
+@import "extensionfixes";
+
+/**
+ * Component styles
+ *
+ * TODO: Include them programmatically only when necessary
+ */
+
+@import "Components/NavbarHorizontal";
+@import "Components/Modifications/Sticky";
diff --git a/www/wiki/skins/chameleon/resources/styles/extensionfixes.less b/www/wiki/skins/chameleon/resources/styles/extensionfixes.less
new file mode 100644
index 00000000..316cfef2
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/extensionfixes.less
@@ -0,0 +1,118 @@
+/**
+ * Style fixes for extensions
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.2
+ * @ingroup Skins
+ */
+
+.skin-chameleon {
+
+ /* >> Extension VisualEditor */
+ .ve-ui-toolbar, .ve-ui-debugBar, .oo-ui-processDialog-navigation {
+ &, &::before, &::after {
+ box-sizing: content-box;
+ }
+ }
+
+ .ve-ui-overlay-global {
+ z-index: @zindex-navbar-fixed + 1;
+ }
+
+ // float the VE UI toolbar below a fixed or sticky navbar
+ .navbar.navbar-fixed-top, .navbar + .sticky-wrapper {
+ ~ * .ve-ui-toolbar-floating>.oo-ui-toolbar-bar {
+ transform: translateY(@navbar-height);
+ }
+ }
+ /* << Extension VisualEditor
+
+ /* >> Extension Echo */
+ .mw-echo-ui-overlay {
+
+ z-index: 3;
+
+ }
+
+ #pt-notifications-alert, #pt-notifications-notice {
+
+ display: -ms-inline-grid;
+ display: inline-grid;
+
+ .mw-echo-notifications-badge {
+
+ @badge-offscreen-offset: 1000px;
+
+ // Hide the text, but keep accessible for screen-readers
+ // Later we put the icons back onscreen with an opposite offset
+ top: -@badge-offscreen-offset;
+
+ // Background icon
+ &:before {
+ // Bring it back onscreen
+ top: @badge-offscreen-offset;
+ }
+
+ // Counter
+ &:after {
+ // Bring it back onscreen
+ top: @badge-offscreen-offset + 9px;
+ }
+
+ }
+ }
+
+ .navbar-tools {
+ #pt-notifications-alert, #pt-notifications-notice {
+
+ display: inherit;
+
+ .mw-echo-notifications-badge {
+
+ width: auto;
+ height: auto;
+ top: auto;
+
+ &-dimmed {
+ opacity: 1;
+ }
+
+ // Reset Background icon & Counter
+ //
+ &:before, &:after {
+ content: inherit;
+ }
+
+ &.mw-echo-notifications-badge-all-read {
+ opacity: 1;
+ }
+ }
+ }
+ }
+
+ .mw-echo-ui-notificationBadgeButtonPopupWidget > .oo-ui-popupWidget {
+
+ font-size: 1em;
+
+ }
+ /* << Extension Echo */
+
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/forms.less b/www/wiki/skins/chameleon/resources/styles/forms.less
new file mode 100644
index 00000000..73dbe252
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/forms.less
@@ -0,0 +1,39 @@
+/**
+ * Styles for form elements
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+
+/* Todo: This fixes things on Special:RecentChanges. Does it look alright elsewhere? */
+legend {
+ width: auto;
+ border: none;
+ margin: 0;
+}
+
+.skin-chameleon.mw-special-Search {
+ .mw-ui-input, .mw-ui-button {
+ padding: 0.5em 1em;
+ }
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/images.less b/www/wiki/skins/chameleon/resources/styles/images.less
new file mode 100644
index 00000000..3712b2a6
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/images.less
@@ -0,0 +1,104 @@
+/**
+ * MediaWiki Images
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+
+/* Inline Elements */
+img {
+ border: none;
+ vertical-align: middle;
+
+ .thumbborder {
+ border: 1px solid @thumbnail-border;
+ }
+}
+
+.thumbinner {
+ .thumbnail;
+
+ overflow: hidden;
+}
+
+/* Default styles when there's no .mw-content-ltr or .mw-content-rtl, overridden below */
+.thumbcaption {
+ .thumbnail > .caption;
+ text-align: left;
+}
+
+div.magnify {
+ float: right;
+ margin-left: 0.3em;
+ margin-right: 0;
+
+ a {
+ .glyphicon;
+ .glyphicon-zoom-in;
+
+ color: lighten( @thumbnail-caption-color, 15% );
+ top: 4px;
+
+ &:hover {
+ text-decoration: none;
+ color: @thumbnail-caption-color;
+ }
+
+ * {
+ display: none;
+ }
+
+ /* Don't annoy people who copy-paste everything too much */
+ .user-select(none);
+ }
+}
+
+
+/* Directionality-specific styles for thumbnails - their positioning depends on content language */
+
+/* @noflip */
+.mw-content-ltr{
+ .thumbcaption {
+ text-align: left;
+ }
+
+ div.magnify {
+ float: right;
+ margin-left: 0.3em;
+ margin-right: 0;
+ }
+}
+
+/* @noflip */
+.mw-content-rtl{
+ .thumbcaption {
+ text-align: right;
+ }
+
+ div.magnify {
+ float: left;
+ margin-left: 0;
+ margin-right: 0.3em;
+ .scale(-1, 1); // flip magnifying glass
+ }
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/mixins.less b/www/wiki/skins/chameleon/resources/styles/mixins.less
new file mode 100644
index 00000000..e7bb7f06
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/mixins.less
@@ -0,0 +1,64 @@
+/**
+ * Mixins used for the Chameleon skin styles
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+/**
+ * Colors for links
+ *
+ * :hover MUST come after :link and :visited
+ * :active MUST come after :hover
+ */
+.link( @color ) {
+ &:link {
+ color: @color;
+ }
+ &:visited {
+ color: darken(@color, 20%);
+ }
+ &:focus {
+ color: darken(@color, 15%);
+ }
+ &:hover {
+ color: darken(@color, 15%);
+ }
+ &:active {
+ color: difference(@color, #ffffff);
+ }
+ &:visited:focus {
+ color: darken(@color, 30%);
+ }
+ &:visited:hover {
+ color: darken(@color, 30%);
+ }
+}
+
+// Produces an SVG bullet with the diameter equal to the minimum from @width
+// and @height; the bullet is centered horizontally and placed at 65% from the
+// top vertically (or as far down as possible given the diameter)
+.bullet( @color: @list-bullet-color, @width: @list-bullet-size, @height: @font-size-base ) {
+ list-style: outside disc e(%('url("data:image/svg+xml;charset=UTF-8,%s")', escape( %('<svg width="%s" height="%s" version="1.1" xmlns="http://www.w3.org/2000/svg"><circle cx="%s" cy="%s" r="%s" fill="@{color}"/></svg>', unit(@width), unit(@height), unit(@width/2), unit(min(@height - min(@width, @height)/2, 0.65*@height)), unit( min(@width, @height) )/2))));
+ // IE hack: IE < 9 does not properly work with SVGs. Serve them some fallback PNG.
+ list-style-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAJCAYAAAARml2dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABUSURBVAiZdY4xDsAgFELB2J0DdnbwQI5OHvDfgC62SY0yvhAetI1dWEq5JN0kKwDYbhEx8oT9a5JdEtLb/M2QNW0FAJLttkLbLUfEkIRVztPdo+MBm8UkW9Zxc20AAAAASUVORK5CYII=")e("\9");
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/print.less b/www/wiki/skins/chameleon/resources/styles/print.less
new file mode 100644
index 00000000..22da254d
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/print.less
@@ -0,0 +1,45 @@
+/**
+ * Styles related to printing
+ *
+ * This file contains styles that mostly hide certain elements depending on the
+ * media, e.g. some (like nav bars) for printing, some others (like the print
+ * footer) on screens
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+@media not print {
+
+ .printfooter {
+ .hidden();
+ }
+}
+
+@media print {
+ .noprint,
+ .navbar,
+ .mw-editsection, .mw-editsection-like, .toctoggle, .magnify, .footer-places {
+ .hidden();
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/screen.less b/www/wiki/skins/chameleon/resources/styles/screen.less
new file mode 100644
index 00000000..d66e6f95
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/screen.less
@@ -0,0 +1,444 @@
+/**
+ * Styles dump for the Chameleon skin
+ *
+ * @todo This is a mess. Needs rework.
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+html {
+ .box-sizing(border-box);
+}
+
+*, *:before, *:after {
+ .box-sizing(inherit);
+}
+
+.mw-body {
+ padding: 0 2em;
+ margin: 1em 0;
+ position: relative;
+ z-index: 0;
+}
+
+/* Display editsection links smaller and next to headings */
+.mw-editsection-like {
+ font-size: @font-size-small;
+ font-weight: normal;
+ margin-left: 1em;
+ vertical-align: baseline;
+ /* Reset line-height; headings tend to have it set to larger values */
+ line-height: 1em;
+ /* As .mw-editsection is a <span> (inline element), it is treated as part */
+ /* of the heading content when selecting text by multiple clicks and thus */
+ /* selected together with heading content, despite the user-select: none; */
+ /* rule set above. This enforces non-selection without changing the look. */
+ display: inline-block;
+}
+
+.mw-editsection {
+ .mw-editsection-like();
+}
+
+/* Correct directionality when page directionality is different from site/user directionality */
+/* @noflip */
+.mw-content-ltr .mw-editsection,
+.mw-content-rtl .mw-content-ltr .mw-editsection {
+ margin-left: 1em;
+}
+
+/* @noflip */
+.mw-content-rtl .mw-editsection,
+.mw-content-ltr .mw-content-rtl .mw-editsection {
+ margin-right: 1em;
+}
+
+.mw-jump {
+ height: 0;
+ overflow: hidden;
+}
+
+/**
+* Table of contents
+*/
+.mw-body .toc {
+ #toctitle {
+ margin-bottom: 1ex;
+
+ h2 {
+ display: inline;
+ font-size: @toctitle-font-size;
+ border: none;
+ }
+
+ .toctoggle {
+ .mw-editsection-like();
+ }
+ }
+
+ ul {
+ list-style: none;
+ margin-left: 0.5em;
+ padding: 0;
+ text-align: left;
+ text-indent: 0;
+
+ li {
+ a {
+ .tocnumber {
+ display: inline-block;
+ text-align: right;
+ margin-right: .5ex;
+ min-width: 2ex; //up to two digits
+ }
+ }
+
+ ul li {
+ a .tocnumber {
+ min-width: 3.5ex; // two digits + dot + digit
+ }
+
+ ul li {
+ a .tocnumber {
+ min-width: 5ex; // two digits + dot + digit + dot + digit
+ }
+ }
+ }
+ }
+
+ }
+}
+
+/* have to insert id based rule here to over-rule MW core's shared.css */
+#toc ul {
+ margin-left: 0.5em;
+}
+
+.catlinks {
+ margin: 2em 0 0;
+}
+
+.firstHeading {
+ border-bottom: 1px solid @hr-border;
+ padding-bottom: .2em;
+ margin-bottom: .2em;
+}
+
+.contentHeader {
+ margin: 1em 0 1.5em;
+ border-bottom: 0;
+ padding-bottom: 0;
+}
+
+.footer-info {
+ padding-left: 5px;
+}
+
+.p-tb {
+ &.navbar {
+ min-height: 0;
+ }
+
+ .navbar-nav > li > a {
+ &, &:hover {
+ padding: @toolbar-padding-vertical @toolbar-padding-horizontal;
+ }
+ }
+}
+
+.newtalk-notifier {
+ margin-bottom: 10px;
+}
+
+.p-contentnavigation {
+
+ a.selected {
+ font-style: italic;
+ }
+
+ a.new {
+ color: #aaaaaa;
+ }
+}
+
+.p-personal-tools {
+ margin: 0 0 0 1ex;
+}
+
+#siteSub {
+ display: none
+}
+
+#wpTextbox1 {
+ width: 100%;
+}
+
+// style horizontal toolbar
+#preftoc {
+ .nav;
+ .nav-tabs;
+
+ margin-bottom: 2ex;
+
+ > li.selected > a {
+ &,
+ &:hover,
+ &:focus {
+ color: @nav-tabs-active-link-hover-color;
+ background-color: @nav-tabs-active-link-hover-bg;
+ border: 1px solid @nav-tabs-active-link-hover-border-color;
+ border-bottom-color: transparent;
+ cursor: default;
+ }
+ }
+}
+
+.navbar .p-contentnavigation li {
+ display: block;
+}
+
+
+/**
+ * Links
+ */
+a {
+ .link(@link-color);
+}
+
+a.new, #p-personal a.new {
+ .link(@link-new-color);
+}
+
+.mw-body {
+ a.stub {
+ .link(@link-stub-color);
+ }
+
+ /* Interwiki Styling */
+ a.extiw {
+ .link(@link-interwiki-color);
+ }
+
+ /* External links */
+ a.external {
+ .link(@link-external-color);
+ }
+}
+/**
+* Lists
+*/
+.mw-body {
+ ol {
+ list-style: outside none decimal;
+ }
+
+ ul {
+ .bullet();
+ }
+
+ ol, ul {
+ padding-left: @list-level-indent;
+ margin: 0;
+
+ .list-inline {
+ .list-inline;
+ }
+
+ ul {
+ .bullet( @list-bullet-color, @list-bullet-size*.9);
+ }
+
+ ol, ul {
+ ul {
+ .bullet( @list-bullet-color, @list-bullet-size*.7);
+ }
+ }
+ }
+}
+
+// no bullets for File namespace
+.ns-6 .mw-body ul {
+ list-style: none;
+ padding: 0;
+}
+
+.catlinks {
+ ul {
+ text-indent: 0;
+ padding-left: 0;
+
+ > li:before {
+ content: none;
+ }
+ }
+}
+
+dt {
+ font-weight: bold;
+ margin-bottom: .1em;
+}
+
+dl {
+ margin-top: .2em;
+ margin-bottom: .5em;
+}
+
+dd {
+ line-height: 1.5em;
+ margin-left: 1.6em;
+ margin-bottom: .1em;
+}
+
+/* IE 6 and 7 lack support for quotes aroud the <q> element ('::before' and '::after'
+ pseudoelements, 'quotes' property). Let's italicize it instead (using the star hack). */
+q {
+ *font-style: italic;
+}
+
+pre, code, tt, kbd, samp, .mw-code {
+ /*
+ * Some browsers will render the monospace text too small, namely Firefox, Chrome and Safari.
+ * Specifying any valid, second value will trigger correct behavior without forcing a different font.
+ */
+ font-family: monospace, Courier;
+}
+
+code {
+ color: black;
+ background-color: #f9f9f9;
+ border: 1px solid #ddd;
+ border-radius: 2px;
+ padding: 1px 4px;
+}
+
+pre, .mw-code {
+ color: black;
+ background-color: #f9f9f9;
+ border: 1px solid #ddd;
+ padding: 1em;
+}
+
+/* Tables */
+table {
+ font-size: 100%;
+}
+
+.skin-chameleon .mw-specialpages-table {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+/* Forms */
+fieldset {
+ border: 1px solid #2f6fab;
+ margin: 1em 0 1em 0;
+ padding: 0 1em 1em;
+ line-height: 1.5em;
+}
+
+fieldset.nested {
+ margin: 0 0 0.5em 0;
+ padding: 0 0.5em 0.5em;
+}
+
+legend {
+ padding: .5em;
+ font-size: 95%;
+}
+
+form {
+ border: none;
+ margin: 0;
+}
+
+textarea {
+ width: 100%;
+ padding: .1em;
+ display: block;
+}
+
+select {
+ vertical-align: top;
+}
+
+
+/* Small for tables and similar */
+.small {
+ font-size: 94%;
+}
+
+table.small {
+ font-size: 100%;
+}
+
+.mw-warning {
+ border: 1px solid #aaa;
+ background-color: #f9f9f9;
+ padding: 5px;
+ font-size: 95%;
+ margin-left: 50px;
+ margin-right: 50px;
+ text-align: center;
+}
+
+.mw-changeslist-legend {
+ dt {
+ clear: left;
+ }
+
+ dt, dd {
+ line-height: 1.3em;
+ }
+}
+
+table.mw-recentchanges-table {
+ width: 100%;
+}
+
+.layout-fixedhead, .layout-stickyhead, .layout-clean {
+ h1, h2, h3, h4, h5, h6 {
+ >span.mw-headline:before {
+ content: "";
+ display: inline-block;
+ height: @navbar-height;
+ margin-top: 0-@navbar-height;
+ }
+ }
+}
+
+.mw-headline-anchor {
+ display: none;
+}
+
+.mw-indicators {
+ float: right;
+ line-height: 1.6;
+ font-size: @font-size-small;
+ position: relative;
+ z-index: 1;
+
+ .mw-indicator {
+ display: inline-block;
+ }
+}
+
diff --git a/www/wiki/skins/chameleon/resources/styles/specialpages.less b/www/wiki/skins/chameleon/resources/styles/specialpages.less
new file mode 100644
index 00000000..9f84b18e
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/specialpages.less
@@ -0,0 +1,74 @@
+/**
+ * MediaWiki Special Pages
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.1.1
+ * @ingroup Skins
+ */
+
+// Styles for all Special Pages
+.ns-special .mw-body {
+ label {
+ // display: inline;
+ font-weight: normal;
+ }
+
+ td.mw-label, td.mw-input {
+ padding: 0.5em;
+ }
+}
+
+.mw-special-ChangeEmail,
+.mw-special-PasswordReset {
+ .mw-body label {
+ font-weight: bold;
+ }
+}
+
+.mw-special-Preferences {
+
+ .htmlform-tip {
+ font-size: x-small;
+ }
+
+ .prefsection td.mw-label {
+ width: 25%;
+ }
+
+ #preftoc {
+ margin-bottom: 0;
+ }
+
+ #mw-htmlform-i18n td {
+ padding-bottom: 1ex;
+ }
+
+}
+
+.mw-special-ResetTokens {
+ #mw-content-text table {
+ margin-top: 2ex;
+
+ td.mw-label {
+ width: 15%;
+ }
+ }
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/utils.less b/www/wiki/skins/chameleon/resources/styles/utils.less
new file mode 100644
index 00000000..3e45517b
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/utils.less
@@ -0,0 +1,90 @@
+/**
+ * Utility classes
+ *
+ * @todo This is a mess. Needs rework.
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+.center {
+ text-align: center;
+ width: 100%;
+
+ * {
+ margin-left: auto;
+ margin-right: auto;
+ }
+}
+
+.floatright {
+ clear: right;
+ float: right;
+ margin: 0 0 0.5em 0.5em;
+}
+
+div.tright {
+ .floatright;
+
+ margin: 0.5em 0 1.3em 1.4em;
+}
+
+.floatleft {
+ clear: left;
+ float: left;
+ margin: 0 0.5em 0.5em 0;
+}
+
+div.tleft {
+ .floatleft;
+
+ margin: 0.5em 1.4em 1.3em 0;
+}
+
+.no-margin {
+ margin: 0;
+}
+
+.no-bottom-border {
+ border-bottom: none;
+}
+
+.full-width {
+ width: 100%;
+ border-radius: 0;
+ border-left: none;
+ border-right: none;
+}
+
+.list-style-none() {
+ .mw-body {
+ ul {
+ padding-left: inherit;
+ text-indent: inherit;
+ margin: 2ex 0;
+
+ li:before {
+ content: none;
+ }
+ }
+ }
+}
diff --git a/www/wiki/skins/chameleon/resources/styles/variables.less b/www/wiki/skins/chameleon/resources/styles/variables.less
new file mode 100644
index 00000000..a1cb97b8
--- /dev/null
+++ b/www/wiki/skins/chameleon/resources/styles/variables.less
@@ -0,0 +1,56 @@
+/**
+ * LESS variables modified or introduced for the Chameleon skin
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+// Global textual link colors.
+@link-color: @brand-primary;
+@link-new-color: #b52b27;
+
+@link-stub-color: @link-color;
+@link-interwiki-color: @link-color;
+@link-external-color: @link-color;
+
+// list parameters
+@list-bullet-size: .5 * @font-size-base;
+@list-bullet-color: @gray-light;
+@list-level-indent: 3.5ex;
+
+@thumbnail-caption-padding: 3px;
+
+@toctitle-font-size: @font-size-large;
+
+// logo will be scaled down to this height to fit into the navbar
+// (this value should be less than the navbar-height)
+@navbar-logo-height: .9 * @navbar-height;
+
+@navbar-user-loggedin: @brand-primary;
+@navbar-user-not-loggedin: lighten( @navbar-default-link-color, 30% );
+
+@navbar-newtalk-available: @brand-primary;
+@navbar-newtalk-not-available: lighten( @navbar-default-link-color, 30% );
+
+@toolbar-height: 30px;
+@toolbar-padding-vertical: ((@toolbar-height - @line-height-computed) / 2);
+@toolbar-padding-horizontal: @navbar-padding-horizontal;
diff --git a/www/wiki/skins/chameleon/src/ChameleonTemplate.php b/www/wiki/skins/chameleon/src/ChameleonTemplate.php
new file mode 100644
index 00000000..fbcca0ae
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/ChameleonTemplate.php
@@ -0,0 +1,117 @@
+<?php
+/**
+ * File holding the ChameleonTemplate class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon;
+
+use BaseTemplate;
+use SkinChameleon;
+
+/**
+ * BaseTemplate class for the Chameleon skin
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class ChameleonTemplate extends BaseTemplate {
+
+ /**
+ * Outputs the entire contents of the page
+ */
+ public function execute() {
+
+ // output the head element
+ // The headelement defines the <body> tag itself, it shouldn't be included in the html text
+ // To add attributes or classes to the body tag override addToBodyAttributes() in SkinChameleon
+ $this->html( 'headelement' );
+ echo $this->getSkin()->getComponentFactory()->getRootComponent()->getHtml();
+ $this->printTrail();
+ echo "</body>\n</html>";
+
+ }
+
+ /**
+ * Overrides method in parent class that is unprotected against non-existent indexes in $this->data
+ *
+ * @param string $key
+ *
+ * @return string|void
+ */
+ public function html( $key ) {
+ echo $this->get( $key );
+ }
+
+ /**
+ * Get the Skin object related to this object
+ *
+ * @return SkinChameleon
+ */
+ public function getSkin() {
+ return parent::getSkin();
+ }
+
+ /**
+ * @param \DOMElement $description
+ * @param int $indent
+ * @param string $htmlClassAttribute
+ *
+ * @deprecated since 1.6. Use getSkin()->getComponentFactory()->getComponent()
+ *
+ * @throws \MWException
+ * @return \Skins\Chameleon\Components\Container
+ */
+ public function getComponent( \DOMElement $description, $indent = 0, $htmlClassAttribute = '' ) {
+ return $this->getSkin()->getComponentFactory()->getComponent( $description, $indent, $htmlClassAttribute );
+ }
+
+ /**
+ * Generates a list item for a navigation, portlet, portal, sidebar... list
+ *
+ * Overrides the parent function to ensure ids are unique.
+ *
+ * @param $key string, usually a key from the list you are generating this link from.
+ * @param $item array, of list item data containing some of a specific set of keys.
+ *
+ * The "id" and "class" keys will be used as attributes for the list item,
+ * if "active" contains a value of true a "active" class will also be appended to class.
+ *
+ * @param $options array
+ *
+ * @return string
+ */
+ public function makeListItem( $key, $item, $options = array() ) {
+
+ foreach ( array( 'id', 'single-id' ) as $attrib ) {
+
+ if ( isset ( $item[ $attrib ] ) ) {
+ $item[ $attrib ] = IdRegistry::getRegistry()->getId( $item[ $attrib ], $this );
+ }
+
+ }
+
+ return parent::makeListItem( $key, $item, $options );
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/ComponentFactory.php b/www/wiki/skins/chameleon/src/ComponentFactory.php
new file mode 100644
index 00000000..f0e2d05a
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/ComponentFactory.php
@@ -0,0 +1,265 @@
+<?php
+/**
+ * File containing the ComponentFactory class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon;
+
+use DOMDocument;
+use DOMElement;
+use MWException;
+use RuntimeException;
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\Container;
+
+/**
+ * Class ComponentFactory
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class ComponentFactory {
+
+ // the root component of the page; should be of type Container
+ private $mRootComponent = null;
+
+ private $layoutFile;
+ private $skinTemplate;
+
+ const NAMESPACE_HIERARCHY = 'Skins\\Chameleon\\Components';
+
+ /**
+ * @param string $layoutFileName
+ */
+ public function __construct( $layoutFileName ) {
+ $this->setLayoutFile( $layoutFileName );
+ }
+
+ /**
+ * @return Container
+ * @throws MWException
+ */
+ public function getRootComponent() {
+
+ if ( $this->mRootComponent === null ) {
+
+ $doc = new DOMDocument();
+
+ $doc->load( $this->getLayoutFile() );
+
+ $doc->normalizeDocument();
+
+ $roots = $doc->getElementsByTagName( 'structure' );
+
+ if ( $roots->length > 0 ) {
+
+ $this->mRootComponent = $this->getComponent( $roots->item( 0 ) );
+
+ } else {
+ // TODO: catch other errors, e.g. malformed XML
+ throw new MWException( sprintf( '%s: XML description is missing an element: structure.', $this->getLayoutFile() ) );
+ }
+ }
+
+ return $this->mRootComponent;
+
+ }
+
+ /**
+ * @return string
+ */
+ protected function getLayoutFile() {
+
+ return $this->layoutFile;
+ }
+
+ /**
+ * @param string $fileName
+ */
+ public function setLayoutFile( $fileName ) {
+
+ $fileName = $this->sanitizeFileName( $fileName );
+
+ if ( !is_readable( $fileName ) ) {
+ throw new RuntimeException( "Expected an accessible {$fileName} layout file" );
+ }
+
+ $this->layoutFile = $fileName;
+ }
+
+ /**
+ * @param DOMElement $description
+ * @param int $indent
+ * @param string $htmlClassAttribute
+ *
+ * @throws MWException
+ * @return \Skins\Chameleon\Components\Container
+ */
+ public function getComponent( DOMElement $description, $indent = 0, $htmlClassAttribute = '' ) {
+
+ $className = $this->getComponentClassName( $description );
+ $component = new $className( $this->getSkinTemplate(), $description, $indent, $htmlClassAttribute );
+
+ $children = $description->childNodes;
+
+ foreach ( $children as $child ) {
+ if ( $child instanceof DOMElement && strtolower( $child->nodeName ) === 'modification' ) {
+ $component = $this->getModifiedComponent( $child, $component );
+ }
+ }
+
+ return $component;
+ }
+
+ /**
+ * @param DOMElement $description
+ *
+ * @return string
+ * @throws MWException
+ * @since 1.1
+ */
+ protected function getComponentClassName( DOMElement $description ) {
+
+ $className = $this->mapDescriptionToClassName( $description );
+
+ if ( !class_exists( $className ) || !is_subclass_of( $className, self::NAMESPACE_HIERARCHY . '\\Component' ) ) {
+ throw new MWException( sprintf( '%s (line %d): Invalid component type: %s.', $this->getLayoutFile(), $description->getLineNo(), $description->getAttribute( 'type' ) ) );
+ }
+
+ return $className;
+ }
+
+ /**
+ * @param DOMElement $description
+ *
+ * @return string
+ * @throws MWException
+ */
+ protected function mapDescriptionToClassName( DOMElement $description ) {
+
+ $nodeName = strtolower( $description->nodeName );
+
+ $mapOfComponentsToClassNames = array(
+ 'structure' => 'Structure',
+ 'grid' => 'Grid',
+ 'row' => 'Row',
+ 'cell' => 'Cell',
+ 'modification' => 'Silent',
+ );
+
+ if ( array_key_exists( $nodeName, $mapOfComponentsToClassNames ) ) {
+ return self::NAMESPACE_HIERARCHY . '\\' . $mapOfComponentsToClassNames[ $nodeName ];
+ }
+
+ if ( $nodeName === 'component' ) {
+ return $this->mapComponentDescriptionToClassName( $description );
+ }
+
+ throw new MWException( sprintf( '%s (line %d): XML element not allowed here: %s.', $this->getLayoutFile(), $description->getLineNo(), $description->nodeName ) );
+
+ }
+
+ /**
+ * @return mixed
+ */
+ public function getSkinTemplate() {
+ return $this->skinTemplate;
+ }
+
+ /**
+ * @param ChameleonTemplate $skinTemplate
+ */
+ public function setSkinTemplate( ChameleonTemplate $skinTemplate ) {
+ $this->skinTemplate = $skinTemplate;
+ }
+
+ /**
+ * @param DOMElement $description
+ * @param Component $component
+ *
+ * @return mixed
+ * @throws MWException
+ */
+ protected function getModifiedComponent( DOMElement $description, Component $component ) {
+
+ if ( !$description->hasAttribute( 'type' ) ) {
+ throw new MWException( sprintf( '%s (line %d): Modification element missing an attribute: type.', $this->getLayoutFile(), $description->getLineNo() ) );
+ }
+
+ $className = 'Skins\\Chameleon\\Components\\Modifications\\' . $description->getAttribute( 'type' );
+
+ if ( !class_exists( $className ) || !is_subclass_of( $className, 'Skins\\Chameleon\\Components\\Modifications\\Modification' ) ) {
+ throw new MWException( sprintf( '%s (line %d): Invalid modification type: %s.', $this->getLayoutFile(), $description->getLineNo(), $description->getAttribute( 'type' ) ) );
+ }
+
+ return new $className( $component, $description );
+
+ }
+
+ /**
+ * @param string $fileName
+ *
+ * @return string
+ */
+ public function sanitizeFileName( $fileName ) {
+ return str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $fileName );
+ }
+
+ /**
+ * @param DOMElement $description
+ * @return string
+ */
+ protected function mapComponentDescriptionToClassName( DOMElement $description ) {
+
+ if ( $description->hasAttribute( 'type' ) ) {
+ $className = $description->getAttribute( 'type' );
+ $parent = $description->parentNode;
+
+ if ( $parent instanceof DOMElement && $parent->hasAttribute( 'type' ) ) {
+ $fullClassName = join(
+ '\\',
+ array(
+ self::NAMESPACE_HIERARCHY,
+ $parent->getAttribute( 'type' ),
+ $className
+ )
+ );
+
+ if ( class_exists( $fullClassName ) ) {
+ return $fullClassName;
+ }
+ }
+
+ $chameleonClassName = join( '\\', array( self::NAMESPACE_HIERARCHY, $className ) );
+ if ( !class_exists( $chameleonClassName ) ) {
+ return $className;
+ }
+
+ return $chameleonClassName;
+ }
+
+ return self::NAMESPACE_HIERARCHY . 'Container';
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Cell.php b/www/wiki/skins/chameleon/src/Components/Cell.php
new file mode 100644
index 00000000..f46c8813
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Cell.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * File holding the Cell class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+
+/**
+ * The Cell class.
+ *
+ * @ingroup Skins
+ */
+class Cell extends Container {
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+
+ if ( !is_null( $domElement ) ) {
+
+ $span = $domElement->getAttribute( 'span' );
+
+ if ( ( !is_int( $span ) && !ctype_digit( $span ) ) || ( $span < 1 ) || ( $span > 12 ) ) {
+ $span = '12';
+ }
+
+ } else {
+ $span = '12';
+ }
+
+ parent::__construct( $template, $domElement, $indent );
+
+ $this->addClasses( "col-lg-$span" );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Component.php b/www/wiki/skins/chameleon/src/Components/Component.php
new file mode 100644
index 00000000..e6dc51c1
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Component.php
@@ -0,0 +1,222 @@
+<?php
+/**
+ * File containing the Component class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use SkinChameleon;
+use Skins\Chameleon\ChameleonTemplate;
+
+/**
+ * Component class
+ *
+ * This is the base class of all components.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+abstract class Component {
+
+ private $mSkinTemplate;
+ private $mIndent = 0;
+ private $mClasses = array();
+ private $mDomElement = null;
+
+ /**
+ * @param ChameleonTemplate $template
+ * @param \DOMElement|null $domElement
+ * @param int $indent
+ */
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+
+ $this->mSkinTemplate = $template;
+ $this->mIndent = (int) $indent;
+ $this->mDomElement = $domElement;
+
+ if ( $domElement !== null ) {
+ $this->addClasses( $domElement->getAttribute( 'class' ) );
+ }
+ }
+
+ /**
+ * Sets the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ */
+ public function setClasses( $classes ) {
+
+ $this->mClasses = array();
+ $this->addClasses( $classes );
+
+ }
+
+ /**
+ * Adds the given class to the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ * @return string | array
+ */
+ public function addClasses( $classes ) {
+
+ $classesArray = $this->transformClassesToArray( $classes );
+
+ if ( !empty( $classesArray ) ) {
+ $classesArray = array_combine( $classesArray, $classesArray );
+ $this->mClasses = array_merge( $this->mClasses, $classesArray );
+ }
+ }
+
+ /**
+ * @param string | array | null $classes
+ *
+ * @return array
+ * @throws \MWException
+ */
+ protected function transformClassesToArray ( $classes ) {
+
+ if ( empty( $classes ) ) {
+ return array();
+ } elseif ( is_array( $classes )) {
+ return $classes;
+ } elseif ( is_string( $classes ) ) {
+ return explode( ' ', $classes );
+ } else {
+ throw new \MWException( __METHOD__ . ': Expected String or Array; ' . getType( $classes ) . ' given.' );
+ }
+
+ }
+
+ /**
+ * @return ChameleonTemplate
+ */
+ public function getSkinTemplate() {
+
+ return $this->mSkinTemplate;
+ }
+
+ /**
+ * @since 1.1
+ * @return SkinChameleon
+ */
+ public function getSkin() {
+
+ return $this->mSkinTemplate->getSkin();
+ }
+
+ /**
+ * Returns the current indentation level
+ *
+ * @return int
+ */
+ public function getIndent() {
+
+ return $this->mIndent;
+ }
+
+ /**
+ * Returns the class string that should be assigned to the top-level html element of this component
+ *
+ * @return string
+ */
+ public function getClassString() {
+
+ return implode( ' ', $this->mClasses );
+ }
+
+ /**
+ * Removes the given class from the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ * @return string
+ */
+ public function removeClasses( $classes ) {
+
+ $classesArray = $this->transformClassesToArray( $classes );
+
+ $this->mClasses = array_diff( $this->mClasses, $classesArray );
+ }
+
+ /**
+ * Returns the DOMElement from the description XML file associated with this element.
+ *
+ * @return \DOMElement
+ */
+ public function getDomElement() {
+ return $this->mDomElement;
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ abstract public function getHtml();
+
+ /**
+ * @return string[] the resource loader modules needed by this component
+ */
+ public function getResourceLoaderModules() {
+ return array();
+ }
+
+ /**
+ * Adds $indent to (or subtracts from if negative) the current indentation level.
+ * Inserts a new line and a number of tabs according to the new indentation level.
+ *
+ * @param int $indent
+ * @return string
+ * @throws \MWException
+ */
+ protected function indent( $indent = 0 ) {
+
+ $this->mIndent += (int) $indent;
+
+ if ( $this->mIndent < 0 ) {
+ throw new \MWException('Attempted HTML indentation of ' .$this->mIndent );
+ }
+
+ return "\n" . str_repeat( "\t", $this->mIndent );
+ }
+
+ /**
+ * @param string $attributeName
+ * @param null | string $default
+ * @return null | string
+ */
+ protected function getAttribute( $attributeName, $default = null ) {
+
+ $element = $this->getDomElement();
+
+ if ( $element !== null && $element->hasAttribute( $attributeName ) ) {
+ return $element->getAttribute( $attributeName );
+ }
+
+ return $default;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Container.php b/www/wiki/skins/chameleon/src/Components/Container.php
new file mode 100644
index 00000000..4aaa1675
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Container.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * File holding the Container class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The Container class.
+ *
+ * It will wrap its content elements in a DIV.
+ *
+ * Supported attributes:
+ * - class
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Container extends Structure {
+
+ /**
+ * Builds the HTML code for the main container
+ *
+ * @return String the HTML code
+ */
+ public function getHtml(){
+
+ $ret = $this->indent() . \Html::openElement( 'div', array( 'class' => $this->getClassString() ) );
+ $this->indent( 1 );
+
+ $ret .= parent::getHtml();
+
+ $ret .= $this->indent( -1 ) . '</div>';
+
+ return $ret;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/ContentBody.php b/www/wiki/skins/chameleon/src/Components/ContentBody.php
new file mode 100644
index 00000000..336b8172
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/ContentBody.php
@@ -0,0 +1,218 @@
+<?php
+/**
+ * File holding the MainContent class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The MainContent class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class ContentBody extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $skintemplate = $this->getSkinTemplate();
+ $idRegistry = IdRegistry::getRegistry();
+
+ // START content
+ $ret =
+ $this->indent() . '<!-- start the content area -->' .
+ $this->indent() . $idRegistry->openElement( 'div',
+ array( 'id' => 'content', 'class' => 'mw-body ' . $this->getClassString() )
+ ) .
+
+ $idRegistry->element( 'a', array( 'id' => 'top' ) ) .
+ $this->indent(1) . $idRegistry->element( 'div', array( 'id' => 'mw-indicators', 'class' => 'mw-indicators', ), $this->buildMwIndicators() ) .
+
+ $this->indent() . '<div ' . \Html::expandAttributes( array(
+ 'id' => $idRegistry->getId( 'mw-js-message' ),
+ 'style' => 'display:none;'
+ )
+ ) . $skintemplate->get( 'userlangattributes' ) . '></div>';
+
+ // $ret .= $this->buildContentHeader();
+
+ if ( $skintemplate->get( 'subtitle' ) ) {
+
+ // TODO: should not use class 'small', better use class 'contentSub' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- subtitle line; used for various things like the subpage hierarchy -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub', 'class' => 'small' ), $skintemplate->get( 'subtitle' ) );
+ $ret .= '</br>';
+
+ }
+
+ if ( $skintemplate->get( 'undelete' ) ) {
+ // TODO: should not use class 'small', better use class 'contentSub2' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- undelete message -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub2', 'class' => 'small' ), $skintemplate->get( 'undelete' ) );
+ $ret .= '</br>';
+
+ }
+
+
+ $ret .= $this->buildContentBody();
+ $ret .= $this->buildCategoryLinks();
+
+ $ret .= $this->indent( -1 ) . '</div>';
+ // END content
+
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildContentHeader() {
+
+ $skintemplate = $this->getSkinTemplate();
+ $idRegistry = IdRegistry::getRegistry();
+
+ $ret = $this->indent() . '<div class ="contentHeader">' .
+
+ $this->indent( 1 ) . '<!-- title of the page -->' .
+ $this->indent() . $idRegistry->element( 'h1', array( 'id' => 'firstHeading', 'class' => 'firstHeading' ), $skintemplate->get( 'title' ) ) .
+
+ $this->indent() . '<!-- tagline; usually goes something like "From WikiName" primary purpose of this seems to be for printing to identify the source of the content -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id'=> 'siteSub' ), $skintemplate->getMsg( 'tagline' )->escaped() );
+
+ if ( $skintemplate->get( 'subtitle' ) ) {
+
+ // TODO: should not use class 'small', better use class 'contentSub' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- subtitle line; used for various things like the subpage hierarchy -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub', 'class' => 'small' ), $skintemplate->get( 'subtitle' ) );
+
+ }
+
+ if ( $skintemplate->get( 'undelete' ) ) {
+ // TODO: should not use class 'small', better use class 'contentSub2' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- undelete message -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub2', 'class' => 'small' ), $skintemplate->get( 'undelete' ) );
+ }
+
+ // TODO: Do we need this? Seems to be an accessibility thing. It's used
+ // in vector to jump to the nav which is at the bottom of the document,
+ // but our nav is usually at the top
+ $ret .= $idRegistry->element( 'div', array( 'id' => 'jump-to-nav', 'class' => 'mw-jump' ),
+ $skintemplate->getMsg( 'jumpto' )->escaped() . '<a href="#mw-navigation">' . $skintemplate->getMsg( 'jumptonavigation' )->escaped() . '</a>' .
+ $skintemplate->getMsg( 'comma-separator' )->escaped() . '<a href="#p-search">' . $skintemplate->getMsg( 'jumptosearch' )->escaped() . '</a>'
+ );
+
+ $ret .= $this->indent( -1 ) . '</div>';
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildContentBody() {
+ return $this->indent() . IdRegistry::getRegistry()->element( 'div', array( 'id' => 'bodyContent' ),
+ $this->indent( 1 ) . '<!-- body text -->' . "\n" .
+ $this->indent() . $this->getSkinTemplate()->get( 'bodytext' ) .
+ $this->indent() . '<!-- end body text -->' .
+ $this->buildDataAfterContent() .
+ $this->indent( -1 )
+ );
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildCategoryLinks() {
+ // TODO: Category links should be a separate component, but
+ // * dataAfterContent should come after the the category links.
+ // * only one extension is known to use it dataAfterContent and it is geared specifically towards MonoBook
+ // => provide an attribute hideCatLinks for the XML and -if present- hide category links and assume somebody knows what they are doing
+ return
+ $this->indent() . '<!-- category links -->' .
+ $this->indent() . $this->getSkinTemplate()->get( 'catlinks' );
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildDataAfterContent() {
+
+ $skinTemplate = $this->getSkinTemplate();
+
+ if ( $skinTemplate->get( 'dataAfterContent' ) ) {
+ return
+ $this->indent() . '<!-- data blocks which should go somewhere after the body text, but not before the catlinks block-->' .
+ $this->indent() . $skinTemplate->get( 'dataAfterContent' );
+ }
+
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ private function buildMwIndicators() {
+
+ $idRegistry = IdRegistry::getRegistry();
+ $indicators = $this->getSkinTemplate()->get( 'indicators' );
+
+ if ( !is_array( $indicators ) || count( $indicators ) === 0 ) {
+ return '';
+ }
+
+ $this->indent( 1 );
+
+ $ret = '';
+
+ foreach ( $indicators as $id => $content ) {
+ $id = \Sanitizer::escapeId( "mw-indicator-$id" );
+
+ $ret .=
+ $this->indent() .
+ $idRegistry->element( 'div',
+ array(
+ 'id' => $id,
+ 'class' => "mw-indicator $id",
+ ),
+ $content
+ );
+ }
+
+ $ret .= $this->indent( -1 );
+
+ return $ret;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/ContentHeader.php b/www/wiki/skins/chameleon/src/Components/ContentHeader.php
new file mode 100644
index 00000000..724f60da
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/ContentHeader.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * File holding the FooterIcons class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Chameleon
+ */
+
+namespace Skins\Chameleon\Components;
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The FooterIcons class.
+ *
+ * A inline list containing icons: <ul id="footer-icons" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class ContentHeader extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+ global $bannerImage;
+ $skintemplate = $this->getSkinTemplate();
+ $idRegistry = IdRegistry::getRegistry();
+
+ if ($bannerImage) {
+ $ret = $this->indent() . '<div class ="contentHeader bannerimage"><div class="container"><div class="row"><div class="col-lg-12">';
+ } else {
+ $ret = $this->indent() . '<div class ="contentHeader"><div class="container"><div class="row"><div class="col-lg-12">';
+ }
+ $ret .= $this->indent( 1 ) . '<!-- title of the page -->' .
+ $this->indent() . $idRegistry->element( 'h1', array( 'id' => 'firstHeading', 'class' => 'firstHeading' ), $skintemplate->get( 'title' ) ) .
+
+ $this->indent() . '<!-- tagline; usually goes something like "From WikiName" primary purpose of this seems to be for printing to identify the source of the content -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id'=> 'siteSub' ), $skintemplate->getMsg( 'tagline' )->escaped() );
+
+
+ // TODO: Do we need this? Seems to be an accessibility thing. It's used
+ // in vector to jump to the nav which is at the bottom of the document,
+ // but our nav is usually at the top
+ $ret .= $idRegistry->element( 'div', array( 'id' => 'jump-to-nav', 'class' => 'mw-jump' ),
+ $skintemplate->getMsg( 'jumpto' )->escaped() . '<a href="#mw-navigation">' . $skintemplate->getMsg( 'jumptonavigation' )->escaped() . '</a>' .
+ $skintemplate->getMsg( 'comma-separator' )->escaped() . '<a href="#p-search">' . $skintemplate->getMsg( 'jumptosearch' )->escaped() . '</a>'
+ );
+
+ $ret .= $this->indent( -1 ) . '</div></div></div></div>';
+ return $ret;
+
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/FooterIcons.php b/www/wiki/skins/chameleon/src/Components/FooterIcons.php
new file mode 100644
index 00000000..30994304
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/FooterIcons.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * File holding the FooterIcons class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Chameleon
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The FooterIcons class.
+ *
+ * A inline list containing icons: <ul id="footer-icons" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class FooterIcons extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = '';
+ $icons = $this->getSkinTemplate()->getFooterIcons( 'icononly' );
+
+ if ( $icons !== null && count( $icons ) > 0 ) {
+
+ $ret = $this->indent() . '<!-- footer icons -->' .
+ $this->indent() . '<ul class="list-inline pull-right footer-icons ' . $this->getClassString() . '" id="footer-icons" >';
+
+ $this->indent( 1 );
+ foreach ( $icons as $blockName => $footerIcons ) {
+
+ $ret .= $this->indent() . '<!-- ' . htmlspecialchars( $blockName ) . ' -->';
+
+ foreach ( $footerIcons as $icon ) {
+ $ret .= $this->indent() . '<li>' .
+ $this->getSkinTemplate()->getSkin()->makeFooterIcon( $icon ) . '</li>';
+ }
+
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+ }
+
+ return $ret;
+
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/FooterInfo.php b/www/wiki/skins/chameleon/src/Components/FooterInfo.php
new file mode 100644
index 00000000..2d43279d
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/FooterInfo.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * File holding the FooterInfo class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Chameleon
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The FooterInfo class.
+ *
+ * An list of footer items (last modified time, view count, number of watching users, credits, copyright)
+ * Does not include so called places (about, privacy policy, and disclaimer links). They need to be added to the page elsewhere.
+ *
+ * This is an unstyled unordered list: <ul id="footer-info" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class FooterInfo extends Component {
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+ parent::__construct( $template, $domElement , $indent );
+ $this->addClasses( 'list-unstyled small' );
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = $this->indent() . '<!-- footer links -->' .
+ $this->indent() .
+ \Html::openElement( 'ul', array(
+ 'class' => 'footer-info ' . $this->getClassString(),
+ 'id' => IdRegistry::getRegistry()->getId( 'footer-info' ),
+ )
+ );
+
+ $footerlinks = $this->getSkinTemplate()->getFooterLinks();
+ $this->indent( 1 );
+ foreach ( $footerlinks as $category => $links ) {
+ if ( $category !== 'places' ) {
+
+ $ret .= $this->indent() . '<!-- ' . htmlspecialchars( $category ) . ' -->';
+ foreach ( $links as $key ) {
+ $ret .= $this->indent() . '<li>' . $this->getSkinTemplate()->get( $key ) . '</li>';
+ }
+
+ }
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+
+ return $ret;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/FooterPlaces.php b/www/wiki/skins/chameleon/src/Components/FooterPlaces.php
new file mode 100644
index 00000000..470633ae
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/FooterPlaces.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * File holding the FooterPlaces class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The FooterInfo class.
+ *
+ * A inline list containing links to places (about, privacy policy, and disclaimer links): <ul id="footer-places">
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class FooterPlaces extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = null;
+ $footerlinks = $this->getSkinTemplate()->getFooterLinks();
+
+ if ( array_key_exists( 'places', $footerlinks ) ) {
+
+ $ret = $this->indent() . '<!-- places -->' .
+ $this->indent() . '<ul class="list-inline footer-places ' . $this->getClassString() . '" id="footer-places">';
+
+ $this->indent( 1 );
+ foreach ( $footerlinks[ 'places' ] as $key ) {
+ $ret .= $this->indent() . '<li><small>' . $this->getSkinTemplate()->get( $key ) . '</small></li>';
+ }
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+ }
+
+ return $ret;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Grid.php b/www/wiki/skins/chameleon/src/Components/Grid.php
new file mode 100644
index 00000000..79c1472c
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Grid.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * File holding the Grid class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+
+/**
+ * The Grid class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Grid extends Container {
+
+ const ATTR_MODE = 'mode';
+ const MODE_FIXEDWIDTH = 'fixedwidth';
+ const MODE_FLUID = 'fluid';
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+
+ parent::__construct( $template, $domElement, $indent );
+
+ if( $this->isFluidMode() ) {
+ $this->addClasses( 'container-fluid' );
+ } else {
+ $this->addClasses( 'container' );
+ }
+ }
+
+ protected function isFluidMode() {
+ return $this->getAttribute( self::ATTR_MODE, self::MODE_FIXEDWIDTH ) === self::MODE_FLUID;
+ }
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/Html.php b/www/wiki/skins/chameleon/src/Components/Html.php
new file mode 100644
index 00000000..9297669e
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Html.php
@@ -0,0 +1,61 @@
+<?php
+/**
+ * File holding the Html class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The Html class.
+ *
+ * This component allows insertion of raw HTML into the page.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Html extends Component {
+
+ /**
+ * Builds the HTML code for the main container
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = '';
+
+ if ( $this->getDomElement() !== null ) {
+
+ $dom = $this->getDomElement()->ownerDocument;
+
+ foreach ( $this->getDomElement()->childNodes as $node ) {
+ $ret .= $dom->saveHTML( $node );
+ }
+ }
+
+ return $ret;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/LastmodInfo.php b/www/wiki/skins/chameleon/src/Components/LastmodInfo.php
new file mode 100644
index 00000000..29ef8d4c
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/LastmodInfo.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * File holding the LastmodInfo class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Chameleon
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The LastmodInfo class.
+ *
+ * An list of footer items (last modified time, view count, number of watching users, credits, copyright)
+ * Does not include so called places (about, privacy policy, and disclaimer links). They need to be added to the page elsewhere.
+ *
+ * This is an unstyled unordered list: <ul id="footer-info" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class LastmodInfo extends Component {
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+ parent::__construct( $template, $domElement , $indent );
+ $this->addClasses( 'list-unstyled small' );
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = $this->indent() . '<!-- footer links -->' .
+ $this->indent() .
+ \Html::openElement( 'ul', array(
+ 'class' => 'lastmod-info ' . $this->getClassString(),
+ 'id' => IdRegistry::getRegistry()->getId( 'lastmod-info' ),
+ )
+ );
+
+ $footerlinks = $this->getSkinTemplate()->getFooterLinks();
+ $this->indent( 1 );
+ foreach ( $footerlinks as $category => $links ) {
+ if ( $category !== 'places' ) {
+
+ $ret .= $this->indent() . '<!-- ' . htmlspecialchars( $category ) . ' -->';
+ foreach ( $links as $key ) {
+ if ( $key !== 'copyright' ) {
+ $ret .= $this->indent() . '<li>' . $this->getSkinTemplate()->get( $key ) . '</li>';
+ }
+ }
+
+ }
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+
+ return $ret;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/LegalInfo.php b/www/wiki/skins/chameleon/src/Components/LegalInfo.php
new file mode 100644
index 00000000..c302b624
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/LegalInfo.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * File holding the LegalInfo class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Chameleon
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The LegalInfo class.
+ *
+ * An list of footer items (last modified time, view count, number of watching users, credits, copyright)
+ * Does not include so called places (about, privacy policy, and disclaimer links). They need to be added to the page elsewhere.
+ *
+ * This is an unstyled unordered list: <ul id="footer-info" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class LegalInfo extends Component {
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+ parent::__construct( $template, $domElement , $indent );
+ $this->addClasses( 'list-unstyled small' );
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = $this->indent() . '<!-- footer links -->' .
+ $this->indent() .
+ \Html::openElement( 'ul', array(
+ 'class' => 'footer-legal-info ' . $this->getClassString(),
+ 'id' => IdRegistry::getRegistry()->getId( 'footer-legal-info' ),
+ )
+ );
+
+ $footerlinks = $this->getSkinTemplate()->getFooterLinks();
+ $this->indent( 1 );
+ foreach ( $footerlinks as $category => $links ) {
+ if ( $category !== 'places' ) {
+
+ $ret .= $this->indent() . '<!-- ' . htmlspecialchars( $category ) . ' -->';
+ foreach ( $links as $key ) {
+ if ( $key == 'copyright' ) {
+ $ret .= $this->indent() . '<li>' . $this->getSkinTemplate()->get( $key ) . '</li>';
+ }
+ }
+
+ }
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+
+ return $ret;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Logo.php b/www/wiki/skins/chameleon/src/Components/Logo.php
new file mode 100644
index 00000000..be592ed2
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Logo.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * File holding the Logo class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Linker;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The Logo class.
+ *
+ * The logo image as a link to the wiki main page wrapped in a div: <div id="p-logo" role="banner">
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Logo extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $attribs = NULL;
+ if ( $this->addLink() ) {
+ $attribs = array_merge(
+ array( 'href' => $this->getSkinTemplate()->data[ 'nav_urls' ][ 'mainpage' ][ 'href' ] ),
+ Linker::tooltipAndAccesskeyAttribs( 'p-logo' )
+ );
+ }
+
+ $contents = \Html::element( 'img',
+ array(
+ 'src' => $this->getSkinTemplate()->data[ 'logopath' ],
+ 'alt' => $this->getSkinTemplate()->data[ 'sitename' ],
+ )
+ );
+
+ return
+ $this->indent() . '<!-- logo and main page link -->' .
+ $this->indent() . \Html::openElement( 'div',
+ array(
+ 'id' => IdRegistry::getRegistry()->getId( 'p-logo' ),
+ 'class' => 'p-logo ' . $this->getClassString(),
+ 'role' => 'banner'
+ )
+ ) .
+ $this->indent( 1 ) . \Html::rawElement( 'a', $attribs, $contents ) .
+ $this->indent( -1 ) . '</div>' . "\n";
+ }
+
+ /**
+ * Return true if addLink attribute is unset or set to 'yes' in the Logo
+ * component description. Clicking on the logo should redirect to Main Page
+ * in that case. Else the logo should just display an inactive image.
+ *
+ * @return bool
+ */
+ private function addLink() {
+ if ( $this->getDomElement() === null ) {
+ return true;
+ }
+
+ $addLink = $this->getDomElement()->getAttribute( 'addLink' );
+
+ if ( $addLink === '' ) {
+ return true;
+ }
+
+ return filter_var( $addLink, FILTER_VALIDATE_BOOLEAN );
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/MainContent.php b/www/wiki/skins/chameleon/src/Components/MainContent.php
new file mode 100644
index 00000000..c732bd24
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/MainContent.php
@@ -0,0 +1,215 @@
+<?php
+/**
+ * File holding the MainContent class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The MainContent class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class MainContent extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $skintemplate = $this->getSkinTemplate();
+ $idRegistry = IdRegistry::getRegistry();
+
+ // START content
+ $ret =
+ $this->indent() . '<!-- start the content area -->' .
+ $this->indent() . $idRegistry->openElement( 'div',
+ array( 'id' => 'content', 'class' => 'mw-body ' . $this->getClassString() )
+ ) .
+
+ $idRegistry->element( 'a', array( 'id' => 'top' ) ) .
+ $this->indent(1) . $idRegistry->element( 'div', array( 'id' => 'mw-indicators', 'class' => 'mw-indicators', ), $this->buildMwIndicators() ) .
+
+ $this->indent() . '<div ' . \Html::expandAttributes( array(
+ 'id' => $idRegistry->getId( 'mw-js-message' ),
+ 'style' => 'display:none;'
+ )
+ ) . $skintemplate->get( 'userlangattributes' ) . '></div>';
+
+ $ret .= $this->buildContentHeader();
+
+ // if ( $skintemplate->get( 'subtitle' ) ) {
+
+ // TODO: should not use class 'small', better use class 'contentSub' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- subtitle line; used for various things like the subpage hierarchy -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub', 'class' => 'small' ), $skintemplate->get( 'subtitle' ) );
+
+ // }
+
+ if ( $skintemplate->get( 'undelete' ) ) {
+ // TODO: should not use class 'small', better use class 'contentSub2' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- undelete message -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub2', 'class' => 'small' ), $skintemplate->get( 'undelete' ) );
+ }
+
+
+ $ret .= $this->buildContentBody();
+ $ret .= $this->buildCategoryLinks();
+
+ $ret .= $this->indent( -1 ) . '</div>';
+ // END content
+
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildContentHeader() {
+
+ $skintemplate = $this->getSkinTemplate();
+ $idRegistry = IdRegistry::getRegistry();
+
+ $ret = $this->indent() . '<div class ="contentHeader">' .
+
+ $this->indent( 1 ) . '<!-- title of the page -->' .
+ $this->indent() . $idRegistry->element( 'h1', array( 'id' => 'firstHeading', 'class' => 'firstHeading' ), $skintemplate->get( 'title' ) ) .
+
+ $this->indent() . '<!-- tagline; usually goes something like "From WikiName" primary purpose of this seems to be for printing to identify the source of the content -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id'=> 'siteSub' ), $skintemplate->getMsg( 'tagline' )->escaped() );
+
+ if ( $skintemplate->get( 'subtitle' ) ) {
+
+ // TODO: should not use class 'small', better use class 'contentSub' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- subtitle line; used for various things like the subpage hierarchy -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub', 'class' => 'small' ), $skintemplate->get( 'subtitle' ) );
+
+ }
+
+ if ( $skintemplate->get( 'undelete' ) ) {
+ // TODO: should not use class 'small', better use class 'contentSub2' and do styling in a less file
+ $ret .=
+ $this->indent() . '<!-- undelete message -->' .
+ $this->indent() . $idRegistry->element( 'div', array( 'id' => 'contentSub2', 'class' => 'small' ), $skintemplate->get( 'undelete' ) );
+ }
+
+ // TODO: Do we need this? Seems to be an accessibility thing. It's used
+ // in vector to jump to the nav which is at the bottom of the document,
+ // but our nav is usually at the top
+ $ret .= $idRegistry->element( 'div', array( 'id' => 'jump-to-nav', 'class' => 'mw-jump' ),
+ $skintemplate->getMsg( 'jumpto' )->escaped() . '<a href="#mw-navigation">' . $skintemplate->getMsg( 'jumptonavigation' )->escaped() . '</a>' .
+ $skintemplate->getMsg( 'comma-separator' )->escaped() . '<a href="#p-search">' . $skintemplate->getMsg( 'jumptosearch' )->escaped() . '</a>'
+ );
+
+ $ret .= $this->indent( -1 ) . '</div>';
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildContentBody() {
+ return $this->indent() . IdRegistry::getRegistry()->element( 'div', array( 'id' => 'bodyContent' ),
+ $this->indent( 1 ) . '<!-- body text -->' . "\n" .
+ $this->indent() . $this->getSkinTemplate()->get( 'bodytext' ) .
+ $this->indent() . '<!-- end body text -->' .
+ $this->buildDataAfterContent() .
+ $this->indent( -1 )
+ );
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildCategoryLinks() {
+ // TODO: Category links should be a separate component, but
+ // * dataAfterContent should come after the the category links.
+ // * only one extension is known to use it dataAfterContent and it is geared specifically towards MonoBook
+ // => provide an attribute hideCatLinks for the XML and -if present- hide category links and assume somebody knows what they are doing
+ return
+ $this->indent() . '<!-- category links -->' .
+ $this->indent() . $this->getSkinTemplate()->get( 'catlinks' );
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildDataAfterContent() {
+
+ $skinTemplate = $this->getSkinTemplate();
+
+ if ( $skinTemplate->get( 'dataAfterContent' ) ) {
+ return
+ $this->indent() . '<!-- data blocks which should go somewhere after the body text, but not before the catlinks block-->' .
+ $this->indent() . $skinTemplate->get( 'dataAfterContent' );
+ }
+
+ return '';
+ }
+
+ /**
+ * @return string
+ */
+ private function buildMwIndicators() {
+
+ $idRegistry = IdRegistry::getRegistry();
+ $indicators = $this->getSkinTemplate()->get( 'indicators' );
+
+ if ( !is_array( $indicators ) || count( $indicators ) === 0 ) {
+ return '';
+ }
+
+ $this->indent( 1 );
+
+ $ret = '';
+
+ foreach ( $indicators as $id => $content ) {
+ $id = \Sanitizer::escapeId( "mw-indicator-$id" );
+
+ $ret .=
+ $this->indent() .
+ $idRegistry->element( 'div',
+ array(
+ 'id' => $id,
+ 'class' => "mw-indicator $id",
+ ),
+ $content
+ );
+ }
+
+ $ret .= $this->indent( -1 );
+
+ return $ret;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Menu.php b/www/wiki/skins/chameleon/src/Components/Menu.php
new file mode 100644
index 00000000..86ae5831
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Menu.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * File holding the Menu component class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Sanitizer;
+use Skins\Chameleon\Menu\MenuFactory;
+
+/**
+ * Class Menu
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Menu extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ if ( $this->getDomElement() === null ) {
+ return '';
+ }
+
+ $menu = $this->getMenu();
+
+ $menu->setMenuItemFormatter( function ( $href, $text, $depth, $subitems ) {
+ $href = Sanitizer::cleanUrl( $href );
+ $text = htmlspecialchars( $text );
+ if ( $depth === 1 && !empty( $subitems ) ) {
+ return "<li class=\"dropdown\"><a class=\"dropdown-toggle\" href=\"#\" data-toggle=\"dropdown\">$text<b class=\"caret\"></b></a>$subitems</li>";
+ } else {
+ return "<li><a href=\"$href\">$text</a>$subitems</li>";
+ }
+ } );
+
+ $menu->setItemListFormatter( function ( $rawItemsHtml, $depth ) {
+ if ( $depth === 0 ) {
+ return $rawItemsHtml;
+ } elseif ( $depth === 1 ) {
+ return "<ul class=\"dropdown-menu\">$rawItemsHtml</ul>";
+ } else {
+ return "<ul>$rawItemsHtml</ul>";
+ }
+
+ } );
+
+ return $menu->getHtml();
+ }
+
+ /**
+ * @return \Skins\Chameleon\Menu\Menu
+ */
+ public function getMenu() {
+
+ $domElement = $this->getDomElement();
+ $msgKey = $domElement->getAttribute( 'message' );
+
+ $menuFactory = new MenuFactory();
+
+ if ( empty( $msgKey ) ) {
+ return $menuFactory->getMenuFromMessageText( $domElement->textContent );
+ } else {
+ return $menuFactory->getMenuFromMessage( $msgKey );
+
+ }
+
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Modifications/HideFor.php b/www/wiki/skins/chameleon/src/Components/Modifications/HideFor.php
new file mode 100644
index 00000000..58d78a6c
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Modifications/HideFor.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * File containing the HideFor class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\Modifications;
+use Skins\Chameleon\Components\Silent;
+use Skins\Chameleon\PermissionsHelper;
+
+/**
+ * HideFor class
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ */
+class HideFor extends Modification {
+
+ private $permissionsHelper;
+
+ /**
+ * This method checks if the restriction is applicable and if necessary
+ * replaces the decorated component by a Silent component
+ */
+ protected function applyModification() {
+ if ( $this->isHidden() ) {
+ $c = $this->getComponent();
+ $this->setComponent( new Silent( $c->getSkinTemplate(), $c->getDomElement(), $c->getIndent() ) );
+ }
+ }
+
+ /**
+ * @return bool
+ */
+ private function isHidden() {
+ $p = $this->getPermissionsHelper();
+ return $p->userHasGroup( 'group' ) && $p->userHasPermission( 'permission' ) && $p->pageIsInNamespace( 'namespace' ) && $p->pageHasCategory( 'category' );
+ }
+
+ /**
+ * @return PermissionsHelper
+ */
+ private function getPermissionsHelper() {
+ if ( $this->permissionsHelper === null ) {
+ $this->permissionsHelper = new PermissionsHelper( $this->getSkinTemplate()->getSkin(), $this->getDomElementOfModification(), true );
+ }
+
+ return $this->permissionsHelper;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Modifications/Modification.php b/www/wiki/skins/chameleon/src/Components/Modifications/Modification.php
new file mode 100644
index 00000000..5fd34b19
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Modifications/Modification.php
@@ -0,0 +1,174 @@
+<?php
+/**
+ * File containing the Modification class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\Modifications;
+
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\Components\Component;
+
+/**
+ * Modification class
+ *
+ * This is the abstract base class of all modifications.
+ *
+ * Follows the Decorator pattern (Decorator role).
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+abstract class Modification extends Component {
+
+ private $component = null;
+
+ /**
+ * @param Component $component
+ * @param \DOMElement $domElement
+ */
+ public function __construct( Component $component, \DOMElement $domElement = null ) {
+
+ $this->component = $component;
+ parent::__construct( $component->getSkinTemplate(), $domElement, $component->getIndent() );
+ }
+
+ /**
+ * This method should apply any modifications to the decorated component
+ * available from the getComponent() method.
+ */
+ abstract protected function applyModification();
+
+ /**
+ * @return \DOMElement|null
+ */
+ public function getDomElementOfModification() {
+ return parent::getDomElement();
+ }
+
+ /**
+ * @return \DOMElement
+ */
+ public function getDomElementOfComponent() {
+ return $this->getDomElement();
+ }
+
+ /**
+ * Sets the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ */
+ public function setClasses( $classes ) {
+ $this->getComponent()->setClasses( $classes );
+ }
+
+ /**
+ * @return Component
+ */
+ public function getComponent() {
+ return $this->component;
+ }
+
+ /**
+ * @param Component $component
+ * @since 1.1
+ */
+ protected function setComponent( Component $component ) {
+ $this->component = $component;
+ }
+
+ /**
+ * Adds the given class to the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ * @return string | array
+ */
+ public function addClasses( $classes ) {
+ $this->getComponent()->addClasses( $classes );
+ }
+
+ /**
+ * @return ChameleonTemplate
+ */
+ public function getSkinTemplate() {
+ return $this->getComponent()->getSkinTemplate();
+ }
+
+ /**
+ * Returns the current indentation level
+ *
+ * @return int
+ */
+ public function getIndent() {
+ return $this->getComponent()->getIndent();
+ }
+
+ /**
+ * Returns the class string that should be assigned to the top-level html element of this component
+ *
+ * @return string
+ */
+ public function getClassString() {
+ return $this->getComponent()->getClassString();
+ }
+
+ /**
+ * Removes the given class from the class string that should be assigned to the top-level html element of this component
+ *
+ * @param string | array | null $classes
+ *
+ * @return string
+ */
+ public function removeClasses( $classes ) {
+ $this->getComponent()->removeClasses( $classes );
+ }
+
+ /**
+ * Returns the DOMElement from the description XML file associated with this element.
+ *
+ * @return \DOMElement
+ */
+ public function getDomElement() {
+ return $this->getComponent()->getDomElement();
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+ $this->applyModification();
+ return $this->getComponent()->getHtml();
+ }
+
+ /**
+ * @return array the resource loader modules needed by this component
+ */
+ public function getResourceLoaderModules() {
+ return $this->getComponent()->getResourceLoaderModules();
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Modifications/ShowOnlyFor.php b/www/wiki/skins/chameleon/src/Components/Modifications/ShowOnlyFor.php
new file mode 100644
index 00000000..7c137d81
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Modifications/ShowOnlyFor.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * File containing the ShowOnlyFor class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\Modifications;
+use Skins\Chameleon\Components\Silent;
+use Skins\Chameleon\PermissionsHelper;
+
+/**
+ * ShowOnlyFor class
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ */
+class ShowOnlyFor extends Modification {
+
+ private $permissionsHelper;
+
+ /**
+ * This method checks if the restriction is applicable and if necessary
+ * replaces the decorated component by a Silent component
+ */
+ protected function applyModification() {
+ if ( ! $this->isShown() ) {
+ $c = $this->getComponent();
+ $this->setComponent( new Silent( $c->getSkinTemplate(), $c->getDomElement(), $c->getIndent() ) );
+ }
+ }
+
+ /**
+ * @return bool
+ */
+ private function isShown() {
+ $p = $this->getPermissionsHelper();
+ return $p->userHasGroup( 'group' ) || $p->userHasPermission( 'permission' ) || $p->pageIsInNamespace( 'namespace' ) || $p->pageHasCategory( 'category' );
+ }
+
+ /**
+ * @return PermissionsHelper
+ */
+ private function getPermissionsHelper() {
+ if ( $this->permissionsHelper === null ) {
+ $this->permissionsHelper = new PermissionsHelper( $this->getSkinTemplate()->getSkin(), $this->getDomElementOfModification(), false );
+ }
+
+ return $this->permissionsHelper;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Modifications/Sticky.php b/www/wiki/skins/chameleon/src/Components/Modifications/Sticky.php
new file mode 100644
index 00000000..cbac2107
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Modifications/Sticky.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * File containing the Sticky class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\Modifications;
+
+/**
+ * Class Sticky
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Sticky extends Modification {
+
+ protected function applyModification() {
+ $this->getComponent()->addClasses( 'sticky' );
+ }
+
+ /**
+ * @return string[] the resource loader modules needed by this component
+ */
+ public function getResourceLoaderModules() {
+ $modules = parent::getResourceLoaderModules();
+ $modules[] = 'skin.chameleon.jquery-sticky';
+ return $modules;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/NavMenu.php b/www/wiki/skins/chameleon/src/Components/NavMenu.php
new file mode 100644
index 00000000..65b9aa8f
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavMenu.php
@@ -0,0 +1,221 @@
+<?php
+/**
+ * File holding the NavMenu class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Linker;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The NavMenu class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class NavMenu extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return string the HTML code
+ */
+ public function getHtml() {
+
+ $ret = '';
+
+ $sidebar = $this->getSkinTemplate()->getSidebar( array(
+ 'search' => false, 'toolbox' => $this->showTools(), 'languages' => $this->showLanguages()
+ )
+ );
+
+ $flatten = $this->getMenusToBeFlattened();
+
+ // create a dropdown for each sidebar box
+ foreach ( $sidebar as $menuName => $menuDescription ) {
+ $ret .= $this->getDropdownForNavMenu( $menuName, $menuDescription, array_search( $menuName, $flatten ) !== false );
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @return bool
+ */
+ private function showLanguages() {
+ return $this->getDomElement() !== null &&
+ filter_var( $this->getDomElement()->getAttribute( 'showLanguages' ), FILTER_VALIDATE_BOOLEAN );
+ }
+
+ /**
+ * @return bool
+ */
+ private function showTools() {
+ return $this->getDomElement() !== null &&
+ filter_var( $this->getDomElement()->getAttribute( 'showTools' ), FILTER_VALIDATE_BOOLEAN );
+ }
+
+ /**
+ * Create a single dropdown
+ *
+ * @param string $menuName
+ * @param mixed[] $menuDescription
+ * @param bool $flatten
+ *
+ * @return string
+ */
+ protected function getDropdownForNavMenu( $menuName, $menuDescription, $flatten = false ) {
+
+ // open list item containing the dropdown
+ $ret = $this->indent() . '<!-- ' . $menuName . ' -->';
+
+ if ( $flatten ) {
+
+ $ret .= $this->buildMenuItemsForDropdownMenu( $menuDescription );
+
+ } elseif ( !$this->hasSubmenuItems( $menuDescription ) ) {
+
+ $ret .= $this->buildDropdownMenuStub( $menuDescription );
+
+ } else {
+
+ $ret .= $this->buildDropdownOpeningTags( $menuDescription ) .
+ $this->buildMenuItemsForDropdownMenu( $menuDescription, 2 ) .
+ $this->buildDropdownClosingTags();
+
+
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @param mixed[] $menuDescription
+ * @param int $indent
+ *
+ * @return string
+ */
+ protected function buildMenuItemsForDropdownMenu( $menuDescription, $indent = 0 ) {
+
+ // build the list of submenu items
+ if ( $this->hasSubmenuItems( $menuDescription ) ) {
+
+ $menuitems = '';
+ $this->indent( $indent );
+
+ foreach ( $menuDescription['content'] as $key => $item ) {
+ $menuitems .= $this->indent() . $this->getSkinTemplate()->makeListItem( $key, $item );
+ }
+
+ $this->indent( - $indent );
+
+ return $menuitems;
+
+ } else {
+ return $this->indent() . '<!-- empty -->';
+ }
+ }
+
+ /**
+ * @param mixed[] $menuDescription
+ *
+ * @return bool
+ */
+ protected function hasSubmenuItems( $menuDescription ) {
+ return is_array( $menuDescription['content'] ) && count( $menuDescription['content'] ) > 0;
+ }
+
+ /**
+ * @param mixed[] $menuDescription
+ *
+ * @return string
+ */
+ protected function buildDropdownMenuStub( $menuDescription ) {
+ return
+ $this->indent() . \Html::rawElement( 'li',
+ array(
+ 'class' => '',
+ 'title' => Linker::titleAttrib( $menuDescription[ 'id' ] )
+ ),
+ '<a href="#">' . htmlspecialchars( $menuDescription[ 'header' ] ) . '</a>'
+ );
+ }
+
+ /**
+ * @param mixed[] $menuDescription
+ *
+ * @return string
+ */
+ protected function buildDropdownOpeningTags( $menuDescription ) {
+ // open list item containing the dropdown
+ $ret = $this->indent() . \Html::openElement( 'li',
+ array(
+ 'class' => 'dropdown',
+ 'title' => Linker::titleAttrib( $menuDescription['id'] ),
+ ) );
+
+ // add the dropdown toggle
+ $ret .= $this->indent( 1 ) . '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' .
+ htmlspecialchars( $menuDescription['header'] ) . ' <b class="caret"></b></a>';
+
+ // open list of dropdown menu items
+ $ret .= $this->indent() .
+ $this->indent() . \Html::openElement( 'ul',
+ array(
+ 'class' => 'dropdown-menu ' . $menuDescription[ 'id' ],
+ 'id' => IdRegistry::getRegistry()->getId( $menuDescription[ 'id' ] ),
+ )
+ );
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildDropdownClosingTags() {
+ return $this->indent() . '</ul>' . $this->indent( - 1 ) . '</li>';
+ }
+
+ /**
+ * @return string[]
+ */
+ public function getMenusToBeFlattened() {
+ $msg = \Message::newFromKey( 'skin-chameleon-navmenu-flatten' );
+
+ if ( $msg->exists() ) {
+ $flatten = array_map( 'trim', explode( ';', $msg->plain() ) );
+ } elseif ( $this->getDomElement() !== null ) {
+ $flatten =
+ array_map( 'trim',
+ explode( ';', $this->getDomElement()->getAttribute( 'flatten' ) ) );
+ } else {
+ $flatten = array();
+ }
+
+ return $flatten;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal.php
new file mode 100644
index 00000000..3694382a
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal.php
@@ -0,0 +1,256 @@
+<?php
+/**
+ * File holding the NavbarHorizontal class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use DOMElement;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The NavbarHorizontal class.
+ *
+ * A horizontal navbar containing the sidebar items.
+ * Does not include standard items (toolbox, search, language links). They need
+ * to be added to the page elsewhere
+ *
+ * The navbar is a list of lists wrapped in a nav element: <nav
+ * role="navigation" id="p-navbar" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class NavbarHorizontal extends Component {
+
+ private $mHtml = null;
+ private $htmlId = null;
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ if ( $this->mHtml === null ) {
+ $this->buildHtml();
+ }
+
+ return $this->mHtml;
+ }
+
+ /**
+ *
+ */
+ protected function buildHtml() {
+
+ if ( $this->getDomElement() === null ) {
+ $this->mHtml = '';
+ return;
+ }
+
+ $this->mHtml =
+ $this->buildFixedNavBarIfRequested() .
+ $this->buildNavBarOpeningTags() .
+ $this->buildNavBarComponents() .
+ $this->buildNavBarClosingTags();
+ }
+
+ /**
+ *
+ */
+ protected function buildFixedNavBarIfRequested() {
+ // if a fixed navbar is requested
+ if ( filter_var( $this->getDomElement()->getAttribute( 'fixed' ), FILTER_VALIDATE_BOOLEAN ) === true ||
+ $this->getDomElement()->getAttribute( 'position' ) === 'fixed'
+ ) {
+
+ // first build the actual navbar and set a class so it will be fixed
+ $this->getDomElement()->setAttribute( 'fixed', '0' );
+ $this->getDomElement()->setAttribute( 'position', '' );
+
+ $realNav = new self( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() );
+ $realNav->setClasses( $this->getClassString() . ' navbar-fixed-top' );
+
+ // then add an invisible copy of the nav bar that will act as a spacer
+ $this->addClasses( 'navbar-static-top invisible' );
+
+ return $realNav->getHtml();
+ } else {
+ return '';
+ }
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildNavBarOpeningTags() {
+ $openingTags =
+ $this->indent() . '<!-- navigation bar -->' .
+ $this->indent() . \Html::openElement( 'nav', array(
+ 'class' => 'navbar navbar-default p-navbar ' . $this->getClassString(),
+ 'role' => 'navigation',
+ 'id' => $this->getHtmlId()
+ )
+ ) .
+ $this->indent( 1 ) . '<div class="container">';
+
+ $this->indent( 1 );
+
+ return $openingTags;
+ }
+
+ /**
+ * @return string
+ */
+ private function getHtmlId() {
+ if ( $this->htmlId === null ) {
+ $this->htmlId = IdRegistry::getRegistry()->getId( 'mw-navigation' );
+ }
+ return $this->htmlId;
+ }
+
+ /**
+ *
+ */
+ protected function buildNavBarComponents() {
+
+ $elements = $this->buildNavBarElementsFromDomTree();
+
+ if ( !empty( $elements[ 'right' ] ) ) {
+
+ $elements[ 'left' ][ ] =
+ $this->indent( 1 ) . '<div class="navbar-right-aligned">' .
+ implode( $elements[ 'right' ] ) .
+ $this->indent() . '</div> <!-- navbar-right-aligned -->';
+
+ $this->indent( -1 );
+ }
+
+ return
+ $this->buildHead( $elements[ 'head' ] ) .
+ $this->buildTail( $elements[ 'left' ] );
+ }
+
+ /**
+ * @return string[][]
+ */
+ protected function buildNavBarElementsFromDomTree() {
+
+ $elements = array(
+ 'head' => array(),
+ 'left' => array(),
+ 'right' => array(),
+ );
+
+ /** @var \DOMElement[] $children */
+ $children = $this->getDomElement()->hasChildNodes() ? $this->getDomElement()->childNodes : array();
+
+ // add components
+ foreach ( $children as $node ) {
+ $this->buildAndCollectNavBarElementFromDomElement( $node, $elements );
+ }
+ return $elements;
+ }
+
+ /**
+ * @param DOMElement $node
+ * @param $elements
+ */
+ protected function buildAndCollectNavBarElementFromDomElement( $node, &$elements ) {
+
+ if ( $node instanceof DOMElement && $node->tagName === 'component' && $node->hasAttribute( 'type' ) ) {
+
+ $position = $node->getAttribute( 'position' );
+
+ if ( !array_key_exists( $position, $elements ) ) {
+ $position = 'left';
+ }
+
+ $indentation = ( $position === 'right' ) ? 2 : 1;
+
+ $this->indent( $indentation );
+ $html = $this->buildNavBarElementFromDomElement( $node );
+ $this->indent( -$indentation );
+
+ $elements[ $position ][ ] = $html;
+
+ // } else {
+ // TODO: Warning? Error?
+ }
+ }
+
+ /**
+ * @param \DomElement $node
+ *
+ * @return string
+ */
+ protected function buildNavBarElementFromDomElement( $node ) {
+ return $this->getSkin()->getComponentFactory()->getComponent( $node, $this->getIndent() )->getHtml();
+ }
+
+ /**
+ * @param string[] $headElements
+ *
+ * @return string
+ */
+ protected function buildHead( $headElements ) {
+
+ $head =
+ $this->indent() . "<div class=\"navbar-header\">\n" .
+ $this->indent( 1 ) . "<button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#" . $this->getHtmlId() . "-collapse\">" .
+ $this->indent( 1 ) . "<span class=\"sr-only\">Toggle navigation</span>" .
+ $this->indent() . str_repeat( "<span class=\"icon-bar\"></span>", 3 ) .
+ $this->indent( -1 ) . "</button>\n" .
+ implode( '', $headElements ) . "\n" .
+ $this->indent( -1 ) . "</div>\n";
+
+ return $head;
+ }
+
+ /**
+ * @param string[] $tailElements
+ *
+ * @return string
+ */
+ protected function buildTail( $tailElements ) {
+
+ return
+ $this->indent() . '<div class="collapse navbar-collapse" id="' . $this->getHtmlId() . '-collapse">' .
+ implode( '', $tailElements ) .
+ $this->indent() . '</div><!-- /.navbar-collapse -->';
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildNavBarClosingTags() {
+ return
+ $this->indent( -1 ) . '</div>' .
+ $this->indent( -1 ) . '</nav>' . "\n";
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Logo.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Logo.php
new file mode 100644
index 00000000..d4e42823
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Logo.php
@@ -0,0 +1,54 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\Logo class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\Logo as GenLogo;
+
+/**
+ * The NavbarHorizontal\Logo class.
+ *
+ * Provides a Logo component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class Logo extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+
+ $logo = new GenLogo( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() );
+ $logo->addClasses( 'navbar-brand' );
+
+ return $logo->getHtml();
+ }
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Menu.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Menu.php
new file mode 100644
index 00000000..e47dca25
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/Menu.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\Menu class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\Menu as GenMenu;
+
+/**
+ * The NavbarHorizontal\Logo class.
+ *
+ * Provides a Menu component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class Menu extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+ $menu = new GenMenu( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() );;
+ return '<ul class="nav navbar-nav">' . $menu->getHtml() . "</ul>\n";
+ }
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/NavMenu.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/NavMenu.php
new file mode 100644
index 00000000..1cc15c28
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/NavMenu.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\NavMenu class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\NavMenu as GenNavMenu;
+
+/**
+ * The NavbarHorizontal\NavMenu class.
+ *
+ * Provides a NavMenu component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class NavMenu extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+ $navMenu = new GenNavMenu( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() );;
+ return '<ul class="nav navbar-nav">' . $navMenu->getHtml() . "</ul>\n";
+ }
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageTools.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageTools.php
new file mode 100644
index 00000000..58776077
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageTools.php
@@ -0,0 +1,159 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\PageTools class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\PageTools as GenPageTools;
+
+/**
+ * The NavbarHorizontal\PageTools class.
+ *
+ * Provides a PageTools component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class PageTools extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+
+ $ret = '';
+
+ $pageTools = new GenPageTools( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() + 1 );
+
+ $pageTools->setFlat( true );
+ $pageTools->removeClasses( 'text-center list-inline' );
+ $pageTools->addClasses( 'dropdown-menu' );
+
+ $editLinkHtml = $this->getEditLinkHtml( $pageTools );
+
+ $pageToolsHtml = $pageTools->getHtml();
+
+ if ( $editLinkHtml || $pageToolsHtml ) {
+ $ret =
+ $this->indent() . '<!-- page tools -->' .
+ $this->indent() . '<ul class="navbar-tools navbar-nav" >';
+
+ if ( $editLinkHtml !== '' ) {
+ $ret .= $this->indent( 1 ) . $editLinkHtml;
+ }
+
+ if ( $pageToolsHtml !== '' ) {
+ $ret .=
+ $this->indent( $editLinkHtml !== '' ? 0 : 1 ) . '<li class="navbar-tools-tools dropdown">' .
+ $this->indent( 1 ) . '<a data-toggle="dropdown" class="dropdown-toggle" href="#" title="' . $this->getSkinTemplate()->getMsg( 'specialpages-group-pagetools' )->text() . '" ><span>...</span></a>' .
+ $pageToolsHtml .
+ $this->indent( -1 ) . '</li>';
+ }
+ $ret .=
+ $this->indent( $editLinkHtml !== '' ? 0 : -1 ) . '</ul>' . "\n";
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @param GenPageTools $pageTools
+ * @return string
+ */
+ protected function getEditLinkHtml( $pageTools ) {
+
+ $pageToolsStructure = $pageTools->getPageToolsStructure();
+
+ if ( ! array_key_exists( 'views', $pageToolsStructure ) ) {
+ return '';
+ }
+
+ foreach ( $this->getReplaceableEditActionIds() as $id ) {
+
+ if ( array_key_exists( $id, $pageToolsStructure[ 'views' ] ) ) {
+ return $this->getLinkAndRemoveFromPageToolStructure( $pageTools, $id );
+ }
+ }
+
+ return '';
+ }
+
+ /**
+ * @param GenPageTools $pageTools
+ * @param string $editActionId
+ *
+ * @return string
+ */
+ protected function getLinkAndRemoveFromPageToolStructure( $pageTools, $editActionId ) {
+
+ $pageToolsStructure = $pageTools->getPageToolsStructure();
+ $editActionStructure = $pageToolsStructure[ 'views' ][ $editActionId ];
+
+ $editActionStructure[ 'text' ] = '';
+
+ if ( array_key_exists( 'class', $editActionStructure ) ) {
+ $editActionStructure[ 'class' ] .= ' navbar-tools-tools';
+ } else {
+ $editActionStructure[ 'class' ] = 'navbar-tools-tools';
+ }
+
+ $options = array (
+ 'text-wrapper' => array(
+ 'tag' => 'span',
+ 'attributes' => array('class' => 'glyphicon glyphicon-pencil',)
+ ),
+ );
+
+ $editLinkHtml = $this->getSkinTemplate()->makeListItem(
+ $editActionId,
+ $editActionStructure,
+ $options
+ );
+
+ $pageTools->setRedundant( $editActionId );
+
+ return $editLinkHtml;
+ }
+
+ /**
+ * @return string[]
+ */
+ protected function getReplaceableEditActionIds() {
+
+ $editActionIds = array( 've-edit', 'edit' );
+
+ if ( array_key_exists( 'sfgRenameEditTabs', $GLOBALS ) && $GLOBALS[ 'sfgRenameEditTabs' ] === true ||
+ array_key_exists( 'wgPageFormsRenameEditTabs', $GLOBALS ) && $GLOBALS[ 'wgPageFormsRenameEditTabs' ] === true ) {
+
+ $editActionIds = array_merge( array( 'formedit', 'form_edit' ), $editActionIds );
+ }
+
+ return $editActionIds;
+ }
+
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageToolsAdaptable.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageToolsAdaptable.php
new file mode 100644
index 00000000..e82e2ada
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PageToolsAdaptable.php
@@ -0,0 +1,209 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\PageToolsAdaptable class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\PageTools as GenPageTools;
+
+/**
+ * The NavbarHorizontal\PageToolsAdaptable class.
+ *
+ * Provides an adaptable PageTools component to be included in a NavbarHorizontal component.
+ *
+ * @author Tobias Oetterer
+ * @since 1.6
+ * @ingroup Skins
+ */
+class PageToolsAdaptable extends PageTools
+{
+
+ const GLYPH_ICON_UNKNOWN_ACTION = 'asterisk';
+
+ /**
+ * @var string[]
+ */
+ private $mShowActions = null;
+
+ /**
+ * @var string[]
+ */
+ private $mValidActionsToShow = null;
+
+ /**
+ * @var array
+ */
+ private static $sGlyphIconForAction = array(
+ 'delete' => 'trash',
+ 'edit' => 'edit',
+ 'formedit' => 'list-alt',
+ 'history' => 'education',
+ 'move' => 'share-alt',
+ 'protect' => 'folder-close',
+ 'purge' => 'repeat',
+ 'undelete' => 'road',
+ 'unprotect' => 'folder-open',
+ 'unwatch' => 'star',
+ 've-edit' => 'pencil',
+ 'view' => 'eye-open',
+ 'watch' => 'star-empty',
+ );
+
+ /**
+ * @param string $action
+ * @param string $fallback
+ * @return null|string
+ */
+ public static function getGlyphIconForAction( $action, $fallback = null ) {
+ if ( isset( self::$sGlyphIconForAction[$action] ) ) {
+ return self::$sGlyphIconForAction[$action];
+ }
+ return $fallback !== null ? $fallback : self::GLYPH_ICON_UNKNOWN_ACTION;
+ }
+
+ /**
+ * @param string $icon
+ * @param string $action
+ */
+ public static function setGlyphIconForAction( $icon, $action ) {
+ if ( is_string( $icon ) && $icon && is_string( $action ) && $action ) {
+ self::$sGlyphIconForAction[$action] = $icon;
+ }
+ }
+
+ /**
+ * @param GenPageTools $pageTools
+ * @return string
+ * @throws \MWException
+ */
+ protected function getEditLinkHtml( $pageTools ) {
+
+ $pageToolsStructure = $pageTools->getPageToolsStructure();
+ if ( !array_key_exists( 'views', $pageToolsStructure ) ) {
+ return '';
+ }
+
+ $items = array();
+
+ $showActions = $this->getShowActions( $pageTools );
+
+ foreach ( $showActions as $actionId ) {
+
+ if ( array_key_exists( $actionId, $pageToolsStructure['views'] ) ) {
+ $items[] = $this->getLinkAndRemoveFromPageToolStructure( $pageTools, $actionId );
+ }
+ }
+
+ return implode(
+ $this->indent() . '</ul>' . $this->indent() . '<ul class="navbar-tools navbar-nav" >' . $this->indent() . "\t",
+ $items
+ );
+ }
+
+ /**
+ * @param string $action
+ * @return string
+ */
+ protected function getGlyphIconClassFor( $action ) {
+ return 'glyphicon glyphicon-' . self::getGlyphIconForAction( $action );
+ }
+
+ /**
+ * @param GenPageTools $pageTools
+ * @param string $editActionId
+ *
+ * @return string
+ */
+ protected function getLinkAndRemoveFromPageToolStructure( $pageTools, $editActionId ) {
+
+ $pageToolsStructure = $pageTools->getPageToolsStructure();
+ $editActionStructure = $pageToolsStructure['views'][$editActionId];
+
+ $editActionStructure['text'] = '';
+
+ if ( array_key_exists( 'class', $editActionStructure ) ) {
+ $editActionStructure['class'] .= ' navbar-tools-tools';
+ } else {
+ $editActionStructure['class'] = 'navbar-tools-tools';
+ }
+
+ $options = array(
+ 'text-wrapper' => array(
+ 'tag' => 'span',
+ 'attributes' => array( 'class' => $this->getGlyphIconClassFor( $editActionId ), ),
+ ),
+ );
+
+ $editLinkHtml = $this->getSkinTemplate()->makeListItem(
+ $editActionId,
+ $editActionStructure,
+ $options
+ );
+
+ $pageTools->setRedundant( $editActionId );
+
+ return $editLinkHtml;
+ }
+
+ /**
+ * @param @param GenPageTools $pageTools
+ * @return string[]|null
+ */
+ protected function getShowActions( $pageTools ) {
+ if ( $this->mShowActions !== null ) {
+ return $this->mShowActions;
+ }
+ $showActions = array();
+
+ $showAttributesString = $this->getDomElement() !== null ? $this->getDomElement()->getAttribute( 'show' ) : '';
+
+ if ( $showAttributesString != '' ) {
+ foreach ( explode( ',', $showAttributesString ) as $requestedShowAction ) {
+ if ( in_array( $requestedShowAction, $this->getValidActionsToShow( $pageTools ) ) ) {
+ $showActions[] = $requestedShowAction;
+ }
+ }
+ }
+ return $this->mShowActions = $showActions;
+ }
+
+ /**
+ * @param GenPageTools $pageTools
+ * @return string[]
+ */
+ protected function getValidActionsToShow( $pageTools ) {
+ if ( $this->mValidActionsToShow !== null ) {
+ return $this->mValidActionsToShow;
+ }
+ $pageToolsStructure = $pageTools->getPageToolsStructure();
+ $validActionsToShow = array();
+
+ foreach ( $pageToolsStructure as $group => $groupStructure ) {
+ $validActionsToShow = array_merge( $validActionsToShow, array_keys( $groupStructure ) );
+ }
+ return $this->mValidActionsToShow = $validActionsToShow;
+ }
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PersonalTools.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PersonalTools.php
new file mode 100644
index 00000000..540e10d0
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/PersonalTools.php
@@ -0,0 +1,117 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\PersonalTools class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Hooks;
+use Skins\Chameleon\Components\Component;
+
+/**
+ * The NavbarHorizontal\PersonalTools class.
+ *
+ * Provides a PersonalTools component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class PersonalTools extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+
+ $user = $this->getSkinTemplate()->getSkin()->getUser();
+
+ if ( $user->isLoggedIn() ) {
+ $toolsClass = 'navbar-userloggedin';
+ $toolsLinkText = $this->getSkinTemplate()->getMsg( 'chameleon-loggedin' )->params( $user->getName() )->text();
+ } else {
+ $toolsClass = 'navbar-usernotloggedin';
+ $toolsLinkText = $this->getSkinTemplate()->getMsg( 'chameleon-notloggedin' )->text();
+ }
+
+ $linkText = '<span class="glyphicon glyphicon-user"></span>';
+ \Hooks::run('ChameleonNavbarHorizontalPersonalToolsLinkText', array( &$linkText, $this->getSkin() ) );
+
+ // start personal tools element
+ $ret =
+ $this->indent() . '<!-- personal tools -->' .
+ $this->indent() . '<ul class="'.$this->getClassString().' navbar-tools navbar-nav" >' .
+ $this->indent( 1 ) . '<li class="dropdown navbar-tools-tools">' .
+ $this->indent( 1 ) . '<a class="dropdown-toggle ' . $toolsClass . '" href="#" data-toggle="dropdown" title="' . $toolsLinkText . '" >' . $linkText . '</a>' .
+ $this->indent() . '<ul class="p-personal-tools dropdown-menu dropdown-menu-right" >';
+
+ $this->indent( 1 );
+
+ // add personal tools (links to user page, user talk, prefs, ...)
+ foreach ( $this->getSkinTemplate()->getPersonalTools() as $key => $item ) {
+ $ret .= $this->indent() . $this->getSkinTemplate()->makeListItem( $key, $item );
+ }
+
+ $ret .=
+ $this->indent( -1 ) . '</ul>' .
+ $this->indent( -1 ) . '</li>';
+
+ // if the user is logged in, add the newtalk notifier
+ if ( $user->isLoggedIn() ) {
+
+ $newMessagesAlert = '';
+ $newtalks = $user->getNewMessageLinks();
+ $out = $this->getSkinTemplate()->getSkin()->getOutput();
+
+ // Allow extensions to disable the new messages alert;
+ // since we do not display the link text, we ignore the actual value returned in $newMessagesAlert
+ if ( Hooks::run( 'GetNewMessagesAlert', array( &$newMessagesAlert, $newtalks, $user, $out ) ) ) {
+
+ if ( count( $user->getNewMessageLinks() ) > 0 ) {
+ $newtalkClass = 'navbar-newtalk-available';
+ $newtalkLinkText = $this->getSkinTemplate()->getMsg( 'chameleon-newmessages' )->text();
+ } else {
+ $newtalkClass = 'navbar-newtalk-not-available';
+ $newtalkLinkText = $this->getSkinTemplate()->getMsg( 'chameleon-nonewmessages' )->text();
+ }
+
+ $linkText = '<span class="glyphicon glyphicon-envelope"></span>';
+ \Hooks::run('ChameleonNavbarHorizontalNewTalkLinkText', array( &$linkText, $this->getSkin() ) );
+
+ $ret .= $this->indent() . '<li class="navbar-newtalk-notifier">' .
+ $this->indent( 1 ) . '<a class="dropdown-toggle ' . $newtalkClass . '" title="' .
+ $newtalkLinkText . '" href="' . $user->getTalkPage()->getLinkURL( 'redirect=no' ) . '">' . $linkText . '</a>' .
+ $this->indent( -1 ) . '</li>';
+
+ }
+
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' . "\n";
+
+ return $ret;
+ }
+
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/SearchBar.php b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/SearchBar.php
new file mode 100644
index 00000000..d665b2d9
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NavbarHorizontal/SearchBar.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * File holding the NavbarHorizontal\PersonalTools class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\SearchBar as GenericSearchBar;
+
+/**
+ * The NavbarHorizontal\PersonalTools class.
+ *
+ * Provides a SearchBar component to be included in a NavbarHorizontal component.
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ */
+class SearchBar extends Component {
+
+ /**
+ * @return String
+ */
+ public function getHtml() {
+
+ $search = new GenericSearchBar( $this->getSkinTemplate(), $this->getDomElement(), $this->getIndent() );
+ $search->addClasses( 'navbar-form' );
+
+ return $search->getHtml();
+ }
+
+
+} \ No newline at end of file
diff --git a/www/wiki/skins/chameleon/src/Components/NewtalkNotifier.php b/www/wiki/skins/chameleon/src/Components/NewtalkNotifier.php
new file mode 100644
index 00000000..d9f6cf76
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/NewtalkNotifier.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * File holding the NewtalkNotifier class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The NewtalkNotifier class.
+ *
+ * A message to a user about new messages on their talkpage
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class NewtalkNotifier extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $data = $this->getSkinTemplate()->data;
+
+ if ( array_key_exists( 'newtalk', $data ) && $data[ 'newtalk' ] ) {
+ return $this->indent() . '<!-- message to a user about new messages on their talkpage -->' .
+ $this->indent() . '<span class="usermessage ' . $this->getClassString() . '">' . $this->getSkinTemplate()->data[ 'newtalk' ] . '</span>';
+ } else {
+ return '';
+ }
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/PageTools.php b/www/wiki/skins/chameleon/src/Components/PageTools.php
new file mode 100644
index 00000000..56ca3a0d
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/PageTools.php
@@ -0,0 +1,267 @@
+<?php
+/**
+ * File holding the PageTools class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Action;
+use MWNamespace;
+use Skins\Chameleon\ChameleonTemplate;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The PageTools class.
+ *
+ * A unordered list containing content navigation links (Page, Discussion,
+ * Edit, History, Move, ...)
+ *
+ * The tab list is a list of lists: '<ul id="p-contentnavigation">
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class PageTools extends Component {
+
+ private $mFlat = false;
+ private $mPageToolsStructure = null;
+
+ /**
+ * @param ChameleonTemplate $template
+ * @param \DOMElement|null $domElement
+ * @param int $indent
+ */
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+
+ parent::__construct( $template, $domElement, $indent );
+
+ // add classes for the normal case where the page tools are displayed as a first class element;
+ // these classes should be removed if the page tools are part of another element, e.g. nav bar
+ $this->addClasses( 'list-inline text-center' );
+ }
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return string the HTML code
+ */
+ public function getHtml() {
+
+ $contentNavigation = $this->getPageToolsStructure();
+
+ if ( $this->hideSelectedNamespace() ) {
+ unset( $contentNavigation[ 'namespaces' ][ $this->getNamespaceKey() ] );
+ }
+
+ $ret = '';
+
+ $this->indent( 2 );
+ foreach ( $contentNavigation as $category => $tabsDescription ) {
+ $ret .= $this->buildTabGroup( $category, $tabsDescription );
+ }
+ $this->indent( -2 );
+
+ if ( $ret !== '' ) {
+ $ret =
+ $this->indent( 1 ) . '<!-- Content navigation -->' .
+ $this->indent() . \Html::openElement( 'ul',
+ array(
+ 'class' => 'p-contentnavigation ' . $this->getClassString(),
+ 'id' => IdRegistry::getRegistry()->getId( 'p-contentnavigation' ),
+ ) ) .
+ $ret .
+ $this->indent() . '</ul>';
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @return mixed
+ */
+ public function &getPageToolsStructure() {
+ if ( $this->mPageToolsStructure === null ) {
+ $this->mPageToolsStructure = $this->getSkinTemplate()->get( 'content_navigation' , null );
+ }
+ return $this->mPageToolsStructure;
+ }
+
+ /**
+ * @return bool
+ */
+ protected function hideSelectedNamespace() {
+ return
+ $this->getDomElement() !== null &&
+ filter_var( $this->getDomElement()->getAttribute( 'hideSelectedNameSpace' ), FILTER_VALIDATE_BOOLEAN ) &&
+ Action::getActionName( $this->getSkin() ) === 'view';
+ }
+
+ /**
+ * Generate strings used for xml 'id' names in tabs
+ *
+ * Stolen from MW's Title::getNamespaceKey()
+ *
+ * Difference: This function here reports the actual namespace while the
+ * one in Title reports the subject namespace, i.e. no talk namespaces
+ *
+ * @return string
+ */
+ public function getNamespaceKey() {
+ global $wgContLang;
+
+ // Gets the subject namespace if this title
+ $namespace = $this->getSkinTemplate()->getSkin()->getTitle()->getNamespace();
+
+ // Checks if canonical namespace name exists for namespace
+ if ( MWNamespace::exists( $this->getSkinTemplate()->getSkin()->getTitle()->getNamespace() ) ) {
+ // Uses canonical namespace name
+ $namespaceKey = MWNamespace::getCanonicalName( $namespace );
+ } else {
+ // Uses text of namespace
+ $namespaceKey = $this->getSkinTemplate()->getSkin()->getTitle()->getNsText();
+ }
+
+ // Makes namespace key lowercase
+ $namespaceKey = $wgContLang->lc( $namespaceKey );
+ // Uses main
+ if ( $namespaceKey == '' ) {
+ $namespaceKey = 'main';
+ }
+ // Changes file to image for backwards compatibility
+ if ( $namespaceKey == 'file' ) {
+ $namespaceKey = 'image';
+ }
+ return $namespaceKey;
+ }
+
+ /**
+ * @param string $category
+ * @param mixed[][] $tabsDescription
+ *
+ * @return string
+ */
+ protected function buildTabGroup( $category, $tabsDescription ) {
+ // TODO: visually group all links of one category (e.g. some space between categories)
+
+ if ( empty( $tabsDescription ) ) {
+ return '';
+ }
+
+ $ret = $this->indent() . '<!-- ' . $category . ' -->';
+
+ if ( !$this->mFlat ) {
+ $ret .= $this->buildTabGroupOpeningTags( $category );
+
+ }
+
+ foreach ( $tabsDescription as $key => $tabDescription ) {
+ $ret .= $this->buildTab( $tabDescription, $key );
+ }
+
+ if ( !$this->mFlat ) {
+ $ret .= $this->buildTabGroupClosingTags();
+ }
+ return $ret;
+ }
+
+ /**
+ * @param string $category
+ *
+ * @return string
+ */
+ protected function buildTabGroupOpeningTags( $category ) {
+ // output the name of the current category (e.g. 'namespaces', 'views', ...)
+ $ret = $this->indent() .
+ \Html::openElement( 'li', array( 'id' => IdRegistry::getRegistry()->getId( 'p-' . $category ) ) ) .
+ $this->indent( 1 ) . '<ul class="list-inline" >';
+
+ $this->indent( 1 );
+ return $ret;
+ }
+
+ /**
+ * @param mixed[] $tabDescription
+ * @param string $key
+ *
+ * @return string
+ */
+ protected function buildTab( $tabDescription, $key ) {
+
+ // skip redundant links (i.e. the 'view' link)
+ // TODO: make this dependent on an option
+ if ( array_key_exists( 'redundant', $tabDescription ) && $tabDescription[ 'redundant' ] === true ) {
+ return '';
+ }
+
+ // apply a link class if specified, e.g. for the currently active namespace
+ $options = array();
+ if ( array_key_exists( 'class', $tabDescription ) ) {
+ $options[ 'link-class' ] = $tabDescription[ 'class' ];
+ }
+
+ return $this->indent() . $this->getSkinTemplate()->makeListItem( $key, $tabDescription, $options );
+
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildTabGroupClosingTags() {
+ return $this->indent( -1 ) . '</ul>' .
+ $this->indent( -1 ) . '</li>';
+ }
+
+ /**
+ * Set the page tool menu to have submenus or not
+ *
+ * @param boolean $flat
+ */
+ public function setFlat( $flat ) {
+ $this->mFlat = $flat;
+ }
+
+ /**
+ * Set the page tool menu to have submenus or not
+ *
+ * @param string|string[] $tools
+ */
+ public function setRedundant( $tools ) {
+ if ( is_string( $tools ) ) {
+ $tools = array( $tools );
+ }
+
+ $pageToolsStructure = &$this->getPageToolsStructure();
+
+ foreach ( $tools as $tool ) {
+ foreach ( $pageToolsStructure as $group => $groupStructure ) {
+ if ( array_key_exists( $tool, $groupStructure ) ) {
+ $pageToolsStructure[ $group ][ $tool ][ 'redundant' ] = true;
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/PersonalTools.php b/www/wiki/skins/chameleon/src/Components/PersonalTools.php
new file mode 100644
index 00000000..fed5a695
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/PersonalTools.php
@@ -0,0 +1,82 @@
+<?php
+/**
+ * File holding the PersonalTools class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The PersonalTools class.
+ *
+ * An unordered list of personal tools: <ul id="p-personal" >...
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class PersonalTools extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $ret = $this->indent() . '<!-- personal tools -->' .
+ $this->indent() . '<div class="p-personal ' . $this->getClassString() . '" id="p-personal" >';
+
+ $ret .= $this->indent( 1 ) . '<ul class="p-personal-tools list-inline pull-right" >';
+
+ $this->indent( 1 );
+
+ // add personal tools (links to user page, user talk, prefs, ...)
+ foreach ( $this->getSkinTemplate()->getPersonalTools() as $key => $item ) {
+ $ret .= $this->indent() . $this->getSkinTemplate()->makeListItem( $key, $item );
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' .
+ $this->indent( -1 ) . '</div>' . "\n" .
+ $this->getNewtalkNotifier();
+
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ private function getNewtalkNotifier() {
+
+ if ( $this->getDomElement() !== null && filter_var( $this->getDomElement()->getAttribute( 'hideNewtalkNotifier' ), FILTER_VALIDATE_BOOLEAN ) ) {
+ return '';
+ }
+
+ // include message to a user about new messages on their talkpage
+ $newtalkNotifier = new NewtalkNotifier( $this->getSkinTemplate(), null, $this->getIndent() + 2 );
+
+ return $this->indent() . '<div class="newtalk-notifier pull-right">' . $newtalkNotifier->getHtml() .
+ $this->indent() . '</div>';
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Row.php b/www/wiki/skins/chameleon/src/Components/Row.php
new file mode 100644
index 00000000..70675934
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Row.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * File holding the Row class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Skins\Chameleon\ChameleonTemplate;
+
+/**
+ * The Row class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Row extends Container {
+
+ public function __construct( ChameleonTemplate $template, \DOMElement $domElement = null, $indent = 0 ) {
+
+ parent::__construct( $template, $domElement, $indent );
+ $this->addClasses( 'row' );
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/SearchBar.php b/www/wiki/skins/chameleon/src/Components/SearchBar.php
new file mode 100644
index 00000000..89937975
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/SearchBar.php
@@ -0,0 +1,144 @@
+<?php
+/**
+ * File holding the SearchBar class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use \Linker;
+use Skins\Chameleon\IdRegistry;
+
+/**
+ * The SearchBar class.
+ *
+ * The search form wrapped in a div: <div id="p-search" role="search" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class SearchBar extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return string
+ */
+ public function getHtml() {
+
+ $ret = $this->indent() . '<!-- search form -->' .
+
+ $this->indent() . '<div ' . \Html::expandAttributes( array(
+ 'id' => IdRegistry::getRegistry()->getId( 'p-search' ),
+ 'class' => 'p-search ' . $this->getClassString(),
+ 'role' => 'search',
+ )
+ ) . Linker::tooltip( 'p-search' ) . '>' .
+
+ $this->indent( 1 ) . '<form ' . \Html::expandAttributes( array(
+ 'id' => IdRegistry::getRegistry()->getId( 'searchform' ),
+ 'class' => 'mw-search form-inline',
+ )
+ ) . ' action="' . $this->getSkinTemplate()->data[ 'wgScript' ] . '">' .
+
+ $this->indent( 1 ) . '<input type="hidden" name="title" value="' . $this->getSkinTemplate()->data[ 'searchtitle' ] . '" />' .
+ $this->indent() . '<div class="input-group">' .
+ $this->indent( 1 ) . $this->getSkinTemplate()->makeSearchInput( array( 'id' => IdRegistry::getRegistry()->getId( 'searchInput' ), 'type' => 'text', 'class' => 'form-control' ) ) .
+ $this->indent() . '<div class="input-group-btn">';
+
+ $this->indent( 1 );
+
+ $ret .=
+ $this->getGoButton() .
+ $this->getSearchButton() .
+ $this->indent( -1 ) . '</div>' .
+ $this->indent( -1 ) . '</div>' .
+ $this->indent( -1 ) . '</form>' .
+ $this->indent( -1 ) . '</div>' . "\n";
+
+ return $ret;
+ }
+
+ /**
+ * @return string
+ */
+ private function getGoButton() {
+
+ $valueAttr = 'searcharticle';
+ $idAttr = 'searchGoButton';
+ $nameAttr = 'go';
+ $glyphicon = ( $this->getAttribute( 'buttons' ) === 'go' ? 'search' : 'share-alt' );
+
+ return $this->getButton( 'go', $valueAttr, $idAttr, $nameAttr, $glyphicon );
+ }
+
+ /**
+ * @return string
+ */
+ private function getSearchButton() {
+
+ $valueAttr = 'searchbutton';
+ $idAttr = 'mw-searchButton';
+ $nameAttr = 'fulltext';
+ $glyphicon = 'search';
+
+ return $this->getButton( 'search', $valueAttr, $idAttr, $nameAttr, $glyphicon );
+ }
+
+ /**
+ * @param $valueAttr
+ * @param $idAttr
+ * @param $nameAttr
+ * @param $glyphicon
+ * @return string
+ */
+ private function getButton( $button, $valueAttr, $idAttr, $nameAttr, $glyphicon ) {
+
+ if ( $this->shouldShowButton( $button ) ) {
+
+ $buttonAttrs = array(
+ 'value' => $this->getSkinTemplate()->getSkin()->msg( $valueAttr ),
+ 'id' => IdRegistry::getRegistry()->getId( $idAttr ),
+ 'name' => $nameAttr,
+ 'type' => 'submit',
+ 'class' => $idAttr . ' btn btn-default'
+ );
+
+ $buttonAttrs = array_merge(
+ $buttonAttrs,
+ Linker::tooltipAndAccesskeyAttribs( "search-$nameAttr" )
+ );
+
+ return $this->indent() . \Html::rawElement( 'button', $buttonAttrs, '<span class="glyphicon glyphicon-' . $glyphicon . '"></span>' );
+ }
+
+ return '';
+ }
+
+ private function shouldShowButton( $button ) {
+ $buttonsAttribute = $this->getAttribute( 'buttons' );
+ return $button === 'go' && $buttonsAttribute !== 'search' ||
+ $button === 'search' && $buttonsAttribute !== 'go';
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Silent.php b/www/wiki/skins/chameleon/src/Components/Silent.php
new file mode 100644
index 00000000..10726328
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Silent.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * File holding the Silent component class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+
+/**
+ * The Silent class.
+ *
+ * This component may be used as a placeholder during development.
+ *
+ * It is also used internally.
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ */
+class Silent extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+ return '';
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Components/SiteNotice.php b/www/wiki/skins/chameleon/src/Components/SiteNotice.php
new file mode 100644
index 00000000..1b1b53e6
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/SiteNotice.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * File holding the SiteNotice class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+/**
+ * The SiteNotice class.
+ *
+ * A simple div containing the site notice text: <div id="siteNotice" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class SiteNotice extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $data = $this->getSkinTemplate()->data;
+
+ if ( array_key_exists( 'sitenotice', $data ) && $data[ 'sitenotice' ] ) {
+
+ return $this->indent() . '<!-- sitenotice -->' .
+ $this->indent() . '<div id="siteNotice" class="siteNotice ' . $this->getClassString() . '" >' . $data[ 'sitenotice' ] . '</div>'
+ . "\n";
+ } else {
+ return "\n";
+ }
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/Structure.php b/www/wiki/skins/chameleon/src/Components/Structure.php
new file mode 100644
index 00000000..dee8a39e
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/Structure.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * File holding the Structure class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+use DOMElement;
+
+/**
+ * The Structure class.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class Structure extends Component {
+
+ private $subcomponents;
+
+ /**
+ * Builds the HTML code for the component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml(){
+ $ret = '';
+
+ foreach ( $this->getSubcomponents() as $component ) {
+ $ret .= $component->getHtml();
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @return string[] the resource loader modules needed by this component
+ */
+ public function getResourceLoaderModules() {
+ $modules = array();
+
+ foreach ( $this->getSubcomponents() as $component ) {
+ $modules = array_merge( $modules, $component->getResourceLoaderModules() );
+ }
+
+ return $modules;
+ }
+
+ /**
+ * @return Component[]
+ */
+ protected function getSubcomponents() {
+
+ if ( !isset ( $this->subcomponents ) ) {
+
+ $this->subcomponents = array();
+
+ $domElement = $this->getDomElement();
+
+ if ( $domElement !== null && $domElement instanceof DOMElement ) {
+
+ $children = $this->getDomElement()->childNodes;
+
+ foreach ( $children as $child ) {
+ if ( $child instanceof DOMElement ) {
+ $this->subcomponents[] = $this->getSkin()->getComponentFactory()->getComponent( $child, $this->getIndent() + 1 );
+ }
+ }
+
+ }
+ }
+
+ return $this->subcomponents;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Components/ToolbarHorizontal.php b/www/wiki/skins/chameleon/src/Components/ToolbarHorizontal.php
new file mode 100644
index 00000000..255cec14
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Components/ToolbarHorizontal.php
@@ -0,0 +1,142 @@
+<?php
+/**
+ * File containing the ToolbarHorizontal class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Components;
+
+use Hooks;
+use Linker;
+
+/**
+ * ToolbarHorizontal class
+ *
+ * A horizontal toolbar containing standard sidebar items (toolbox, language links).
+ *
+ * The toolbar is an unordered list in a nav element: <nav role="navigation" id="p-tb" >
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class ToolbarHorizontal extends Component {
+
+ /**
+ * Builds the HTML code for this component
+ *
+ * @return String the HTML code
+ */
+ public function getHtml() {
+
+ $skinTemplate = $this->getSkinTemplate();
+
+ $ret = $this->indent() . '<!-- ' . htmlspecialchars( $skinTemplate->getMsg( 'toolbox' )->text() ) . '-->' .
+ $this->indent() . '<nav class="navbar navbar-default p-tb ' . $this->getClassString() . '" id="p-tb" ' . Linker::tooltip( 'p-tb' ) . ' >' .
+ $this->indent( 1 ) . '<ul class="nav navbar-nav small">';
+
+ $this->indent( 1 );
+
+ // insert toolbox items
+ if ( !$this->hideTools() ) {
+ $ret .= $this->addTools( $skinTemplate );
+ }
+
+ // insert language links
+ if ( !$this->hideLanguages() ) {
+ $ret .= $this->addLanguageLinks( $skinTemplate );
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' .
+ $this->indent( -1 ) . '</nav>' . "\n";
+
+ return $ret;
+ }
+
+ /**
+ * @param $skinTemplate
+ * @return string
+ * @throws \FatalError
+ * @throws \MWException
+ */
+ private function addTools( $skinTemplate ) {
+
+ $ret = '';
+
+ // TODO: Do we need to care of dropdown menus here? E.g. RSS feeds? See SkinTemplateToolboxEnd.php:1485
+ foreach ( $skinTemplate->getToolbox() as $key => $tbitem ) {
+ $ret .= $this->indent() . $skinTemplate->makeListItem( $key, $tbitem );
+ }
+
+ ob_start();
+ // We pass an extra 'true' at the end so extensions using BaseTemplateToolbox
+ // can abort and avoid outputting double toolbox links
+ Hooks::run( 'SkinTemplateToolboxEnd', array( &$skinTemplate, true ) );
+ $ret .= $this->indent() . ob_get_contents();
+ ob_end_clean();
+ return $ret;
+ }
+
+ /**
+ * @param $skinTemplate
+ * @return string
+ * @throws \MWException
+ */
+ private function addLanguageLinks( $skinTemplate ) {
+
+ $ret = '';
+
+ if ( array_key_exists( 'language_urls', $skinTemplate->data ) && $skinTemplate->data[ 'language_urls' ] ) {
+
+ $ret .= $this->indent() . '<li class="dropdown dropup p-lang" id="p-lang" ' . Linker::tooltip( 'p-lang' ) . ' >' .
+ $this->indent( 1 ) . '<a href="#" data-target="#" class="dropdown-toggle" data-toggle="dropdown">' .
+ htmlspecialchars( $skinTemplate->getMsg( 'otherlanguages' )->text() ) . ' <b class="caret"></b>' . '</a>' .
+ $this->indent() . '<ul class="dropdown-menu" >';
+
+ $this->indent( 1 );
+ foreach ( $skinTemplate->data[ 'language_urls' ] as $key => $langlink ) {
+ $ret .= $this->indent() . $skinTemplate->makeListItem( $key, $langlink, array( 'link-class' => 'small' ) );
+ }
+
+ $ret .= $this->indent( -1 ) . '</ul>' .
+ $this->indent( -1 ) . '</li>';
+ }
+
+ return $ret;
+ }
+
+ /**
+ * @return bool
+ */
+ private function hideTools() {
+ return $this->getDomElement() !== null && filter_var( $this->getDomElement()->getAttribute( 'hideTools' ), FILTER_VALIDATE_BOOLEAN );
+ }
+
+ /**
+ * @return bool
+ */
+ private function hideLanguages() {
+ return $this->getDomElement() !== null && filter_var( $this->getDomElement()->getAttribute( 'hideLanguages' ), FILTER_VALIDATE_BOOLEAN );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Hooks/SetupAfterCache.php b/www/wiki/skins/chameleon/src/Hooks/SetupAfterCache.php
new file mode 100644
index 00000000..138c5faf
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Hooks/SetupAfterCache.php
@@ -0,0 +1,242 @@
+<?php
+/**
+ * File containing the BeforeInitialize class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Hooks;
+
+use Bootstrap\BootstrapManager;
+use RuntimeException;
+
+/**
+ * @see https://www.mediawiki.org/wiki/Manual:Hooks/SetupAfterCache
+ *
+ * @since 1.0
+ *
+ * @author mwjames
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class SetupAfterCache {
+
+ protected $bootstrapManager = null;
+ protected $configuration = array();
+ protected $request;
+
+ /**
+ * @since 1.0
+ *
+ * @param BootstrapManager $bootstrapManager
+ * @param array $configuration
+ * @param \WebRequest $request
+ */
+ public function __construct( BootstrapManager $bootstrapManager, array &$configuration, \WebRequest $request ) {
+ $this->bootstrapManager = $bootstrapManager;
+ $this->configuration = &$configuration;
+ $this->request = $request;
+ }
+
+ /**
+ * @since 1.0
+ *
+ * @return self
+ */
+ public function process() {
+
+ $this->setInstallPaths();
+ $this->addLateSettings();
+ $this->registerCommonBootstrapModules();
+ $this->registerExternalLessModules();
+ $this->registerExternalLessVariables();
+
+ return $this;
+ }
+
+ /**
+ * @since 1.0
+ *
+ * @param array $configuration
+ */
+ public function adjustConfiguration( array &$configuration ) {
+
+ foreach ( $this->configuration as $key => $value ) {
+ $configuration[ $key ] = $value;
+ }
+ }
+
+ /**
+ * Set local and remote base path of the Chameleon skin
+ */
+ protected function setInstallPaths() {
+
+ $this->configuration[ 'chameleonLocalPath' ] = $this->configuration['wgStyleDirectory'] . '/chameleon';
+ $this->configuration[ 'chameleonRemotePath' ] = $this->configuration['wgStylePath'] . '/chameleon';
+ }
+
+ protected function addLateSettings() {
+
+ $this->addChameleonToVisualEditorSupportedSkins();
+ $this->addResourceModules();
+ $this->setLayoutFile();
+ }
+
+ protected function registerCommonBootstrapModules() {
+
+ $this->bootstrapManager->addAllBootstrapModules();
+
+ if ( file_exists( $this->configuration[ 'wgStyleDirectory' ] . '/common/shared.css' ) ) { // MW < 1.24
+ $this->bootstrapManager->addExternalModule(
+ $this->configuration[ 'wgStyleDirectory' ] . '/common/shared.css',
+ $this->configuration[ 'wgStylePath' ] . '/common/'
+ );
+ } else {
+ if ( file_exists( $this->configuration[ 'IP' ] . '/resources/src/mediawiki.legacy/shared.css' ) ) { // MW >= 1.24
+ $this->bootstrapManager->addExternalModule(
+ $this->configuration[ 'IP' ] . '/resources/src/mediawiki.legacy/shared.css',
+ $this->configuration[ 'wgScriptPath' ] . '/resources/src/mediawiki.legacy/'
+ );
+ }
+ }
+
+ $this->bootstrapManager->addExternalModule(
+ $this->configuration[ 'chameleonLocalPath' ] . '/resources/styles/core.less',
+ $this->configuration[ 'chameleonRemotePath' ] . '/resources/styles/'
+ );
+ }
+
+ protected function registerExternalLessModules() {
+
+ if ( $this->hasConfigurationOfTypeArray( 'egChameleonExternalStyleModules' ) ) {
+
+ foreach ( $this->configuration[ 'egChameleonExternalStyleModules' ] as $localFile => $remotePath ) {
+
+ list( $localFile, $remotePath ) = $this->matchAssociativeElement( $localFile, $remotePath );
+
+ $this->bootstrapManager->addExternalModule(
+ $this->isReadableFile( $localFile ),
+ $remotePath
+ );
+ }
+ }
+ }
+
+ protected function registerExternalLessVariables() {
+
+ if ( $this->hasConfigurationOfTypeArray( 'egChameleonExternalLessVariables' ) ) {
+
+ foreach ( $this->configuration[ 'egChameleonExternalLessVariables' ] as $key => $value ) {
+ $this->bootstrapManager->setLessVariable( $key, $value );
+ }
+ }
+ }
+
+ /**
+ * @param $id
+ * @return bool
+ */
+ private function hasConfiguration( $id ) {
+ return isset( $this->configuration[ $id ] );
+ }
+
+ /**
+ * @param string $id
+ * @return bool
+ */
+ private function hasConfigurationOfTypeArray( $id ) {
+ return $this->hasConfiguration( $id ) && is_array( $this->configuration[ $id ] );
+ }
+
+ /**
+ * @param $localFile
+ * @param $remotePath
+ * @return array
+ */
+ private function matchAssociativeElement( $localFile, $remotePath ) {
+
+ if ( is_integer( $localFile ) ) {
+ return array( $remotePath, '' );
+ }
+
+ return array( $localFile, $remotePath );
+ }
+
+ /**
+ * @param string $file
+ * @return string
+ */
+ private function isReadableFile( $file ) {
+
+ if ( is_readable( $file ) ) {
+ return $file;
+ }
+
+ throw new RuntimeException( "Expected an accessible {$file} file" );
+ }
+
+ protected function addChameleonToVisualEditorSupportedSkins() {
+
+ // if Visual Editor is installed and there is a setting to enable or disable it
+ if ( $this->hasConfiguration( 'wgVisualEditorSupportedSkins' ) && $this->hasConfiguration( 'egChameleonEnableVisualEditor' ) ) {
+
+ // if VE should be enabled
+ if ( $this->configuration[ 'egChameleonEnableVisualEditor' ] === true ) {
+
+ // if Chameleon is not yet in the list of VE-enabled skins
+ if ( !in_array( 'chameleon', $this->configuration[ 'wgVisualEditorSupportedSkins' ] ) ) {
+ $this->configuration[ 'wgVisualEditorSupportedSkins' ][] = 'chameleon';
+ }
+
+ } else {
+ // remove all entries of Chameleon from the list of VE-enabled skins
+ $this->configuration[ 'wgVisualEditorSupportedSkins' ] = array_diff(
+ $this->configuration[ 'wgVisualEditorSupportedSkins' ],
+ array( 'chameleon' )
+ );
+ }
+ }
+ }
+
+ protected function addResourceModules() {
+ $this->configuration[ 'wgResourceModules' ][ 'skin.chameleon.jquery-sticky' ] = array(
+ 'localBasePath' => $this->configuration[ 'chameleonLocalPath' ] . '/resources/js',
+ 'remoteBasePath' => $this->configuration[ 'chameleonRemotePath' ] . '/resources/js',
+ 'group' => 'skin.chameleon',
+ 'skinScripts' => array( 'chameleon' => array( 'sticky-kit/jquery.sticky-kit.js', 'Components/Modifications/sticky.js' ) )
+ );
+ }
+
+ protected function setLayoutFile() {
+
+ $layout = $this->request->getVal( 'uselayout' );
+
+ if ( $layout !== null &&
+ $this->hasConfigurationOfTypeArray( 'egChameleonAvailableLayoutFiles' ) &&
+ array_key_exists( $layout, $this->configuration[ 'egChameleonAvailableLayoutFiles' ] ) ) {
+
+ $this->configuration[ 'egChameleonLayoutFile' ] = $this->configuration[ 'egChameleonAvailableLayoutFiles' ][ $layout ];
+ }
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/IdRegistry.php b/www/wiki/skins/chameleon/src/IdRegistry.php
new file mode 100644
index 00000000..11a880d4
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/IdRegistry.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * File holding the IdRegistry class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon;
+
+/**
+ * Class IdRegistry provides a registry and access methods to ensure each id is only used once per HTML page.
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class IdRegistry {
+
+ private static $sInstance;
+ private $mRegistry = array();
+
+ /**
+ * @return IdRegistry
+ */
+ public static function getRegistry() {
+
+ if ( self::$sInstance === null ) {
+ self::$sInstance = new IdRegistry();
+ }
+
+ return self::$sInstance;
+
+ }
+
+ /**
+ * Returns the opening tag of an HTML element in a string.
+ *
+ * The advantage over Html::openElement is that any id attribute is ensured to be unique.
+ *
+ * @param string $tag
+ * @param array $attributes
+ *
+ * @return string
+ */
+ public function openElement( $tag, $attributes = array() ) {
+
+ if ( is_array( $attributes ) && isset( $attributes[ 'id' ] ) ) {
+ $attributes[ 'id' ] = $this->getId( $attributes[ 'id' ] );
+ }
+
+ return \Html::openElement( $tag, $attributes );
+ }
+
+ /**
+ * @param null|string $id
+ * @param null|mixed $component
+ * @return string
+ */
+ public function getId( $id = null, $component = null ) {
+
+ if ( empty( $id ) ) {
+
+ // no specific id requested, just return a unique string
+ return base_convert( uniqid(), 16, 36 );
+
+ } elseif ( array_key_exists( $id, $this->mRegistry ) ) {
+
+ // specific id requested, but already in use
+ // return a string derived from the id and a unique string
+ $key = "$id-" . base_convert( uniqid(), 16, 36 );
+ $this->mRegistry[ $id ][ $key ] = $component;
+ return $key;
+
+ } else {
+
+ // specific id requested that is not yet in use
+ // return the id
+ $this->mRegistry[ $id ][ $id ] = $component;
+ return $id;
+
+ }
+ }
+
+ /**
+ * Returns an HTML element in a string. The contents are NOT escaped.
+ *
+ * The advantage over Html::rawElement is that any id attribute is ensured to be unique.
+ *
+ * @param string $tag
+ * @param array $attributes
+ * @param string $contents
+ *
+ * @return string
+ */
+ public function element( $tag, $attributes = array(), $contents = '' ) {
+
+ if ( is_array( $attributes ) && isset( $attributes[ 'id' ] ) ) {
+ $attributes[ 'id' ] = $this->getId( $attributes[ 'id' ] );
+ }
+
+ return \Html::rawElement( $tag, $attributes, $contents );
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Menu/Menu.php b/www/wiki/skins/chameleon/src/Menu/Menu.php
new file mode 100644
index 00000000..78ae3f76
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Menu/Menu.php
@@ -0,0 +1,118 @@
+<?php
+/**
+ * File holding the abstract Menu class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Menu;
+
+/**
+ * Class Menu
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+abstract class Menu {
+
+ private $menuItemFormatter = null;
+ private $itemListFormatter = null;
+
+ abstract public function getHtml();
+
+ /**
+ * @param string $href
+ * @param string $text
+ * @param int $depth
+ * @param string $subitems
+ *
+ * @return string
+ */
+ protected function getHtmlForMenuItem( $href, $text, $depth, $subitems ) {
+ return call_user_func( $this->getMenuItemFormatter(), $href, $text, $depth, $subitems );
+ }
+
+ /**
+ * @return callable
+ */
+ public function getMenuItemFormatter() {
+
+ if ( $this->menuItemFormatter === null ) {
+
+ $this->setMenuItemFormatter( function ( $href, $text, $depth, $subitems ) {
+ $href = \Sanitizer::cleanUrl( $href );
+ $text = htmlspecialchars( $text );
+ $indent = str_repeat( "\t", 2 * $depth );
+
+ if ( $subitems !== '' ) {
+ return "$indent<li>\n$indent\t<a href=\"$href\">$text</a>\n$subitems$indent</li>\n";
+ } else {
+ return "$indent<li><a href=\"$href\">$text</a></li>\n";
+ }
+ } );
+
+ }
+
+ return $this->menuItemFormatter;
+ }
+
+ /**
+ * @param callable $menuItemFormatter
+ */
+ public function setMenuItemFormatter( $menuItemFormatter ) {
+ $this->menuItemFormatter = $menuItemFormatter;
+ }
+
+ /**
+ * @param string $rawItemsHtml
+ * @param int $depth
+ *
+ * @return string
+ */
+ protected function getHtmlForMenuItemList( $rawItemsHtml, $depth ) {
+ return call_user_func( $this->getItemListFormatter(), $rawItemsHtml, $depth );
+ }
+
+ /**
+ * @return callable
+ */
+ public function getItemListFormatter() {
+
+ if ( $this->itemListFormatter === null ) {
+ $this->setItemListFormatter( function ( $rawItemsHtml, $depth ) {
+ $indent = str_repeat( "\t", 2 * $depth + 1 );
+ return "$indent<ul>\n$rawItemsHtml$indent</ul>\n";
+ } );
+ }
+
+ return $this->itemListFormatter;
+ }
+
+ /**
+ * @param callable $itemListFormatter
+ */
+ public function setItemListFormatter( $itemListFormatter ) {
+ $this->itemListFormatter = $itemListFormatter;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/Menu/MenuFactory.php b/www/wiki/skins/chameleon/src/Menu/MenuFactory.php
new file mode 100644
index 00000000..b1f71779
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Menu/MenuFactory.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * File holding the MenuFactory class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Menu;
+use Message;
+
+/**
+ * Class MenuFactory
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class MenuFactory {
+
+ /**
+ * @param Message|string|string[] $message
+ * @param bool $forContent
+ *
+ * @throws \MWException
+ *
+ * @return Menu
+ */
+ public function getMenuFromMessage( $message, $forContent = false ) {
+
+ if ( is_string( $message ) || is_array( $message ) ) {
+ $message = Message::newFromKey( $message );
+ }
+
+ $this->assert( $message instanceof Message, 'String, array of strings or Message object expected.', $message );
+
+ if ( $forContent ) {
+ $message = $message->inContentLanguage();
+ }
+
+ if ( !$message->exists() ) {
+ return $this->getMenuFromMessageText( '', $forContent );
+ }
+
+ return $this->getMenuFromMessageText( $message->text(), $forContent );
+ }
+
+ /**
+ * @param string $text
+ * @param bool $forContent
+ *
+ * @return Menu
+ * @throws \MWException
+ */
+ public function getMenuFromMessageText( $text, $forContent = false ) {
+
+ $this->assert( is_string( $text ), 'String expected.', $text );
+
+ $lines = explode( "\n", trim( $text ) );
+
+ return new MenuFromLines( $lines, $forContent );
+ }
+
+ /**
+ * @param $message
+ * @throws \MWException
+ */
+ protected function assert( $condition, $message, $target ) {
+ if ( !$condition ) {
+ throw new \MWException( $message . ' Got ' . (is_object( $target ) ? get_class( $target ) : gettype( $target )) . '.' );
+ }
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/Menu/MenuFromLines.php b/www/wiki/skins/chameleon/src/Menu/MenuFromLines.php
new file mode 100644
index 00000000..ea55fabc
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/Menu/MenuFromLines.php
@@ -0,0 +1,273 @@
+<?php
+/**
+ * File holding the MenuFromLines class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Menu;
+
+use Title;
+
+/**
+ * Class MenuFromLines
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class MenuFromLines extends Menu {
+
+ private $lines = null;
+ private $inContentLanguage = false;
+ private $menuItemData = null;
+
+ private $needsParse = true;
+
+ /** @var Menu[] */
+ private $children = array();
+ private $html = null;
+
+ /**
+ * @param string[] $lines
+ * @param bool $inContentLanguage
+ * @param null|string[] $itemData
+ */
+ public function __construct( &$lines, $inContentLanguage = false, $itemData = null ) {
+
+ $this->lines = &$lines;
+ $this->inContentLanguage = $inContentLanguage;
+
+ if ( $itemData !== null ) {
+ $this->menuItemData = $itemData;
+ } else {
+ $this->menuItemData = array(
+ 'text' => '',
+ 'href' => '#',
+ 'depth' => 0
+ );
+ }
+ }
+
+ /**
+ * @return string
+ */
+ public function getHtml() {
+
+ if ( $this->html === null ) {
+
+ $this->parseLines();
+ $this->html = $this->buildHtml();
+
+ }
+
+ return $this->html;
+ }
+
+ /**
+ * @return string[]|null
+ */
+ public function parseLines() {
+
+ if ( !$this->needsParse ) {
+ return null;
+ }
+
+ $this->needsParse = false;
+
+ $line = $this->getNextLine();
+ $subItemData = $this->parseOneLine( $line );
+
+ while ( $subItemData !== null && $subItemData[ 'depth' ] > $this->menuItemData[ 'depth' ] ) {
+
+ $subItemData = $this->createChildAndParseNextLine( $subItemData );
+
+ }
+
+ return $subItemData;
+ }
+
+ /**
+ * @return string
+ */
+ protected function getNextLine() {
+ $line = '';
+
+ while ( count( $this->lines ) > 0 && empty( $line ) ) {
+ $line = trim( array_shift( $this->lines ) );
+ };
+ return $line;
+ }
+
+ /**
+ * Will return an array of the form
+ * array(
+ * 'text' => $text, // link text
+ * 'href' => $href, // parsed link target
+ * 'depth' => $depth
+ * );
+ *
+ * @param string $rawLine
+ *
+ * @return array
+ */
+ protected function parseOneLine( $rawLine ) {
+
+ if ( empty( $rawLine ) ) {
+ return null;
+ }
+
+ list( $depth, $linkDescription ) = $this->extractDepthAndLine( $rawLine );
+ list( $href, $text ) = $this->extractHrefAndLinkText( $linkDescription );
+
+ return array(
+ 'text' => $text,
+ 'href' => $href,
+ 'depth' => $depth
+ );
+ }
+
+ /**
+ * @param string $rawLine
+ *
+ * @return array
+ */
+ protected function extractDepthAndLine( $rawLine ) {
+
+ $matches = array();
+ preg_match( '/(\**)(.*)/', ltrim( $rawLine ), $matches );
+
+ $depth = strlen( $matches[ 1 ] );
+ $line = $matches[ 2 ];
+
+ return array( $depth, $line );
+ }
+
+ /**
+ * @param $linkDescription
+ *
+ * @return array
+ */
+ protected function extractHrefAndLinkText( $linkDescription ) {
+
+ $linkAttributes = array_map( 'trim', explode( '|', $linkDescription, 2 ) );
+
+ $linkTarget = trim( trim( $linkAttributes[ 0 ], '[]' ) );
+ $linkTarget = $this->getTextFromMessageName( $linkTarget );
+ $href = $this->getHrefForTarget( $linkTarget );
+
+ $linkDescription = count( $linkAttributes ) > 1 ? $linkAttributes[ 1 ] : '';
+ $text = $linkDescription === '' ? $linkTarget : $this->getTextFromMessageName( $linkDescription );
+
+ return array( $href, $text );
+ }
+
+ /**
+ * @param string $messageName
+ *
+ * @return string
+ */
+ protected function getTextFromMessageName( $messageName ) {
+ $msgObj = $this->inContentLanguage ? wfMessage( $messageName )->inContentLanguage() : wfMessage( $messageName );
+ $messageText = ( $msgObj->isDisabled() ? $messageName : trim( $msgObj->inContentLanguage()->text() ) );
+ return $messageText;
+ }
+
+ /**
+ * @param string $linkTarget
+ *
+ * @return string
+ * @throws \MWException
+ */
+ protected function getHrefForTarget( $linkTarget ) {
+
+ if ( empty( $linkTarget ) ) {
+ return '#';
+ } elseif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $linkTarget ) || $linkTarget[ 0 ] === '#' ) {
+ return $linkTarget;
+ } else {
+ return $this->getHrefForWikiPage( $linkTarget );
+ }
+ }
+
+ /**
+ * @param string $linkTarget
+ *
+ * @return string
+ * @throws \MWException
+ */
+ protected function getHrefForWikiPage( $linkTarget ) {
+ $title = Title::newFromText( $linkTarget );
+
+ if ( $title instanceof Title ) {
+ return $title->fixSpecialName()->getLocalURL();
+ }
+
+ return '#';
+ }
+
+ /**
+ * @param string[] $subItemData
+ *
+ * @return null|string[]
+ */
+ protected function createChildAndParseNextLine( $subItemData ) {
+ $child = new self( $this->lines, $this->inContentLanguage, $subItemData );
+ $child->setMenuItemFormatter( $this->getMenuItemFormatter() );
+ $child->setItemListFormatter( $this->getItemListFormatter() );
+ $subItemData = $child->parseLines();
+ $this->children[ ] = $child;
+ return $subItemData;
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildHtml() {
+
+ $submenuHtml = $this->buildSubmenuHtml();
+
+ if ( $this->menuItemData[ 'text' ] !== '' ) {
+ return $this->getHtmlForMenuItem( $this->menuItemData[ 'href' ], $this->menuItemData[ 'text' ], $this->menuItemData[ 'depth' ], $submenuHtml );
+ } else {
+ return $submenuHtml;
+ }
+ }
+
+ /**
+ * @return string
+ */
+ protected function buildSubmenuHtml() {
+
+ if ( empty( $this->children ) ) {
+ return '';
+ }
+
+ $itemList = '';
+ foreach ( $this->children as $child ) {
+ $itemList .= $child->getHtml();
+ }
+
+ return $this->getHtmlForMenuItemList( $itemList, $this->menuItemData[ 'depth' ] );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/src/PermissionsHelper.php b/www/wiki/skins/chameleon/src/PermissionsHelper.php
new file mode 100644
index 00000000..3d895c98
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/PermissionsHelper.php
@@ -0,0 +1,195 @@
+<?php
+/**
+ * File containing the PermissionsHelper class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon;
+
+use DOMElement;
+
+/**
+ * PermissionsHelper class
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ */
+class PermissionsHelper {
+
+ private $domElement;
+ private $skin;
+ private $default;
+
+ /**
+ * @param \SkinChameleon $skin
+ * @param DOMElement $domElement
+ * @param bool $default
+ */
+ public function __construct( \SkinChameleon $skin, DOMElement $domElement = null, $default = false ) {
+ $this->skin = $skin;
+ $this->domElement = $domElement;
+ $this->default = $default;
+ }
+
+ /**
+ * @since 1.1
+ *
+ * @param string $attributeNameInDomElement
+ *
+ * @return bool
+ */
+ public function userHasGroup( $attributeNameInDomElement ) {
+
+ return $this->userHas( 'group', $attributeNameInDomElement );
+ }
+
+ /**
+ * @param string $attributeOfUser
+ * @param string $attributeNameInDomElement
+ *
+ * @throws \MWException
+ * @return bool
+ */
+ protected function userHas( $attributeOfUser, $attributeNameInDomElement ) {
+
+ $user = $this->skin->getUser();
+ $attributeAccessors = array(
+ 'group' => array( $user, 'getEffectiveGroups' ),
+ 'permission' => array( $user, 'getRights' ),
+ );
+
+ if ( !array_key_exists( $attributeOfUser, $attributeAccessors ) ) {
+ throw new \MWException( sprintf( 'Unknown permission: %s', $attributeOfUser ) );
+ }
+
+ if ( !$this->hasAttribute( $attributeNameInDomElement ) ) {
+ return $this->default;
+ }
+
+ $expectedValues = $this->getValueListFromAttribute( $attributeNameInDomElement );
+ $observedValues = call_user_func( $attributeAccessors[ $attributeOfUser ] );
+ $effectiveValues = array_intersect( $expectedValues, $observedValues );
+
+ return !empty( $effectiveValues );
+ }
+
+ /**
+ * @since 1.1
+ *
+ * @param string $attributeNameInDomElement
+ *
+ * @return bool
+ */
+ public function hasAttribute( $attributeNameInDomElement ) {
+ return $this->domElement !== null && $this->domElement->hasAttribute( $attributeNameInDomElement );
+ }
+
+ /**
+ * @param string $attributeName
+ *
+ * @return string[]
+ */
+ protected function getValueListFromAttribute( $attributeName ) {
+ return $this->domElement === null ? array() : array_map( 'trim', explode( ',', $this->domElement->getAttribute( $attributeName ) ) );
+
+ }
+
+ /**
+ * @since 1.1
+ *
+ * @param string $attributeNameInDomElement
+ *
+ * @return bool
+ */
+ public function userHasPermission( $attributeNameInDomElement ) {
+
+ return $this->userHas( 'permission', $attributeNameInDomElement );
+ }
+
+ /**
+ * @since 1.1
+ *
+ * @param string $attributeNameInDomElement
+ *
+ * @return bool
+ */
+ public function pageIsInNamespace( $attributeNameInDomElement ) {
+
+ if ( !$this->hasAttribute( $attributeNameInDomElement ) ) {
+ return $this->default;
+ }
+
+ $expectedNamespaces = array_map( array( $this, 'getNamespaceNumberFromDefinedConstantName' ), $this->getValueListFromAttribute( $attributeNameInDomElement ) );
+ $pageNamespace = $this->skin->getTitle()->getNamespace();
+
+ return in_array( $pageNamespace, $expectedNamespaces );
+ }
+
+ /**
+ * @since 1.1
+ *
+ * AGREGADO PARA REEVO!
+ *
+ * @param string $attributeNameInDomElement
+ *
+ * @return bool
+ */
+ public function pageHasCategory( $attributeNameInDomElement ) {
+
+ if ( !$this->hasAttribute( $attributeNameInDomElement ) ) {
+ return $this->default;
+ }
+
+ $expectedCategories = $this->getValueListFromAttribute( $attributeNameInDomElement );
+
+ $pagename = $this->skin->getTitle();
+ $cats = $this->skin->getSkin()->getCategoryLinks();
+ preg_match_all('/<\s*a[^>]*>(.*?)<\s*\/\s*a>/', $cats, $output_array);
+ $pageCategory = $output_array[1];
+ $match = array_intersect($pageCategory,$expectedCategories);
+ $final = reset($match);
+ if ($match) {
+ // error_log('Se encontro una categoria en la página '.$pagename.' que aplica una regla de Modification en Chamaleon');
+ $pageCategory = $final;
+ }
+
+ return in_array( $pageCategory, $expectedCategories );
+ }
+
+
+
+ /**
+ * @param null|string $value
+ *
+ * @return int
+ */
+ protected function getNamespaceNumberFromDefinedConstantName( $value ) {
+ $constants = get_defined_constants();
+ if ( !is_null( $value ) && array_key_exists( $value, $constants ) ) {
+ $value = $constants[ $value ];
+ }
+
+ return is_int( $value ) ? $value : -1;
+ }
+}
diff --git a/www/wiki/skins/chameleon/src/SkinChameleon.php b/www/wiki/skins/chameleon/src/SkinChameleon.php
new file mode 100644
index 00000000..a898450d
--- /dev/null
+++ b/www/wiki/skins/chameleon/src/SkinChameleon.php
@@ -0,0 +1,122 @@
+<?php
+/**
+ * File holding the SkinChameleon class
+ *
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+use Skins\Chameleon\ComponentFactory;
+
+/**
+ * SkinTemplate class for the Chameleon skin
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ */
+class SkinChameleon extends SkinTemplate {
+
+ public $skinname = 'chameleon';
+ public $stylename = 'chameleon';
+ public $template = '\Skins\Chameleon\ChameleonTemplate';
+ public $useHeadElement = true;
+
+ private $componentFactory;
+
+ /**
+ * @param $out OutputPage object
+ */
+ public function setupSkinUserCss( OutputPage $out ) {
+
+ // load Bootstrap styles
+ $out->addModuleStyles(
+ array(
+ 'ext.bootstrap.styles'
+ )
+ );
+ }
+
+ /**
+ * @param \OutputPage $out
+ */
+ public function initPage( OutputPage $out ) {
+
+ parent::initPage( $out );
+
+ // Enable responsive behaviour on mobile browsers
+ $out->addMeta( 'viewport', 'width=device-width, initial-scale=1.0' );
+ }
+
+ /**
+ * @return QuickTemplate
+ */
+ protected function setupTemplateForOutput() {
+
+ $tpl = parent::setupTemplateForOutput();
+
+ $this->getComponentFactory()->setSkinTemplate( $tpl );
+
+ $tpl->set( 'skin', $this );
+ $this->addSkinModulesToOutput();
+
+ return $tpl;
+ }
+
+ /**
+ * @return ComponentFactory
+ */
+ public function getComponentFactory() {
+
+ if ( ! isset( $this->componentFactory ) ) {
+ $this->componentFactory = new \Skins\Chameleon\ComponentFactory(
+ $this->getLayoutFilePath()
+ );
+ }
+
+ return $this->componentFactory;
+ }
+
+ public function addSkinModulesToOutput() {
+ // load Bootstrap scripts
+ $out = $this->getOutput();
+ $out->addModules( array( 'ext.bootstrap.scripts' ) );
+ $out->addModules( $this->getComponentFactory()->getRootComponent()->getResourceLoaderModules() );
+
+ }
+
+ /**
+ * @param Title $title
+ * @return string
+ */
+ public function getPageClasses( $title ) {
+ $layoutFilePath = $this->getLayoutFilePath();
+ $layoutName = Sanitizer::escapeClass( 'layout-' . basename( $layoutFilePath, '.xml' ) );
+ return implode( ' ', array( parent::getPageClasses( $title ), $layoutName ) );
+ }
+
+ /**
+ * Template method that can be overridden by subclasses
+ * @return string Path to layout file
+ */
+ protected function getLayoutFilePath() {
+ return $GLOBALS['egChameleonLayoutFile'];
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/bootstrap.php b/www/wiki/skins/chameleon/tests/bootstrap.php
new file mode 100644
index 00000000..4b235aee
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/bootstrap.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+if ( php_sapi_name() !== 'cli' ) {
+ die( 'Not an entry point' );
+}
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+ die( 'MediaWiki is not available for the test environment' );
+}
+
+function registerAutoloaderPath( $identifier, $path ) {
+ print( "\nUsing the {$identifier} vendor autoloader ...\n\n" );
+ return require $path;
+}
+
+/**
+ * @return string
+ */
+function getDirectory() {
+
+ $directory = $GLOBALS[ 'argv' ][ 0 ];
+
+ if ( $directory[ 0 ] !== DIRECTORY_SEPARATOR ) {
+ $directory = $_SERVER[ 'PWD' ] . DIRECTORY_SEPARATOR . $directory;
+ }
+
+ $directory = dirname( $directory );
+
+ return $directory;
+}
+
+function runTestAutoLoader( $autoLoader = null ) {
+
+ $directory = getDirectory();
+
+ $mwVendorPath = $directory . '/../../vendor/autoload.php';
+ $localVendorPath = $directory . '/../vendor/autoload.php';
+
+ if ( is_readable( $localVendorPath ) ) {
+ $autoLoader = registerAutoloaderPath( 'local', $localVendorPath );
+ } elseif ( is_readable( $mwVendorPath ) ) {
+ $autoLoader = registerAutoloaderPath( 'MediaWiki', $mwVendorPath );
+ }
+
+ if ( !$autoLoader instanceof \Composer\Autoload\ClassLoader ) {
+ return false;
+ }
+
+ return true;
+}
+
+if ( !runTestAutoLoader() ) {
+ die( 'Required test class loader was not accessible' );
+}
diff --git a/www/wiki/skins/chameleon/tests/mw-phpunit-runner.php b/www/wiki/skins/chameleon/tests/mw-phpunit-runner.php
new file mode 100644
index 00000000..11de0750
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/mw-phpunit-runner.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ */
+
+
+/**
+ * Lazy script to invoke the MediaWiki phpunit runner
+ *
+ * php mw-phpunit-runner.php [options]
+ */
+
+if ( php_sapi_name() !== 'cli' ) {
+ die( 'Not an entry point' );
+}
+
+print( "\nMediaWiki phpunit runnner ... \n" );
+
+function isReadablePath( $path ) {
+
+ if ( is_readable( $path ) ) {
+ return $path;
+ }
+
+ throw new RuntimeException( "Expected an accessible {$path} path" );
+}
+
+function addArguments( $args ) {
+
+ array_shift( $args );
+ return $args;
+
+// $arguments = array();
+//
+// for ( $arg = reset( $args ); $arg !== false; $arg = next( $args ) ) {
+//
+// //// FIXME: This check will fail if started from a different directory
+// if ( $arg === basename( __FILE__ ) ) {
+// continue;
+// }
+//
+// $arguments[] = $arg;
+// }
+//
+// return $arguments;
+}
+
+/**
+ * @return string
+ */
+function getDirectory() {
+
+ $directory = $GLOBALS[ 'argv' ][ 0 ];
+
+ if ( $directory[ 0 ] !== DIRECTORY_SEPARATOR ) {
+ $directory = $_SERVER[ 'PWD' ] . DIRECTORY_SEPARATOR . $directory;
+ }
+
+ $directory = dirname( $directory );
+
+ return $directory;
+}
+
+$skinDirectory = dirname ( getDirectory() );
+
+$config = isReadablePath( "$skinDirectory/phpunit.xml.dist" );
+$mw = isReadablePath( dirname( dirname( $skinDirectory ) ) . "/tests/phpunit/phpunit.php" );
+
+echo "php {$mw} -c {$config} " . implode( ' ', addArguments( $GLOBALS['argv'] ) );
+
+passthru( "php {$mw} -c {$config} " . implode( ' ', addArguments( $GLOBALS['argv'] ) ) );
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Cell.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Cell.xml
new file mode 100644
index 00000000..647c2966
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Cell.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <cell span="12"></cell>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Container.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Container.xml
new file mode 100644
index 00000000..ff6a5602
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Container.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="Container"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterIcons.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterIcons.xml
new file mode 100644
index 00000000..a74cec75
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterIcons.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="FooterIcons"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterInfo.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterInfo.xml
new file mode 100644
index 00000000..abd09508
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterInfo.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="FooterInfo"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterPlaces.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterPlaces.xml
new file mode 100644
index 00000000..8965790c
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/FooterPlaces.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+<component type="FooterPlaces"></component>
+</structure>
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Grid.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Grid.xml
new file mode 100644
index 00000000..1bf36c6c
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Grid.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <grid></grid>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Html.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Html.xml
new file mode 100644
index 00000000..805d73bf
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Html.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="Html">
+ <div>foo</div>
+ bar
+ <span>baz</span>
+ </component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Logo.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Logo.xml
new file mode 100644
index 00000000..9a59bb05
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Logo.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="Logo"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/MainContent.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/MainContent.xml
new file mode 100644
index 00000000..8f25f80e
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/MainContent.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="MainContent"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Menu.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Menu.xml
new file mode 100644
index 00000000..24b941b9
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Menu.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="Menu"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/HideFor.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/HideFor.xml
new file mode 100644
index 00000000..ce9d395a
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/HideFor.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <modification type="HideFor"></modification>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/ShowOnlyFor.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/ShowOnlyFor.xml
new file mode 100644
index 00000000..48f1637c
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Modifications/ShowOnlyFor.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <modification type="ShowOnlyFor"></modification>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavMenu.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavMenu.xml
new file mode 100644
index 00000000..3a56279f
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavMenu.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="NavMenu"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal.xml
new file mode 100644
index 00000000..d7505684
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="NavbarHorizontal">
+ <component type="Logo"></component>
+ <component type="NavMenu" flatten="navigation"></component>
+ <component type="PageTools" hideSelectedNameSpace="1"></component>
+ <component type="PersonalTools"></component>
+ <component type="SearchBar"></component>
+ </component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PageToolsAdaptable.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PageToolsAdaptable.xml
new file mode 100644
index 00000000..0af37bdc
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PageToolsAdaptable.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="PageToolsAdaptable" show="view,edit,history"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PersonalTools.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PersonalTools.xml
new file mode 100644
index 00000000..32bab95b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NavbarHorizontal/PersonalTools.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="PersonalTools"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/NewtalkNotifier.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NewtalkNotifier.xml
new file mode 100644
index 00000000..2cc62075
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/NewtalkNotifier.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="NewtalkNotifier"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/PageTools.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/PageTools.xml
new file mode 100644
index 00000000..6eadb071
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/PageTools.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="PageTools"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/PersonalTools.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/PersonalTools.xml
new file mode 100644
index 00000000..32bab95b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/PersonalTools.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="PersonalTools"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Row.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Row.xml
new file mode 100644
index 00000000..c6cd0c72
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Row.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <row></row>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/SearchBar.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/SearchBar.xml
new file mode 100644
index 00000000..d5a01501
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/SearchBar.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="SearchBar"></component>
+</structure>
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Silent.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Silent.xml
new file mode 100644
index 00000000..7837e5c7
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Silent.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="Silent"></component>
+</structure>
+
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/SiteNotice.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/SiteNotice.xml
new file mode 100644
index 00000000..c48b5227
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/SiteNotice.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="SiteNotice"></component>
+</structure>
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/Structure.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Structure.xml
new file mode 100644
index 00000000..48e0e075
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/Structure.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure></structure>
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/ToolbarHorizontal.xml b/www/wiki/skins/chameleon/tests/phpunit/Fixture/ToolbarHorizontal.xml
new file mode 100644
index 00000000..bcf07956
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/ToolbarHorizontal.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<structure>
+ <component type="ToolbarHorizontal"></component>
+</structure>
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Fixture/externalmodule.less b/www/wiki/skins/chameleon/tests/phpunit/Fixture/externalmodule.less
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Fixture/externalmodule.less
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Integration/StylesCompileTest.php b/www/wiki/skins/chameleon/tests/phpunit/Integration/StylesCompileTest.php
new file mode 100644
index 00000000..0b328dfd
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Integration/StylesCompileTest.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Integration;
+
+use Bootstrap\BootstrapManager;
+use Bootstrap\ResourceLoaderBootstrapModule;
+use CSSMin;
+use HashBagOStuff;
+use Skins\Chameleon\Hooks\SetupAfterCache;
+
+/**
+ * @coversNothing
+ *
+ * @group skins-chameleon
+ * @group skins-chameleon-integration
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class StylesCompileTest extends \PHPUnit_Framework_TestCase {
+
+ public function testStylesCompile() {
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $setupAfterCache = new SetupAfterCache(
+ BootstrapManager::getInstance(),
+ $GLOBALS,
+ $request
+ );
+
+ $setupAfterCache->process();
+
+ $resourceLoaderContext = $this->getMockBuilder( '\ResourceLoaderContext' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $module = new ResourceLoaderBootstrapModule( $GLOBALS[ 'wgResourceModules' ][ 'ext.bootstrap.styles' ] );
+ $module->setCache( new HashBagOStuff() );
+
+ $styles = $module->getStyles( $resourceLoaderContext );
+ $css = CSSMin::minify( $styles[ 'all' ] );
+
+ $this->assertNotEquals( '', $css );
+
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Integration/XmlLayoutFileValidityTest.php b/www/wiki/skins/chameleon/tests/phpunit/Integration/XmlLayoutFileValidityTest.php
new file mode 100644
index 00000000..caea8287
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Integration/XmlLayoutFileValidityTest.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Integration;
+
+use Skins\Chameleon\Tests\Util\XmlFileProvider;
+
+use DOMDocument;
+use RuntimeException;
+
+/**
+ * @coversNothing
+ *
+ * @group skins-chameleon
+ * @group skins-chameleon-integration
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class XmlLayoutFileValidityTest extends \PHPUnit_Framework_TestCase {
+
+ public function testXmlValidityOfLayoutFiles() {
+
+ $xmlFileProvider = new XmlFileProvider( __DIR__ . '/../../../layouts' );
+
+ $listOfLayoutXmlFiles = $xmlFileProvider->getFiles();
+
+ $this->assertNotEmpty( $listOfLayoutXmlFiles );
+ $this->assertXmlFiles( $listOfLayoutXmlFiles );
+ }
+
+ protected function assertXmlFiles( $files ) {
+ foreach ( $files as $file ) {
+ $this->assertXmlDocumentLoad( $file );
+ }
+ }
+
+ protected function assertXmlDocumentLoad( $file ) {
+ $document = new DOMDocument();
+ $document->validateOnParse = false;
+ $this->assertTrue( $document->load( $file ) );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/ChameleonTemplateTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/ChameleonTemplateTest.php
new file mode 100644
index 00000000..ea0e89ef
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/ChameleonTemplateTest.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit;
+
+use Skins\Chameleon\ChameleonTemplate;
+
+/**
+ * @uses \Skins\Chameleon\ChameleonTemplate
+ *
+ * @group skins-chameleon
+ * @group skins-chameleon-unit
+ * @group mediawiki-databaseless
+ *
+ * @license GNU GPL v3+
+ * @since 1.0
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class ChameleonTemplateTest extends \PHPUnit_Framework_TestCase {
+
+ // This is to ensure that the original value is cached since we are unable
+ // to inject the setting during testing
+ protected $egChameleonLayoutFile = null;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->egChameleonLayoutFile = $GLOBALS['egChameleonLayoutFile'];
+ }
+
+ protected function tearDown() {
+ $GLOBALS['egChameleonLayoutFile'] = $this->egChameleonLayoutFile;
+
+ parent::tearDown();
+ }
+
+ public function testCanConstruct() {
+
+ $this->assertInstanceOf(
+ '\Skins\Chameleon\ChameleonTemplate',
+ new ChameleonTemplate()
+ );
+ }
+
+ public function testInaccessibleLayoutFileThrowsExeception() {
+
+ $this->setExpectedException( 'RuntimeException' );
+
+ $GLOBALS['egChameleonLayoutFile'] = 'setInaccessibleLayoutFile';
+
+ $skin = new \SkinChameleon();
+
+ $instance = new ChameleonTemplate;
+ $instance->set( 'skin', $skin );
+ $instance->execute();
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/CellTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/CellTest.php
new file mode 100644
index 00000000..ddd9df82
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/CellTest.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Cell
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class CellTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Cell';
+
+ /**
+ * @covers ::__construct
+ * @dataProvider provideSpanAttributeValues
+ * @param string $in
+ * @param string $expected
+ */
+ public function testSpanAttribute( $in, $expected ) {
+
+ $chameleonTemplate = $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $domElement = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $domElement->expects( $this->any() )
+ ->method( 'getAttribute' )
+ ->will( $this->returnValueMap( array( array( 'span', $in ) ) ) );
+
+ $instance = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+
+ $this->assertEquals(
+ "col-lg-$expected",
+ $instance->getClassString()
+ );
+
+ }
+
+ /**
+ * @covers ::getClassString
+ */
+ public function testGetClassString_WithoutSetting() {
+
+ $chameleonTemplate = $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new $this->classUnderTest ( $chameleonTemplate );
+
+ $this->assertTrue( $instance->getClassString() === 'col-lg-12' );
+
+ }
+
+ public function provideSpanAttributeValues() {
+ return array(
+ array( '9', '9' ),
+ array( '-1', '12' ),
+ array( '42', '12' ),
+ array( 'foo', '12' ),
+ array( '10.5', '12' ),
+ );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ComponentTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ComponentTest.php
new file mode 100644
index 00000000..a99a0d10
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ComponentTest.php
@@ -0,0 +1,340 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Component
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Test
+ */
+class ComponentTest extends \PHPUnit_Framework_TestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Component';
+
+
+ /**
+ * @covers ::__construct
+ */
+ public function testCanConstruct() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertInstanceOf(
+ $this->classUnderTest,
+ $instance
+ );
+
+ $this->assertEquals( 0, $instance->getIndent() );
+ $this->assertNull( $instance->getDomElement() );
+ }
+
+ /**
+ * @covers ::__construct
+ */
+ public function testCanConstruct_withClassAttribute() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $domElement = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $domElement->expects( $this->atLeastOnce() )
+ ->method( 'getAttribute' )
+ ->will( $this->returnValueMap( array( array( 'class', 'someClass' ) ) ) );
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate, $domElement ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertInstanceOf(
+ $this->classUnderTest,
+ $instance
+ );
+ }
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+
+ $this->assertValidHTML( $instance->getHtml() );
+ }
+
+ /**
+ * @covers ::getSkinTemplate
+ */
+ public function testGetSkinTemplate() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertEquals(
+ $chameleonTemplate,
+ $instance->getSkinTemplate()
+ );
+ }
+
+ /**
+ * @covers ::getIndent
+ */
+ public function testGetIndent() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate, null, 42 ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertEquals(
+ 42,
+ $instance->getIndent()
+ );
+ }
+
+ /**
+ * @covers ::indent
+ */
+ public function testIndent() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate, null, 42 ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $reflection = new \ReflectionClass( get_class( $instance ) );
+ $method = $reflection->getMethod( 'indent' );
+ $method->setAccessible( true );
+
+ $this->assertEquals(
+ "\n" . str_repeat( "\t", 43 ),
+ $method->invokeArgs( $instance, array( 1 ) )
+ );
+ }
+
+ /**
+ * @covers ::getDomElement
+ */
+ public function testGetDomElement() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $domElement = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate, $domElement ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertEquals(
+ $domElement,
+ $instance->getDomElement()
+ );
+ }
+
+ /**
+ * @covers ::getClassString
+ */
+ public function testGetClassString_WithoutSetting() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $this->assertInternalType( 'string', $instance->getClassString() );
+
+ }
+
+ /**
+ * @covers ::setClasses
+ * @covers ::getClassString
+ * @dataProvider setClassesProvider
+ */
+ public function testSetClasses( $input, $expected ) {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $instance->setClasses( $input );
+
+ $this->assertEquals( $expected, $instance->getClassString() );
+ }
+
+ /**
+ * @covers ::setClasses
+ * @expectedException \MWException
+ */
+ public function testSetClasses_WithInvalidParameter() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $instance->setClasses( true ); // use bool instead of string
+
+ }
+
+ /**
+ * @covers ::addClasses
+ * @covers ::getClassString
+ * @covers ::transformClassesToArray
+ * @dataProvider addClassesProvider
+ */
+ public function testAddClasses( $input1, $input2, $combined ) {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $instance->setClasses( $input1 );
+ $instance->addClasses( $input2 );
+
+ $this->assertEquals( $combined, $instance->getClassString() );
+ }
+
+ /**
+ * @covers ::removeClasses
+ * @covers ::getClassString
+ * @dataProvider removeClassesProvider
+ */
+ public function testRemoveClasses( $combined, $toRemove, $remainder ) {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $instance = $this->getMockForAbstractClass( $this->classUnderTest, array( $chameleonTemplate ) );
+ $instance->expects( $this->any() )
+ ->method( 'getHtml' )
+ ->will( $this->returnValue( 'SomeHtml' ) );
+
+ $instance->setClasses( $combined );
+ $instance->removeClasses( $toRemove );
+
+ $this->assertEquals( $remainder, $instance->getClassString() );
+ }
+
+ public function setClassesProvider() {
+ return array(
+ array( null, '' ),
+
+ array( '', '' ),
+ array( array(), '' ),
+
+ array( 'foo bar baz', 'foo bar baz' ),
+ array( array( 'foo', 'bar', 'baz', ), 'foo bar baz' ),
+ );
+ }
+
+ public function addClassesProvider() {
+ return array(
+ array( 'foo bar', null, 'foo bar' ),
+
+ array( 'foo bar', '', 'foo bar' ),
+ array( 'foo bar', array(), 'foo bar' ),
+
+ array( 'foo bar', 'baz', 'foo bar baz' ),
+ array( 'foo bar', array( 'baz' ), 'foo bar baz' ),
+
+ array( 'foo bar', 'baz quok', 'foo bar baz quok' ),
+ array( 'foo bar', array( 'baz', 'quok' ), 'foo bar baz quok' ),
+ );
+ }
+
+ public function removeClassesProvider() {
+ return array(
+ array( 'foo bar', null, 'foo bar' ),
+
+ array( 'foo bar', '', 'foo bar' ),
+ array( 'foo bar', array(), 'foo bar' ),
+
+ array( 'foo bar baz', 'bar', 'foo baz' ),
+ array( 'foo bar baz', array( 'baz' ), 'foo bar' ),
+
+ array( 'foo bar baz quok', 'foo baz', 'bar quok' ),
+ array( 'foo bar baz quok', array( 'bar', 'baz' ), 'foo quok' ),
+ );
+ }
+
+ protected function getChameleonSkinTemplateStub() {
+ return $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+ }
+
+ /**
+ * Asserts that $actual is a valid HTML fragment
+ *
+ * @todo Currently only asserts that $actual is a string. Need to parse and validate,
+ *
+ * @param $actual
+ * @param string $message
+ */
+ public function assertValidHTML( $actual, $message = '' ) {
+ $this->assertInternalType( 'string', $actual, $message );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ContainerTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ContainerTest.php
new file mode 100644
index 00000000..d33ae07b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ContainerTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Container
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class ContainerTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Container';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterIconsTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterIconsTest.php
new file mode 100644
index 00000000..8cc19bec
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterIconsTest.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\FooterIcons
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class FooterIconsTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\FooterIcons';
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $skin = $chameleonTemplate->getSkin();
+
+ $skin->expects( $this->at( 0 ) )
+ ->method( 'makeFooterIcon' )
+ ->with( $this->equalTo( 'icon1' ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $skin->expects( $this->at( 1 ) )
+ ->method( 'makeFooterIcon' )
+ ->with( $this->equalTo( 'icon2' ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $skin->expects( $this->at( 2 ) )
+ ->method( 'makeFooterIcon' )
+ ->with( $this->equalTo( 'icon3' ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $skin->expects( $this->at( 3 ) )
+ ->method( 'makeFooterIcon' )
+ ->with( $this->equalTo( 'icon4' ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->any() )
+ ->method( 'getFooterIcons' )
+ ->will( $this->returnValue( array(
+ 'block1' => array( 'icon1', 'icon2' ),
+ 'block2' => array( 'icon3', 'icon4' ),
+ ) ) );
+
+ $instance = new $this->classUnderTest ( $chameleonTemplate );
+
+ $this->assertValidHTML( $instance->getHtml() );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterInfoTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterInfoTest.php
new file mode 100644
index 00000000..60e97af9
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterInfoTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\FooterInfo
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class FooterInfoTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\FooterInfo';
+ protected $componentUnderTest = 'FooterInfo';
+
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_GetsAllKeys() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $chameleonTemplate->expects( $this->at( 1 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'key1' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->at( 2 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'key2' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->at( 3 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'key3' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->at( 4 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'key4' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $instance = new $this->classUnderTest ( $chameleonTemplate );
+
+ $instance->getHtml();
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterPlacesTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterPlacesTest.php
new file mode 100644
index 00000000..f25cc53d
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/FooterPlacesTest.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\FooterPlaces
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class FooterPlacesTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\FooterPlaces';
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_GetsAllKeys() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $chameleonTemplate->expects( $this->at( 1 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'privacy' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->at( 2 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'about' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $chameleonTemplate->expects( $this->at( 3 ) )
+ ->method( 'get' )
+ ->with( $this->equalTo( 'disclaimer' ), $this->equalTo( null ) )
+ ->will( $this->returnValue( 'SomeHTML' ) );
+
+ $instance = new $this->classUnderTest ( $chameleonTemplate );
+
+ $instance->getHtml();
+
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GenericComponentTestCase.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GenericComponentTestCase.php
new file mode 100644
index 00000000..9d3417bd
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GenericComponentTestCase.php
@@ -0,0 +1,345 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+use DOMDocument;
+use DOMXPath;
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Tests\Util\DocumentElementFinder;
+use Skins\Chameleon\Tests\Util\MockupFactory;
+use Skins\Chameleon\Tests\Util\XmlFileProvider;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Component
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class GenericComponentTestCase extends \PHPUnit_Framework_TestCase {
+
+ private $successColor = '';
+ private $testObject;
+ protected $classUnderTest;
+ protected $componentUnderTest;
+
+ private static $lastValidatorCallTime = 0;
+
+ /**
+ * @covers ::__construct
+ */
+ public function testCanConstruct() {
+
+ /** @var $instance Component */
+ $instance = $this->getTestObject();
+
+ $this->assertInstanceOf(
+ $this->classUnderTest,
+ $instance
+ );
+
+ $this->assertEquals( 0, $instance->getIndent() );
+ $this->assertNull( $instance->getDomElement() );
+ }
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_withEmptyElement() {
+
+ /** @var $instance Component */
+ $instance = $this->getTestObject();
+ $this->assertValidHTML( $instance->getHtml() );
+ }
+
+ /**
+ * @covers ::getHtml
+ * @dataProvider domElementProviderFromSyntheticLayoutFiles
+ *
+ * @param \DOMElement $domElement
+ */
+ public function testGetHtml_OnSyntheticLayoutXml( \DOMElement $domElement ) {
+
+ /** @var $instance Component */
+ $instance = $this->getTestObject( $domElement );
+ $this->assertValidHTML( $instance->getHtml() );
+ }
+
+ /**
+ * @covers ::getHtml
+ * @dataProvider domElementProviderFromDeployedLayoutFiles
+ */
+ public function testGetHtml_OnDeployedLayoutXml( $domElement ) {
+
+ if ( $domElement === null ) {
+ $this->assertTrue( true );
+ return;
+ }
+
+ /** @var $instance Component */
+ $instance = $this->getTestObject( $domElement );
+
+ $this->assertValidHTML( $instance->getHtml() );
+ }
+
+ public function getTestObject( \DOMElement $domElement = null ) {
+ if ( $this->testObject === null ) {
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+ $this->testObject = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+ }
+ return $this->testObject;
+ }
+
+ public function domElementProviderFromSyntheticLayoutFiles() {
+ $file = __DIR__ . '/../../Fixture/' . $this->getNameOfComponentUnderTest() . '.xml';
+ $provider = array_chunk( $this->getDomElementsFromFile( $file ), 1 );
+ return $provider;
+ }
+
+ public function domElementProviderFromDeployedLayoutFiles() {
+
+ $xmlFileProvider = new XmlFileProvider( __DIR__ . '/../../../../layouts' );
+ $files = $xmlFileProvider->getFiles();
+
+ $elements = array();
+ foreach ( $files as $file ) {
+ $elements = array_merge( $elements, $this->getDomElementsFromFile( $file ) );
+ }
+
+ if ( count( $elements ) === 0 ) {
+ $elements[ ] = null;
+ }
+
+ $provider = array_chunk( $elements, 1 );
+
+ return $provider;
+ }
+
+ protected function getDomElementsFromFile( $file ) {
+ $elementFinder = new DocumentElementFinder( $file );
+ $nameParts = array_values( explode( '\\', $this->getNameOfComponentUnderTest() ) );
+ $componentName = end( $nameParts );
+ return $elementFinder->getComponentsByTypeAttribute( $componentName );
+ }
+
+ protected static function loadXML( $fragment, $isHtml = true ) {
+
+ if ( $isHtml ) {
+ $fragment = self::wrapHtmlFragment( $fragment );
+ }
+
+ $doc = new DOMDocument();
+ $doc->preserveWhiteSpace = false;
+
+ if ( $isHtml === true ) {
+ libxml_use_internal_errors( true );
+ $result = $doc->loadHTML( $fragment );
+ libxml_use_internal_errors( false );
+ } else {
+ $result = $doc->loadXML( $fragment );
+ }
+
+ if ( $result === true ) {
+ return $doc;
+ } else {
+ return false;
+ }
+
+ }
+
+ protected static function wrapHtmlFragment( $fragment ) {
+ return '<!DOCTYPE html><html><head><meta charset="utf-8" /><title>SomeTitle</title></head><body>' . $fragment . '</body></html>';
+ }
+
+ /**
+ * Evaluate an HTML or XML string and assert its structure and/or contents.
+ *
+ * @todo: Currently only supports 'tag' and 'class'
+ *
+ * The first argument ($matcher) is an associative array that specifies the
+ * match criteria for the assertion:
+ *
+ * - `id` : the node with the given id attribute must match the
+ * corresponding value.
+ * - `tag` : the node type must match the corresponding value.
+ * - `attributes` : a hash. The node's attributes must match the
+ * corresponding values in the hash.
+ * - `class` : The node's class attribute must contain the given
+ * value.
+ * - `content` : The text content must match the given value.
+ * - `parent` : a hash. The node's parent must match the
+ * corresponding hash.
+ * - `child` : a hash. At least one of the node's immediate children
+ * must meet the criteria described by the hash.
+ * - `ancestor` : a hash. At least one of the node's ancestors must
+ * meet the criteria described by the hash.
+ * - `descendant` : a hash. At least one of the node's descendants must
+ * meet the criteria described by the hash.
+ * - `children` : a hash, for counting children of a node.
+ * Accepts the keys:
+ * - `count` : a number which must equal the number of children
+ * that match
+ * - `less_than` : the number of matching children must be greater
+ * than this number
+ * - `greater_than` : the number of matching children must be less than
+ * this number
+ * - `only` : another hash consisting of the keys to use to match
+ * on the children, and only matching children will be
+ * counted
+ *
+ * @param array $matcher
+ * @param string $actual
+ * @param string $message
+ * @param bool $isHtml
+ */
+ public static function assertTag( $matcher, $actual, $message = 'Failed asserting that the given fragment contained the described node.', $isHtml = true ) {
+
+ $doc = self::loadXML( $actual, $isHtml );
+
+ if ( $doc === false ) {
+ self::fail( $message );
+ }
+
+ $query = '//';
+
+ if ( array_key_exists( 'tag', $matcher ) ) {
+ $query .= strtolower( $matcher[ 'tag' ] );
+ unset( $matcher[ 'tag' ] );
+ } else {
+ $query .= '*';
+ }
+
+ if ( array_key_exists( 'class', $matcher ) ) {
+ $query .= '[contains(concat(" ", normalize-space(@class), " "), " ' . $matcher[ 'class' ] . ' ")]';
+ unset( $matcher[ 'class' ] );
+ }
+
+ if ( count( $matcher ) > 0 ) {
+ trigger_error( 'Found unsupported matcher tags: ' . implode( ', ', array_keys( $matcher ) ), E_USER_WARNING );
+ }
+
+ $xpath = new DOMXPath( $doc );
+ $entries = $xpath->query( $query );
+
+ self::assertGreaterThan( 0, $entries->length, $message );
+
+ }
+
+ /**
+ * Asserts that $actual is a valid HTML fragment
+ *
+ * @todo Put this whole stuff in a \PHPUnit_Framework_Constraint and just call assertThat
+ *
+ * @param $actual
+ * @param string $message
+ */
+ public function assertValidHTML( $actual, $message = 'HTML text is not valid. ' ) {
+
+ if ( !USE_EXTERNAL_HTML_VALIDATOR ) {
+
+ $doc = $this->loadXML( $actual, true );
+ $this->assertNotFalse( $doc, $message );
+
+ return;
+ }
+
+ $actual = $this->wrapHtmlFragment( $actual );
+
+ $curlVersion = curl_version();
+
+ // cURL
+ $curl = curl_init();
+
+ curl_setopt_array( $curl, array(
+ CURLOPT_CONNECTTIMEOUT => 1,
+ CURLOPT_URL => 'http://validator.w3.org/check',
+ CURLOPT_USERAGENT => 'cURL ' . $curlVersion[ 'version' ],
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_POST => true,
+ CURLOPT_POSTFIELDS => array(
+ 'output' => 'json',
+ 'fragment' => $actual,
+ ),
+ ) );
+
+ @time_sleep_until( self::$lastValidatorCallTime + 1 );
+ self::$lastValidatorCallTime = time();
+
+ $response = curl_exec( $curl );
+ $curlInfo = curl_getinfo( $curl );
+
+ curl_close( $curl );
+
+ if ( $response === false ) {
+ $this->markTestIncomplete( 'Could not connect to validation service.' );
+ }
+
+ if ( $curlInfo[ 'http_code' ] != '200' ) {
+ $this->markTestIncomplete( 'Error connecting to validation service. HTTP ' . $curlInfo[ 'http_code' ] );
+ }
+
+ $response = json_decode( $response, true );
+
+ if ( $response === null ) {
+ $this->markTestIncomplete( 'Validation service returned an invalid response (invalid JSON): ' . $response );
+ }
+
+ // fail if errors or warnings
+ if ( array_key_exists( 'messages', $response ) ) {
+
+ foreach ( $response[ 'messages' ] as $responseMessage ) {
+
+ if ( $responseMessage[ 'type' ] === 'error' || $responseMessage[ 'type' ] === 'warning' ) {
+ $this->fail( $message . ucfirst( $response[ 'messages' ][ 0 ][ 'type' ] ) . ': ' . $response[ 'messages' ][ 0 ][ 'message' ] );
+ }
+
+ }
+ }
+
+ // valid
+ $this->successColor = 'bg-green,fg-black';
+ $this->assertTrue( true );
+
+ }
+
+ public function getChameleonSkinTemplateStub() {
+ return MockupFactory::makeFactory( $this )->getChameleonSkinTemplateStub();
+ }
+
+ public function getSuccessColor() {
+ return $this->successColor;
+ }
+
+ public function getNameOfComponentUnderTest() {
+ return str_replace( 'Skins\\Chameleon\\Components\\', '', get_class( $this->getTestObject() ) );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GridTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GridTest.php
new file mode 100644
index 00000000..bd149f2b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/GridTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Grid
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class GridTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Grid';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/HtmlTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/HtmlTest.php
new file mode 100644
index 00000000..1c7fb0df
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/HtmlTest.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+use Skins\Chameleon\Components\Html;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Html
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class HtmlTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Html';
+
+ /**
+ * @covers ::getHtml
+ * @dataProvider domElementProviderFromSyntheticLayoutFiles
+ *
+ * @param \DOMElement $domElement
+ */
+ public function testGetHtml_OnSyntheticLayoutXml( \DOMElement $domElement ) {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $expected = '';
+
+ foreach ( $domElement->childNodes as $child ) {
+ $expected .= $domElement->ownerDocument->saveHTML( $child );
+ }
+
+ $instance = new Html ( $chameleonTemplate, $domElement );
+ $actual = $instance->getHtml();
+
+ $this->assertEquals( $expected, $actual );
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/LogoTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/LogoTest.php
new file mode 100644
index 00000000..bac0e03a
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/LogoTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Logo
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class LogoTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Logo';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MainContentTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MainContentTest.php
new file mode 100644
index 00000000..86398fb6
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MainContentTest.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+use Skins\Chameleon\Components\MainContent;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\MainContent
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MainContentTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\MainContent';
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_OnEmptyDataProperty() {
+
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+
+ $chameleonTemplate->data = array(
+ 'subtitle' => '',
+ 'undelete' => '',
+ 'printfooter' => '',
+ 'dataAfterContent' => ''
+ );
+
+ $instance = new MainContent( $chameleonTemplate );
+ $this->assertInternalType( 'string', $instance->getHtml() );
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MenuTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MenuTest.php
new file mode 100644
index 00000000..e9aaaa92
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/MenuTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Menu
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MenuTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Menu';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/GenericModificationTestCase.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/GenericModificationTestCase.php
new file mode 100644
index 00000000..a7b76cc2
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/GenericModificationTestCase.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components\Modifications;
+use Skins\Chameleon\Components\Component;
+use Skins\Chameleon\Components\Silent;
+use Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Modifications\Modification
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class GenericModificationTestCase extends GenericComponentTestCase {
+
+ public function getTestObject( \DOMElement $domElement = null ) {
+ $component = $this->getModifiedComponent();
+ return new $this->classUnderTest ( $component, $domElement );
+ }
+
+ /**
+ * @return Component
+ */
+ protected function getModifiedComponent() {
+ $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+ return new Silent( $chameleonTemplate );
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/HideForTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/HideForTest.php
new file mode 100644
index 00000000..a9369b7c
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/HideForTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components\Modifications;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Modifications\HideFor
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class HideForTest extends GenericModificationTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Modifications\HideFor';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/ShowOnlyForTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/ShowOnlyForTest.php
new file mode 100644
index 00000000..928a89f7
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/Modifications/ShowOnlyForTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components\Modifications;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Modifications\ShowOnlyFor
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class ShowOnlyTest extends GenericModificationTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Modifications\ShowOnlyFor';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavMenuTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavMenuTest.php
new file mode 100644
index 00000000..cec2a6a6
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavMenuTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\NavMenu
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class NavMenuTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\NavMenu';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontalTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontalTest.php
new file mode 100644
index 00000000..2f35b00e
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontalTest.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+use Skins\Chameleon\Components\NavbarHorizontal;
+use Skins\Chameleon\Tests\Util\MockupFactory;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\NavbarHorizontal
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class NavbarHorizontalTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\NavbarHorizontal';
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_containsNavElement() {
+
+ $element = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $message = $this->getMockBuilder( '\Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $chameleonTemplate = $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $chameleonTemplate->expects( $this->any() )
+ ->method( 'getMsg' )
+ ->will( $this->returnValue( $message ) );
+
+ $instance = new NavbarHorizontal(
+ $chameleonTemplate,
+ $element
+ );
+
+ $matcher = array( 'tag' => 'nav' );
+ $this->assertTag( $matcher, $instance->getHtml() );
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PageToolsAdaptableTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PageToolsAdaptableTest.php
new file mode 100644
index 00000000..424e403c
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PageToolsAdaptableTest.php
@@ -0,0 +1,326 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Components\NavbarHorizontal\PageToolsAdaptable;
+use Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase;
+use \Html;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\NavbarHorizontal\PageToolsAdaptable
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class PageToolsAdaptableTest extends GenericComponentTestCase
+{
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\NavbarHorizontal\PageToolsAdaptable';
+
+ /**
+ * @param string $show
+ * @param array $expectedIconClasses
+ * @covers ::getHtml
+ * @dataProvider providerShowIconData
+ */
+ public function testGetHtml_ContainsIconsToShow( $show, $expectedIconClasses ) {
+
+ $chameleonTemplate = $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $chameleonTemplate->expects( $this->any() )
+ ->method( 'get' )
+ ->will( $this->returnValue( $this->skinTemplateGet() ) );
+
+ $message = $this->getMockBuilder( '\Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $message->expects( $this->any() )
+ ->method( 'text' )
+ ->will( $this->returnValue( '' ) );
+
+ $chameleonTemplate->method( 'getMsg' )
+ ->willReturn( $message );
+
+ $chameleonTemplate->method( 'makeListItem' )
+ ->will( $this->returnCallback( array( $this, 'makeListItem' ) ) );
+
+ $domElement = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $domElement->expects( $this->any() )
+ ->method( 'getAttribute' )
+ ->will( $this->returnValue( $show ) );
+
+ /** @var \Skins\Chameleon\Components\Component $instance */
+ $instance = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+
+ $output = $instance->getHtml();
+ foreach ( $expectedIconClasses as $expectedIconClass ) {
+ $matcher = array( 'tag' => 'span', 'class' => $expectedIconClass );
+ $this->assertTag(
+ $matcher,
+ $output,
+ 'Failed asserting that the given fragment contained the described node. '
+ . 'Class "' . $expectedIconClass . '" not found in output for show value "' . $show . '"!'
+ );
+ }
+ }
+
+ /**
+ * @covers ::getHtml
+ */
+ public function testGetHtml_ContainsNoIconsOnEmptyShow() {
+
+ $chameleonTemplate = $this->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $chameleonTemplate->expects( $this->any() )
+ ->method( 'get' )
+ ->will( $this->returnValue( $this->skinTemplateGet() ) );
+
+ $message = $this->getMockBuilder( '\Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $message->expects( $this->any() )
+ ->method( 'text' )
+ ->will( $this->returnValue( '' ) );
+
+ $chameleonTemplate->method( 'getMsg' )
+ ->willReturn( $message );
+
+ $chameleonTemplate->method( 'makeListItem' )
+ ->will( $this->returnCallback( array( $this, 'makeListItem' ) ) );
+
+ $domElement = $this->getMockBuilder( '\DOMElement' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $domElement->expects( $this->any() )
+ ->method( 'getAttribute' )
+ ->will( $this->returnValue( '' ) );
+
+ /** @var \Skins\Chameleon\Components\Component $instance */
+ $instance = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+
+ $output = $instance->getHtml();
+ $this->assertNotContains(
+ 'glyphicon glyphicon-',
+ $output
+ );
+ }
+
+ /**
+ * @return array
+ */
+ public function providerShowIconData() {
+ return array(
+ 'view only' => array(
+ 'view',
+ array( 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 'view' ) ),
+ ),
+ 'all edits' => array(
+ 'edit,ve-edit,formedit',
+ array(
+ 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 'edit' ),
+ 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 've-edit' ),
+ 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 'formedit' ),
+ ),
+ ),
+ 'some invalid' => array(
+ 'view,etit,history,wotch,protekt',
+ array(
+ 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 'view' ),
+ 'glyphicon glyphicon-' . PageToolsAdaptable::getGlyphIconForAction( 'history' ),
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @param string $key
+ * @param array $item
+ * @param array $options
+ * @return string
+ */
+ public function makeListItem( $key, $item, $options = array() ) {
+ $html = isset( $item['text'] ) ? htmlentities( $item['text'] ) : '';
+ if ( isset( $options['text-wrapper'] ) ) {
+ $wrapper = $options['text-wrapper'];
+ $html = Html::rawElement( $wrapper['tag'], $wrapper['attributes'], $html );
+ }
+
+ $link = $item;
+ // These keys are used by makeListItem and shouldn't be passed on to the link
+ foreach ( array( 'id', 'class', 'active', 'tag', 'itemtitle' ) as $k ) {
+ unset( $link[$k] );
+ }
+ if ( isset( $options['link-class'] ) ) {
+ if ( isset( $link['class'] ) ) {
+ $link['class'] .= " {$options['link-class']}";
+ } else {
+ $link['class'] = $options['link-class'];
+ }
+ }
+ $html = Html::rawElement( 'a', $link, $html );
+
+ $attributes = array();
+ foreach ( array( 'id', 'class' ) as $attr ) {
+ if ( isset( $item[$attr] ) ) {
+ $attributes[$attr] = $item[$attr];
+ }
+ }
+ if ( isset( $item['active'] ) && $item['active'] ) {
+ if ( !isset( $attributes['class'] ) ) {
+ $attributes['class'] = '';
+ }
+ $attributes['class'] .= ' active';
+ $attributes['class'] = trim( $attributes['class'] );
+ }
+ if ( isset( $item['itemtitle'] ) ) {
+ $attributes['title'] = $item['itemtitle'];
+ }
+ return Html::rawElement( isset( $options['tag'] ) ? $options['tag'] : 'li', $attributes, $html );
+ }
+
+ /**
+ * @return array
+ */
+ private function skinTemplateGet() {
+ return array(
+ 'namespaces' => array(
+ 'talk' => array(
+ 'class' => '',
+ 'text' => 'Discussion',
+ 'href' => '/mw/index.php?title=Talk:Main_Page',
+ 'primary' => true,
+ 'context' => 'talk',
+ 'id' => 'ca-talk',
+ ),
+ ),
+ 'views' => array(
+ 'view' => array(
+ 'class' => 'selected',
+ 'text' => 'View',
+ 'href' => '/mw/index.php/Main_Page',
+ 'primary' => true,
+ 'redundant' => true,
+ 'id' => 'ca-view',
+ ),
+ 've-edit' => array(
+ 'class' => '',
+ 'text' => 'Edit with Virtual Editor',
+ 'href' => '/mw/index.php?title=Main_Page&veaction=edit',
+ 'primary' => true,
+ 'id' => 'ca-ve-edit',
+ ),
+ 'edit' => array(
+ 'class' => 'collapsible',
+ 'text' => 'Edit',
+ 'href' => '/mw/index.php?title=Main_Page&action=edit',
+ 'primary' => true,
+ 'id' => 'ca-edit',
+ ),
+ 'formedit' => array(
+ 'class' => '',
+ 'text' => 'Edit with PageForms',
+ 'href' => '/mw/index.php?title=Main_Page&action=formedit',
+ 'primary' => true,
+ 'id' => 'ca-formedit',
+ ),
+ 'history' => array(
+ 'class' => '',
+ 'text' => 'History',
+ 'href' => '/mw/index.php?title=Main_Page&action=history',
+ 'rel' => 'archives',
+ 'id' => 'ca-history',
+ ),
+ ),
+ 'actions' => array(
+ 'delete' => array(
+ 'class' => '',
+ 'text' => 'Delete',
+ 'href' => '/mw/index.php?title=Main_Page&action=delete',
+ 'id' => 'ca-delete',
+ ),
+ 'undelete' => array(
+ 'class' => '',
+ 'text' => 'Restore 1 Version',
+ 'href' => '/mw/index.php?title=Special:Undelete/Main_Page',
+ 'id' => 'ca-undelete',
+ ),
+ 'move' => array(
+ 'class' => '',
+ 'text' => 'Move',
+ 'href' => '/mw/index.php?title=Special:Move/Main_Page',
+ 'id' => 'ca-move',
+ ),
+ 'protect' => array(
+ 'class' => '',
+ 'text' => 'Protect',
+ 'href' => '/mw/index.php?title=Main_Page&action=protect',
+ 'id' => 'ca-protect',
+ ),
+ 'unprotect' => array(
+ 'class' => '',
+ 'text' => 'Change Protection',
+ 'href' => '/mw/index.php?title=Main_Page&action=unprotect',
+ 'id' => 'ca-unprotect',
+ ),
+ 'watch' => array(
+ 'class' => 'mw-watchlink',
+ 'text' => 'Watch',
+ 'href' => '/mw/index.php?title=Main_Page&action=watch',
+ 'id' => 'ca-watch',
+ ),
+ 'unwatch' => array(
+ 'class' => 'mw-watchlink',
+ 'text' => 'Unwatch',
+ 'href' => '/mw/index.php?title=Main_Page&action=unwatch',
+ 'id' => 'ca-unwatch',
+ ),
+ 'purge' => array(
+ 'class' => '',
+ 'text' => 'Refresh',
+ 'href' => '/mw/index.php?title=Main_Page&action=purge',
+ 'id' => 'ca-purge',
+ ),
+ ),
+ 'variants' => array(),
+ );
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PersonalToolsTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PersonalToolsTest.php
new file mode 100644
index 00000000..3de3dc0b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NavbarHorizontral/PersonalToolsTest.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2017, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components\NavbarHorizontal;
+
+use Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase;
+use Skins\Chameleon\Tests\Util\MockupFactory;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\NavbarHorizontal\PersonalTools
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.6
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class PersonalToolsTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\NavbarHorizontal\PersonalTools';
+
+ /**
+ * @covers ::getHtml
+ * @dataProvider domElementProviderFromSyntheticLayoutFiles
+ */
+ public function testGetHtml_LoggedInUserHasNewMessages( $domElement ) {
+
+ $factory = MockupFactory::makeFactory( $this );
+ $factory->set( 'UserIsLoggedIn', true );
+ $factory->set( 'UserNewMessageLinks', array( 'foo' ) );
+ $chameleonTemplate = $factory->getChameleonSkinTemplateStub();
+
+ /** @var \Skins\Chameleon\Components\Component $instance */
+ $instance = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+
+ $matcher = array( 'class' => 'navbar-newtalk-available' );
+ $this->assertTag( $matcher, $instance->getHtml() );
+ }
+
+ /**
+ * @covers ::getHtml
+ * @dataProvider domElementProviderFromSyntheticLayoutFiles
+ */
+ public function testGetHtml_LoggedInUserHasNoNewMessages( $domElement ) {
+
+ $factory = MockupFactory::makeFactory( $this );
+ $factory->set( 'UserIsLoggedIn', true );
+ $factory->set( 'UserNewMessageLinks', array() );
+ $chameleonTemplate = $factory->getChameleonSkinTemplateStub();
+
+ /** @var \Skins\Chameleon\Components\Component $instance */
+ $instance = new $this->classUnderTest ( $chameleonTemplate, $domElement );
+
+ $matcher = array( 'class' => 'navbar-newtalk-not-available' );
+ $this->assertTag( $matcher, $instance->getHtml() );
+ }
+
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NewtalkNotifierTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NewtalkNotifierTest.php
new file mode 100644
index 00000000..8668ff01
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/NewtalkNotifierTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\NewtalkNotifier
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class NewtalkNotifierTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\NewtalkNotifier';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PageToolsTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PageToolsTest.php
new file mode 100644
index 00000000..410671ae
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PageToolsTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\PageTools
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class PageToolsTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\PageTools';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PersonalToolsTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PersonalToolsTest.php
new file mode 100644
index 00000000..cd823979
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/PersonalToolsTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\PersonalTools
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class PersonalToolsTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\PersonalTools';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/RowTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/RowTest.php
new file mode 100644
index 00000000..6d7fc6a0
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/RowTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Row
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class RowTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Row';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SearchBarTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SearchBarTest.php
new file mode 100644
index 00000000..86624270
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SearchBarTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\SearchBar
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class SearchBarTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\SearchBar';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SilentTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SilentTest.php
new file mode 100644
index 00000000..2906975b
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SilentTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Silent
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class SilentTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Silent';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SiteNoticeTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SiteNoticeTest.php
new file mode 100644
index 00000000..d017c213
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/SiteNoticeTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\SiteNotice
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class SiteNoticeTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\SiteNotice';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/StructureTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/StructureTest.php
new file mode 100644
index 00000000..9435fd40
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/StructureTest.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\Structure
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class StructureTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\Structure';
+// protected $componentUnderTest = 'Structure';
+
+// /**
+// * @covers ::getHtml
+// */
+// public function testGetHtml() {
+//
+// $chameleonTemplate = $this->getChameleonSkinTemplateStub();
+//
+// $instance = new $this->classUnderTest ( $chameleonTemplate );
+//
+// $this->assertTrue( is_string( $instance->getHtml() ) );
+// }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ToolbarHorizontalTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ToolbarHorizontalTest.php
new file mode 100644
index 00000000..57cc1e0f
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Components/ToolbarHorizontalTest.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Components;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Components\ToolbarHorizontal
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class ToolbarHorizontalTest extends GenericComponentTestCase {
+
+ protected $classUnderTest = '\Skins\Chameleon\Components\ToolbarHorizontal';
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Hooks/SetupAfterCacheTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Hooks/SetupAfterCacheTest.php
new file mode 100644
index 00000000..958568a5
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Hooks/SetupAfterCacheTest.php
@@ -0,0 +1,498 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2016, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Hooks;
+
+use Skins\Chameleon\Hooks\SetupAfterCache;
+
+/**
+ * @coversDefaultClass \Skins\Chameleon\Hooks\SetupAfterCache
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group skins-chameleon-unit
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class SetupAfterCacheTest extends \PHPUnit_Framework_TestCase {
+
+ protected $dummyExternalModule = null;
+
+ protected function setUp() {
+ parent::setUp();
+
+ $this->dummyExternalModule = __DIR__ . '/../../Fixture/externalmodule.less';
+ }
+
+ /**
+ * @return string
+ */
+ private function getWorkDirectory() {
+
+ $directory = $GLOBALS[ 'argv' ][ 0 ];
+
+ if ( $directory[ 0 ] !== DIRECTORY_SEPARATOR ) {
+ $directory = $_SERVER[ 'PWD' ] . DIRECTORY_SEPARATOR . $directory;
+ }
+
+ $directory = dirname( $directory );
+
+ return $directory;
+ }
+
+ /**
+ * @covers ::__construct
+ */
+ public function testCanConstruct() {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $configuration = array();
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->assertInstanceOf(
+ '\Skins\Chameleon\Hooks\SetupAfterCache',
+ new SetupAfterCache( $bootstrapManager, $configuration, $request )
+ );
+ }
+
+ /**
+ * @covers ::process
+ * @covers ::registerCommonBootstrapModules
+ * @covers ::registerExternalLessModules
+ */
+ public function testProcessWithValidExternalModuleWithoutLessVariables() {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $bootstrapManager->expects( $this->at( 1 ) )
+ ->method( 'addExternalModule' );
+
+ $bootstrapManager->expects( $this->at( 2 ) )
+ ->method( 'addExternalModule' )
+ ->with(
+ $this->equalTo( $this->dummyExternalModule ),
+ $this->equalTo( '' ) );
+
+ $bootstrapManager->expects( $this->at( 3 ) )
+ ->method( 'addExternalModule' )
+ ->with(
+ $this->equalTo( $this->dummyExternalModule ),
+ $this->equalTo( 'someRemoteWeDontCheck' ) );
+
+ $bootstrapManager->expects( $this->never() )
+ ->method( 'setLessVariable' );
+
+ $mixedExternalStyleModules = array(
+ $this->dummyExternalModule,
+ $this->dummyExternalModule => 'someRemoteWeDontCheck'
+ );
+
+ $configuration = array(
+ 'egChameleonExternalStyleModules' => $mixedExternalStyleModules,
+ 'IP' => 'notTestingIP',
+ 'wgScriptPath' => 'notTestingwgScriptPath',
+ 'wgStyleDirectory' => 'notTestingwgStyleDirectory',
+ 'wgStylePath' => 'notTestingwgStylePath',
+ );
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $configuration,
+ $request
+ );
+
+ $instance->process();
+ }
+
+ /**
+ * @covers ::process
+ * @covers ::registerExternalLessModules
+ */
+ public function testProcessWithInvalidExternalModuleThrowsException() {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $bootstrapManager->expects( $this->atLeastOnce() )
+ ->method( 'addExternalModule' )
+ ->will( $this->returnValue( true ) );
+
+ $externalStyleModules = array(
+ __DIR__ . '/../../Util/Fixture/' . 'externalmoduleDoesNotExist.less'
+ );
+
+ $configuration = array(
+ 'egChameleonExternalStyleModules' => $externalStyleModules,
+ 'IP' => 'notTestingIP',
+ 'wgScriptPath' => 'notTestingwgScriptPath',
+ 'wgStyleDirectory' => 'notTestingwgStyleDirectory',
+ 'wgStylePath' => 'notTestingwgStylePath'
+ );
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $configuration,
+ $request
+ );
+
+ $this->setExpectedException( 'RuntimeException' );
+
+ $instance->process();
+ }
+
+ /**
+ * @covers ::process
+ * @covers ::registerExternalLessVariables
+ */
+ public function testProcessWithLessVariables() {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $bootstrapManager->expects( $this->once() )
+ ->method( 'addExternalModule' )
+ ->will( $this->returnValue( true ) );
+
+ $bootstrapManager->expects( $this->once() )
+ ->method( 'setLessVariable' )
+ ->with(
+ $this->equalTo( 'foo' ),
+ $this->equalTo( '999px' ) );
+
+ $externalLessVariables = array(
+ 'foo' => '999px'
+ );
+
+ $configuration = array(
+ 'egChameleonExternalLessVariables' => $externalLessVariables,
+ 'IP' => 'notTestingIP',
+ 'wgScriptPath' => 'notTestingwgScriptPath',
+ 'wgStyleDirectory' => 'notTestingwgStyleDirectory',
+ 'wgStylePath' => 'notTestingwgStylePath'
+ );
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $configuration,
+ $request
+ );
+
+ $instance->process();
+ }
+
+ /**
+ * @covers ::process
+ * @covers ::registerExternalLessVariables
+ *
+ * @dataProvider processWithRequestedLayoutFileProvider
+ */
+ public function testProcessWithRequestedLayoutFile( $availableLayoutFiles, $defaultLayoutFile, $requestedLayout, $expectedLayoutfile ) {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $configuration = array(
+ 'egChameleonAvailableLayoutFiles' => $availableLayoutFiles,
+ 'egChameleonLayoutFile' => $defaultLayoutFile,
+ 'IP' => 'notTestingIP',
+ 'wgScriptPath' => 'notTestingwgScriptPath',
+ 'wgStyleDirectory' => 'notTestingwgStyleDirectory',
+ 'wgStylePath' => 'notTestingwgStylePath'
+ );
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $request->expects( $this->once() )
+ ->method( 'getVal' )
+ ->will( $this->returnValue( $requestedLayout ) );
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $configuration,
+ $request
+ );
+
+ $instance->process();
+
+ $this->assertEquals(
+ $expectedLayoutfile,
+ $configuration['egChameleonLayoutFile']
+ );
+ }
+
+ public function processWithRequestedLayoutFileProvider() {
+
+ $provider = array();
+
+ // no layout files available => keep default layout file
+ $provider[] = array(
+ null,
+ 'standard.xml',
+ 'someOtherLayout',
+ 'standard.xml'
+ );
+
+ // no specific layout requested => keep default layout file
+ $provider[] = array(
+ array(
+ 'layout1' => 'layout1.xml',
+ 'layout2' => 'layout2.xml',
+ ),
+ 'standard.xml',
+ null,
+ 'standard.xml'
+ );
+
+ // requested layout not available => keep default layout file
+ $provider[] = array(
+ array(
+ 'layout1' => 'layout1.xml',
+ 'layout2' => 'layout2.xml',
+ ),
+ 'standard.xml',
+ 'someOtherLayout',
+ 'standard.xml'
+ );
+
+ // requested layout available => return requested layout file
+ $provider[] = array(
+ array(
+ 'layout1' => 'layout1.xml',
+ 'layout2' => 'layout2.xml',
+ ),
+ 'standard.xml',
+ 'layout1',
+ 'layout1.xml'
+ );
+
+ return $provider;
+ }
+
+ /**
+ * @covers ::adjustConfiguration
+ *
+ * @dataProvider adjustConfigurationProvider
+ */
+ public function testAdjustConfiguration( $origConfig, $changes, $expected ) {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $changes,
+ $request
+ );
+
+ $instance->adjustConfiguration( $origConfig );
+
+ $this->assertEquals( $expected, $origConfig );
+ }
+
+ /**
+ * @covers ::process
+ * @covers ::addLateSettings
+ *
+ * @depends testAdjustConfiguration
+ *
+ * @dataProvider lateSettingsProvider
+ */
+ public function testProcessWithLateSettingsToAdjustConfiguration( $configuration, $expected ) {
+
+ $bootstrapManager = $this->getMockBuilder( '\Bootstrap\BootstrapManager' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $dir = $this->getWorkDirectory();
+ $IP = dirname(dirname($dir));
+
+ $defaultConfiguration = array(
+ 'IP' => $IP,
+ 'wgScriptPath' => 'notTestingwgScriptPath',
+ 'wgStylePath' => 'notTestingwgStylePath',
+ 'wgStyleDirectory' => 'notTestingwgStyleDirectory',
+ 'wgResourceModules' => array(),
+ );
+
+ $expected[ 'chameleonLocalPath' ] = $defaultConfiguration[ 'wgStyleDirectory' ] . '/chameleon';
+ $expected[ 'chameleonRemotePath' ] = $defaultConfiguration[ 'wgStylePath' ] . '/chameleon';
+
+ $expected[ 'wgResourceModules' ] = array();
+ $expected[ 'wgResourceModules' ][ 'skin.chameleon.jquery-sticky' ] = array(
+ 'localBasePath' => $expected[ 'chameleonLocalPath' ] . '/resources/js',
+ 'remoteBasePath' => $expected[ 'chameleonRemotePath' ] . '/resources/js',
+ 'group' => 'skin.chameleon',
+ 'skinScripts' => array(
+ 'chameleon' => array( 'sticky-kit/jquery.sticky-kit.js', 'Components/Modifications/sticky.js' )
+ )
+ );
+
+ $configurationToBeAdjusted = $configuration + $defaultConfiguration;
+
+ $request = $this->getMockBuilder('\WebRequest')
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $instance = new SetupAfterCache(
+ $bootstrapManager,
+ $configurationToBeAdjusted,
+ $request
+ );
+
+ $instance->process();
+
+ $this->assertEquals(
+ $expected + $defaultConfiguration,
+ $configurationToBeAdjusted
+ );
+ }
+
+ /**
+ * Provides test data for the lateSettings test
+ */
+ public function lateSettingsProvider() {
+
+ $provider = array();
+
+ $provider[ ] = array(
+ array(),
+ array()
+ );
+
+ $provider[ ] = array(
+ array(
+ 'wgVisualEditorSupportedSkins' => array(),
+ ),
+ array(
+ 'wgVisualEditorSupportedSkins' => array(),
+ )
+ );
+
+ $provider[ ] = array(
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ ),
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ )
+ );
+
+ $provider[ ] = array(
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ 'wgVisualEditorSupportedSkins' => array( 'foo' ),
+ ),
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ 'wgVisualEditorSupportedSkins' => array( 'foo', 'chameleon' ),
+ )
+ );
+
+ $provider[ ] = array(
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ 'wgVisualEditorSupportedSkins' => array( 'foo', 'chameleon' ),
+ ),
+ array(
+ 'egChameleonEnableVisualEditor' => true,
+ 'wgVisualEditorSupportedSkins' => array( 'foo', 'chameleon' ),
+ )
+ );
+
+ $provider[ ] = array(
+ array(
+ 'egChameleonEnableVisualEditor' => false,
+ 'wgVisualEditorSupportedSkins' => array( 'chameleon', 'foo' => 'chameleon', 'foo' ),
+ ),
+ array(
+ 'egChameleonEnableVisualEditor' => false,
+ 'wgVisualEditorSupportedSkins' => array( 1 => 'foo' ),
+ )
+ );
+
+ return $provider;
+ }
+
+ /**
+ * Provides test data for the adjustConfiguration test
+ */
+ public function adjustConfigurationProvider() {
+
+ $provider = array();
+
+ $provider[ ] = array(
+ array(
+ 'key1' => 'value1',
+ 'key2' => 'value2',
+ ),
+ array(
+ 'key2' => 'value2changed',
+ 'key3' => 'value3changed',
+ ),
+ array(
+ 'key1' => 'value1',
+ 'key2' => 'value2changed',
+ 'key3' => 'value3changed',
+ )
+ );
+
+ return $provider;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Unit/Menu/MenuFromLinesTest.php b/www/wiki/skins/chameleon/tests/phpunit/Unit/Menu/MenuFromLinesTest.php
new file mode 100644
index 00000000..cd8cbcc5
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Unit/Menu/MenuFromLinesTest.php
@@ -0,0 +1,127 @@
+<?php
+/**
+ * File containing the MenuFromLinesTest class
+ *
+ * @copyright (C) 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Unit\Menu;
+use Skins\Chameleon\Menu\MenuFromLines;
+
+/**
+ * Class MenuFromLinesTest
+ *
+ * @coversDefaultClass \Skins\Chameleon\Menu\MenuFromLines
+ * @covers ::<private>
+ * @covers ::<protected>
+ *
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.1.2
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MenuFromLinesTest extends \PHPUnit_Framework_TestCase {
+
+ /**
+ * @covers ::__construct
+ */
+ public function testCanConstruct() {
+
+ $lines = array();
+
+ /** @var MenuFromLines $instance */
+ $instance = new MenuFromLines( $lines, true );
+
+ $this->assertInstanceOf(
+ 'Skins\Chameleon\Menu\MenuFromLines',
+ $instance
+ );
+ }
+
+ /**
+ * @covers ::__construct
+ *
+ * Just checking that giving an item data parameter does not immediately
+ * break the constructor. No actual functionality beyond that is tested.
+ */
+ public function testCanConstructWithItemData() {
+
+ $lines = array();
+
+ /** @var MenuFromLines $instance */
+ $instance = new MenuFromLines( $lines, true, array(
+ 'text' => 'foo',
+ 'href' => 'bar',
+ 'depth' => 42
+ ) );
+
+ $this->assertInstanceOf(
+ 'Skins\Chameleon\Menu\MenuFromLines',
+ $instance
+ );
+ }
+
+ /**
+ * @covers ::getHtml
+ * @covers ::parseLines
+ */
+ public function testBuildEmptyMenu() {
+
+ $lines = array(
+ '',
+ '* Foo',
+ '** | FooBar',
+ '*** http://foo.com | FooBarBaz',
+ '*** # | FooBarQuok',
+ '* Test | Bar',
+ );
+
+ $ap = $GLOBALS[ 'wgArticlePath' ];
+
+ $expected =
+ "\t<ul>\n" .
+ "\t\t<li>\n" .
+ "\t\t\t<a href=\"" . str_replace( '$1', 'Foo', $ap ) . "\">Foo</a>\n" .
+ "\t\t\t<ul>\n" .
+ "\t\t\t\t<li>\n" .
+ "\t\t\t\t\t<a href=\"#" . "\">FooBar</a>\n" .
+ "\t\t\t\t\t<ul>\n" .
+ "\t\t\t\t\t\t<li><a href=\"http://foo.com\">FooBarBaz</a></li>\n" .
+ "\t\t\t\t\t\t<li><a href=\"#\">FooBarQuok</a></li>\n" .
+ "\t\t\t\t\t</ul>\n" .
+ "\t\t\t\t</li>\n" .
+ "\t\t\t</ul>\n" .
+ "\t\t</li>\n" .
+ "\t\t<li><a href=\"" . str_replace( '$1', 'Test', $ap ) . "\">Bar</a></li>\n" .
+ "\t</ul>\n";
+
+ /** @var MenuFromLines $instance */
+ $instance = new MenuFromLines( $lines, true );
+
+ $this->assertEquals(
+ $expected,
+ $instance->getHtml()
+ );
+
+ }
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Util/ColoringTextUIResultPrinter.php b/www/wiki/skins/chameleon/tests/phpunit/Util/ColoringTextUIResultPrinter.php
new file mode 100644
index 00000000..6d55b1b0
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Util/ColoringTextUIResultPrinter.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Util;
+
+/**
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class ColoringTextUIResultPrinter extends \PHPUnit_TextUI_ResultPrinter {
+
+ /**
+ * @var array
+ */
+ protected static $ansiCodes = array(
+ 'bold' => 1,
+ 'fg-black' => 30,
+ 'fg-red' => 31,
+ 'fg-green' => 32,
+ 'fg-yellow' => 33,
+ 'fg-cyan' => 36,
+ 'fg-white' => 37,
+ 'bg-red' => 41,
+ 'bg-green' => 42,
+ 'bg-yellow' => 43
+ );
+
+ public function endTest(\PHPUnit_Framework_Test $test, $time)
+ {
+ if (!$this->lastTestFailed) {
+
+ $color = '';
+ if ( method_exists($test, 'getSuccessColor' )) {
+ $color = $test->getSuccessColor();
+ }
+ $this->writeProgressWithColor($color, '.');
+
+ }
+
+ if ($test instanceof \PHPUnit_Framework_TestCase) {
+ $this->numAssertions += $test->getNumAssertions();
+ } elseif ($test instanceof \PHPUnit_Extensions_PhptTestCase) {
+ $this->numAssertions++;
+ }
+
+ $this->lastTestFailed = false;
+
+ if ($test instanceof \PHPUnit_Framework_TestCase) {
+ if (!$test->hasPerformedExpectationsOnOutput()) {
+ $this->write($test->getActualOutput());
+ }
+ }
+ }
+
+ protected function formatWithColor($color, $buffer)
+ {
+ if (!$this->colors) {
+ return $buffer;
+ }
+
+ $codes = array_filter( array_map('trim', explode(',', $color)) );
+ $lines = explode("\n", $buffer);
+ $padding = max(array_map('strlen', $lines));
+
+ $styles = array();
+ foreach ($codes as $code) {
+ $styles[] = self::$ansiCodes[$code];
+ }
+ $style = sprintf("\x1b[%sm", implode(';', $styles));
+
+ $styledLines = array();
+ foreach ($lines as $line) {
+ $styledLines[] = $style . str_pad($line, $padding) . "\x1b[0m";
+ }
+
+ return implode("\n", $styledLines);
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Util/DocumentElementFinder.php b/www/wiki/skins/chameleon/tests/phpunit/Util/DocumentElementFinder.php
new file mode 100644
index 00000000..6f0d0ac5
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Util/DocumentElementFinder.php
@@ -0,0 +1,124 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Util;
+
+use DOMDocument;
+use DOMElement;
+
+use RuntimeException;
+
+/**
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class DocumentElementFinder {
+
+ protected $file = null;
+ protected $document = null;
+
+ /**
+ * @since 1.0
+ *
+ * @param string $file
+ */
+ public function __construct( $file ) {
+ $this->file = $file;
+ }
+
+ /**
+ * @since 1.0
+ *
+ * @param string $type
+ *
+ * @return DOMElement|null
+ */
+ public function getComponentByTypeAttribute( $type ) {
+
+ $elements = $this->getComponentsByTypeAttribute( $type );
+
+ if ( count( $elements ) > 0 ) {
+ return array_shift( $elements );
+ }
+
+ return null;
+ }
+
+ /**
+ * @since 1.0
+ *
+ * @param string $type
+ *
+ * @return DOMElement[]
+ */
+ public function getComponentsByTypeAttribute( $type ) {
+
+ $elements = array();
+
+ $elementList = $this->getDocument()->getElementsByTagName( strtolower( $type ) );
+ foreach( $elementList as $element ){
+ $elements[] = $element;
+ }
+
+ $elementList = $this->getDocument()->getElementsByTagName( '*' );
+ foreach ( $elementList as $element ) {
+ if ( $element instanceOf DOMElement && $element->hasAttribute( 'type' ) && $element->getAttribute( 'type' ) === $type ) {
+ $elements[] = $element;
+ }
+ }
+
+ return $elements;
+ }
+
+ protected function getDocument() {
+
+ if ( $this->document !== null ) {
+ return $this->document;
+ }
+
+ $file = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $this->file );
+
+ if ( !is_readable( $file ) ) {
+ throw new RuntimeException( "Expected an accessible {$file} path" );
+ }
+
+ $document = new DOMDocument;
+ $document->validateOnParse = true;
+
+ if ( !$document->load( $file ) ) {
+ throw new RuntimeException( "Unable to load {$file} file" );
+ }
+
+ $document->normalizeDocument();
+
+ return $document;
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Util/MockupFactory.php b/www/wiki/skins/chameleon/tests/phpunit/Util/MockupFactory.php
new file mode 100644
index 00000000..dee59e0f
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Util/MockupFactory.php
@@ -0,0 +1,335 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2015, Stephan Gambke
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Util;
+
+/**
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author Stephan Gambke
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class MockupFactory {
+
+ private $testCase;
+ private $configuration = array(
+ 'UserIsLoggedIn' => false,
+ 'UserNewMessageLinks' => array(),
+ 'UserEffectiveGroups' => array( '*' ),
+ 'UserRights' => array(),
+ );
+
+ public function __construct( \PHPUnit_Framework_TestCase $testCase ) {
+ $this->testCase = $testCase;
+ }
+
+ /**
+ * Returns a new factory. Convenience method to avoid having to use the constructor.
+ *
+ * @param \PHPUnit_Framework_TestCase $testCase
+ *
+ * @return MockupFactory
+ */
+ public static function makeFactory( \PHPUnit_Framework_TestCase $testCase ) {
+ return new self( $testCase );
+ }
+
+ public function set( $key, $value ) {
+ $this->configuration[ $key ] = $value;
+ }
+
+ public function getChameleonSkinTemplateStub() {
+
+ $chameleonTemplate = $this->testCase->getMockBuilder( '\Skins\Chameleon\ChameleonTemplate' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $chameleonTemplate->data = $this->getSkinTemplateDummyDataSetForMainNamespace();
+ $chameleonTemplate->translator = $this->getTranslatorStub();
+
+ $dataMap = array_map(
+ function ( $key, $value ) {
+ return array( $key, null, $value );
+ },
+ array_keys( $chameleonTemplate->data ),
+ array_values( $chameleonTemplate->data )
+ );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'get' )
+ ->will( $this->testCase->returnValueMap( $dataMap ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getMsg' )
+ ->will( $this->testCase->returnValue( $this->getMessageStub() ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getSkin' )
+ ->will( $this->testCase->returnValue( $this->getSkinStub() ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getComponent' )
+ ->will( $this->testCase->returnValue( $this->getComponentStub() ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getSidebar' )
+ ->will( $this->testCase->returnValue( array() ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getToolbox' )
+ ->will( $this->testCase->returnValue( array() ) );
+
+ $chameleonTemplate->expects( $this->testCase->any() )
+ ->method( 'getPersonalTools' )
+ ->will( $this->testCase->returnValue( array( 'foo' => array(), 'bar' => array() ) ) );
+
+ $chameleonTemplate->expects( $this->testCase->any( 0 ) )
+ ->method( 'getFooterLinks' )
+ ->will( $this->testCase->returnValue(
+ array(
+ 'category1' => array( 'key1', 'key2' ),
+ 'category2' => array( 'key3', 'key4' ),
+ 'places' => array( 'privacy', 'about', 'disclaimer' ),
+ )
+ )
+ );
+
+ return $chameleonTemplate;
+ }
+
+ /**
+ * Dummy values are by no means to represent a particular intention or
+ * objective and merely used to pass through the respective method
+ *
+ * Testing specific conditions should be done separately in each sub
+ * component
+ */
+ protected function getSkinTemplateDummyDataSetForMainNamespace() {
+ return array(
+
+ // Required by Logo
+ 'logopath' => 'foo',
+ 'sitename' => 'bar',
+
+ // Required by NavMenu
+ 'nav_urls' => array(
+ 'mainpage' => array( 'href' => 'bat' )
+ ),
+
+ // Required by PageTools
+ 'content_navigation' => array(
+ 'namespaces' =>
+ array(
+ 'talk' =>
+ array(
+ 'class' => '',
+ 'text' => 'Discussion',
+ 'href' => '/mw/index.php?title=Talk:Main_Page',
+ 'primary' => true,
+ 'context' => 'talk',
+ 'id' => 'ca-talk',
+ ),
+ ),
+ 'views' =>
+ array(
+ 'view' =>
+ array(
+ 'class' => 'selected',
+ 'text' => 'View',
+ 'href' => '/mw/index.php/Main_Page',
+ 'primary' => true,
+ 'redundant' => true,
+ 'id' => 'ca-view',
+ ),
+ 'edit' =>
+ array(
+ 'class' => '',
+ 'text' => 'Edit',
+ 'href' => '/mw/index.php?title=Main_Page&action=edit',
+ 'primary' => true,
+ 'id' => 'ca-edit',
+ ),
+ 'history' =>
+ array(
+ 'class' => false,
+ 'text' => 'History',
+ 'href' => '/mw/index.php?title=Main_Page&action=history',
+ 'rel' => 'archives',
+ 'id' => 'ca-history',
+ ),
+ ),
+ ),
+
+ // Required by SearchBar
+ 'wgScript' => 'bam',
+ 'searchtitle' => 'jouy',
+
+ // Required by MainContent
+ 'subtitle' => 'SomeSubtitle',
+ 'undelete' => 'SomeUndeleteMessage',
+ 'dataAfterContent' => 'SomeDataAfterContent',
+ );
+ }
+
+ protected function getTranslatorStub() {
+
+ $translator = $this->testCase->getMockBuilder( '\stdClass' )
+ ->setMethods( array( 'translate' ) )
+ ->getMock();
+
+ $translator->expects( $this->testCase->any() )
+ ->method( 'translate' )
+ ->will( $this->testCase->returnValue( 'translate' ) );
+
+ return $translator;
+ }
+
+ protected function getMessageStub() {
+
+ $message = $this->testCase->getMockBuilder( '\Message' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $message->expects( $this->testCase->any() )
+ ->method( 'params' )
+ ->will( $this->testCase->returnSelf() );
+
+ return $message;
+
+ }
+
+ protected function getSkinStub() {
+
+ $title = \Title::newFromText( 'FOO' );
+ $request = new \FauxRequest();
+
+ $skin = $this->testCase->getMockBuilder( '\SkinChameleon' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $skin->expects( $this->testCase->any() )
+ ->method( 'getTitle' )
+ ->will( $this->testCase->returnValue( $title ) );
+
+ $skin->expects( $this->testCase->any() )
+ ->method( 'getUser' )
+ ->will( $this->testCase->returnValue( $this->getUserStub() ) );
+
+ $skin->expects( $this->testCase->any() )
+ ->method( 'getRequest' )
+ ->will( $this->testCase->returnValue( $request ) );
+
+ $skin->expects( $this->testCase->any() )
+ ->method( 'getComponentFactory' )
+ ->will( $this->testCase->returnValue( $this->getComponentFactoryStub() ) );
+
+ return $skin;
+ }
+
+ protected function getComponentStub() {
+
+ $component = $this->testCase->getMockBuilder( 'Skins\Chameleon\Components\Component' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $component->expects( $this->testCase->any() )
+ ->method( 'getHtml' )
+ ->will( $this->testCase->returnValue( 'SomePlainText' ) );
+
+ return $component;
+ }
+
+ protected function getUserStub() {
+
+ $user = $this->testCase->getMockBuilder( '\User' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $user->expects( $this->testCase->any() )
+ ->method( 'isLoggedIn' )
+ ->will( $this->testCase->returnValue( $this->get( 'UserIsLoggedIn', true ) ) );
+
+ $user->expects( $this->testCase->any() )
+ ->method( 'getNewMessageLinks' )
+ ->will( $this->testCase->returnValue( $this->get( 'UserNewMessageLinks', 0 ) ) );
+
+ $user->expects( $this->testCase->any() )
+ ->method( 'getEffectiveGroups' )
+ ->will( $this->testCase->returnValue( $this->get( 'UserEffectiveGroups', 0 ) ) );
+
+ $user->expects( $this->testCase->any() )
+ ->method( 'getTalkPage' )
+ ->will( $this->testCase->returnValue( $this->getTitleStub() ) );
+
+ $user->expects( $this->testCase->any() )
+ ->method( 'getRights' )
+ ->will( $this->testCase->returnValue( $this->get( 'UserRights', array() ) ) );
+
+ return $user;
+
+ }
+
+ public function get( $key, $default = null ) {
+
+ if ( isset( $this->configuration[ $key ] ) ) {
+ return $this->configuration[ $key ];
+ } else {
+ return $default;
+ }
+
+ }
+
+ protected function getTitleStub() {
+
+ $title = $this->testCase->getMockBuilder( '\Title' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $title->expects( $this->testCase->any() )
+ ->method( 'getLinkUrl' )
+ ->will( $this->testCase->returnValue( 'SomeLinkUrl' ) );
+
+ return $title;
+
+ }
+
+ protected function getComponentFactoryStub() {
+
+ $factory = $this->testCase->getMockBuilder( 'Skins\Chameleon\ComponentFactory' )
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $factory->expects( $this->testCase->any() )
+ ->method( 'getComponent' )
+ ->will( $this->testCase->returnValue( $this->getComponentStub() ) );
+
+
+ return $factory;
+
+ }
+
+}
diff --git a/www/wiki/skins/chameleon/tests/phpunit/Util/XmlFileProvider.php b/www/wiki/skins/chameleon/tests/phpunit/Util/XmlFileProvider.php
new file mode 100644
index 00000000..78b04c54
--- /dev/null
+++ b/www/wiki/skins/chameleon/tests/phpunit/Util/XmlFileProvider.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * This file is part of the MediaWiki skin Chameleon.
+ *
+ * @copyright 2013 - 2014, Stephan Gambke, mwjames
+ * @license GNU General Public License, version 3 (or any later version)
+ *
+ * The Chameleon skin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option) any
+ * later version.
+ *
+ * The Chameleon skin is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @file
+ * @ingroup Skins
+ */
+
+namespace Skins\Chameleon\Tests\Util;
+
+use RuntimeException;
+
+/**
+ * @group skins-chameleon
+ * @group mediawiki-databaseless
+ *
+ * @author mwjames
+ * @since 1.0
+ * @ingroup Skins
+ * @ingroup Test
+ */
+class XmlFileProvider {
+
+ protected $path = null;
+
+ /**
+ * @since 1.0
+ *
+ * @param string $path
+ */
+ public function __construct( $path ) {
+ $this->path = $path;
+ }
+
+ /**
+ * @since 1.0
+ *
+ * @return array
+ */
+ public function getFiles() {
+ return $this->loadXmlFiles( $this->readDirectory( $this->path ) );
+ }
+
+ protected function readDirectory( $path ) {
+
+ $path = str_replace( array( '\\', '/' ), DIRECTORY_SEPARATOR, $path );
+
+ if ( is_readable( $path ) ) {
+ return $path;
+ }
+
+ throw new RuntimeException( "Expected an accessible {$path} path" );
+ }
+
+ protected function loadXmlFiles( $path ) {
+
+ $files = array();
+ $directoryIterator = new \RecursiveDirectoryIterator( $path );
+
+ foreach ( new \RecursiveIteratorIterator( $directoryIterator ) as $fileInfo ) {
+ if ( strtolower( substr( $fileInfo->getFilename(), -4 ) ) === '.xml' ) {
+ $files[] = $fileInfo->getPathname();
+ }
+ }
+
+ return $files;
+ }
+
+}