X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=skins%2FCologneBlue.php;h=808ed374657bd6e0e7c1bf2afd54aa5689284241;hb=476731f179a023bfc457d0390b5a77bfb2cf82ff;hp=c7df144f838fe6556334bb75f96dcd2252a18366;hpb=59ed4015b163fff94280ef043bc2856a0ff61287;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php index c7df144f83..808ed37465 100644 --- a/skins/CologneBlue.php +++ b/skins/CologneBlue.php @@ -15,37 +15,69 @@ if( !defined( 'MEDIAWIKI' ) ) { * @todo document * @ingroup Skins */ -class SkinCologneBlue extends Skin { +class SkinCologneBlue extends SkinLegacy { + var $skinname = 'cologneblue', $stylename = 'cologneblue', + $template = 'CologneBlueTemplate'; - function getStylesheet() { - return 'common/cologneblue.css'; - } + /** + * @param $out OutputPage + */ + function setupSkinUserCss( OutputPage $out ){ + parent::setupSkinUserCss( $out ); + $out->addModuleStyles( 'skins.cologneblue' ); + + $qb = $this->qbSetting(); + $rules = array(); - function getSkinName() { - return 'cologneblue'; + if ( 2 == $qb ) { # Right + $rules[] = "#quickbar { position: absolute; right: 4px; }"; + $rules[] = "#article { margin-left: 4px; margin-right: 148px; }"; + } elseif ( 1 == $qb ) { + $rules[] = "#quickbar { position: absolute; left: 4px; }"; + $rules[] = "#article { margin-left: 148px; margin-right: 4px; }"; + } elseif ( 3 == $qb ) { # Floating left + $rules[] = "#quickbar { position:absolute; left:4px }"; + $rules[] = "#topbar { margin-left: 148px }"; + $rules[] = "#article { margin-left:148px; margin-right: 4px; }"; + $rules[] = "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;}"; # Hides from IE + } elseif ( 4 == $qb ) { # Floating right + $rules[] = "#quickbar { position: fixed; right: 4px; }"; + $rules[] = "#topbar { margin-right: 148px }"; + $rules[] = "#article { margin-right: 148px; margin-left: 4px; }"; + $rules[] = "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;}"; # Hides from IE + } + $style = implode( "\n", $rules ); + $out->addInlineStyle( $style ); } +} + +class CologneBlueTemplate extends LegacyTemplate { + + /** + * @return string + */ function doBeforeContent() { $mainPageObj = Title::newMainPage(); $s = "\n
\n
" . ''; - $s .= '
'; + $s .= ''; $s .= ''; $s .= '' . wfMsg( 'sitetitle' ) . ''; - $s .= ''; + $s .= '
'; + $s .= '
'; $s .= ''; $s .= htmlspecialchars( wfMsg( 'sitesubtitle' ) ) . ''; - $s .= ''; + $s .= ''; $s .= ''; $s .= str_replace( '
', '', $this->otherLanguages() ); - $cat = $this->getCategoryLinks(); + $cat = ''; if( $cat ) { $s .= "
$cat\n"; } @@ -56,7 +88,7 @@ class SkinCologneBlue extends Skin { $s .= "\n\n
"; - $notice = wfGetSiteNotice(); + $notice = $this->getSkin()->getSiteNotice(); if( $notice ) { $s .= "\n
$notice
\n"; } @@ -65,6 +97,9 @@ class SkinCologneBlue extends Skin { return $s; } + /** + * @return string + */ function doAfterContent(){ global $wgLang; @@ -73,22 +108,22 @@ class SkinCologneBlue extends Skin { $s .= "\n