From 3c17e63c47e55f5070e3c7049d300f3e6164f190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Wed, 19 Apr 2017 00:21:33 +0200 Subject: Add Cavendish theme --- Cavendish.php | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 Cavendish.php (limited to 'Cavendish.php') diff --git a/Cavendish.php b/Cavendish.php new file mode 100644 index 0000000..8a5e6eb --- /dev/null +++ b/Cavendish.php @@ -0,0 +1,253 @@ +skinname = 'cavendish'; + $this->stylename = 'cavendish'; + $this->template = 'CavendishTemplate'; + $this->useHeadElement = true; + } + function setupSkinUserCss( OutputPage $out ) { + global $wgHandheldStyle, $wgStyleVersion, $wgJsMimeType, $wgStylePath, $wgVersion, $wgLogo; + parent::setupSkinUserCss( $out ); + // Append to the default screen common & print styles... + $out->addStyle( 'cavendish/print.css', 'print' ); + $out->addStyle( 'cavendish/cavendish.css', 'screen' ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $out->addStyle( $wgHandheldStyle, 'handheld' ); + } + $out->addStyle( 'cavendish/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'cavendish/IE70Fixes.css', 'screen', 'IE 7' ); + + $out->addStyle( 'cavendish/rtl.css', 'screen', '', 'rtl' ); + + /* README for details */ + include('cavendish/config.php'); + + $out->addStyle( 'cavendish/colors/'. $cavendishColor .'.css', 'screen' ); + + if ($cavendishExtensionCSS) { + $out->addStyle( 'cavendish/extensions.css', 'screen' ); + } + $out->addStyle( 'cavendish/style.php', 'screen' ); + } +} + +class CavendishTemplate extends MonoBookTemplate { + var $skin; + /** + * Template filter callback for cavendish skin. + * Takes an associative array of data set from a SkinTemplate-based + * class, and a wrapper for MediaWiki's localization database, and + * outputs a formatted page. + * + * @access private + */ + function execute() { + global $wgRequest, $wgLang; + include('cavendish/config.php'); + $QRURL = htmlentities( $this->getSkin()->getTitle()->getFullURL()).$cavendishQRurladd; + $styleversion = '2.3.3'; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + if ( $action == "") { + $action = "view"; + } + // Suppress warnings to prevent notices about missing indexes in $this->data + wfSuppressWarnings(); + // HTML starts here + $this->html( 'headelement' ); +?> +
+ +
+
+
msg('personaltools') ?>
+
+
    html('userlangattributes') ?>> + data['personal_urls'] as $key => $item) {?> + +
  • " class="active top-nav-element"> +   + + +  
  • + + +
+
+
+ +
+
+ +
+
+
+
+ + data['sitenotice']) { ?>
html('sitenotice') ?>
+

html('title') ?>

+
+

msg('tagline') ?>

+
html('subtitle') ?>
+ data['undelete']) { ?>
html('undelete') ?>
+ data['newtalk'] ) { ?>
html('newtalk') ?>
+ data['showjumplinks']) { ?> + + html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
+
+
+
+
+ + + +printTrail(); + echo Html::closeElement( 'body' ); + echo Html::closeElement( 'html' ); + wfRestoreWarnings(); + } +} // end of class -- cgit v1.2.1