Remove our old MediaWiki 1.17-based Vector skin and import the single file we need to change of the vanilla MediaWiki 1.24.2 Vector skin.

svn path=/trunk/; revision=895
This commit is contained in:
Colin Finck 2015-04-18 18:10:08 +00:00
parent 356eb01501
commit 6dc3d8d5fc
3 changed files with 110 additions and 1481 deletions

View File

@ -1,501 +0,0 @@
<?php
/**
* Vector - Modern version of MonoBook with fresh look and many usability
* improvements.
*
* 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 2 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @todo document
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) ) {
die( -1 );
}
/**
* SkinTemplate class for Vector skin
* @ingroup Skins
*/
class SkinVector extends SkinTemplate {
protected static $bodyClasses = array( 'vector-animateLayout' );
var $skinname = 'vector', $stylename = 'vector',
$template = 'VectorTemplate', $useHeadElement = true;
/**
* Initializes output page and sets up skin-specific parameters
* @param $out OutputPage object to initialize
*/
public function initPage( OutputPage $out ) {
global $wgLocalStylePath;
parent::initPage( $out );
// Append CSS which includes IE only behavior fixes for hover support -
// this is better than including this in a CSS fille since it doesn't
// wait for the CSS file to load before fetching the HTC file.
$min = $this->getRequest()->getFuzzyBool( 'debug' ) ? '' : '.min';
$out->addHeadItem( 'csshover',
'<!--[if lt IE 7]><style type="text/css">body{behavior:url("' .
htmlspecialchars( $wgLocalStylePath ) .
"/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
);
$out->addModuleScripts( 'skins.vector' );
}
/**
* Load skin and user CSS files in the correct order
* fixes bug 22916
* @param $out OutputPage object
*/
function setupSkinUserCss( OutputPage $out ){
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.vector' );
}
/**
* Adds classes to the body element.
*
* @param $out OutputPage object
* @param &$bodyAttrs Array of attributes that will be set on the body element
*/
function addToBodyAttributes( $out, &$bodyAttrs ) {
if ( isset( $bodyAttrs['class'] ) && strlen( $bodyAttrs['class'] ) > 0 ) {
$bodyAttrs['class'] .= ' ' . implode( ' ', static::$bodyClasses );
} else {
$bodyAttrs['class'] = implode( ' ', static::$bodyClasses );
}
}
}
/**
* QuickTemplate class for Vector skin
* @ingroup Skins
*/
class VectorTemplate extends BaseTemplate {
/* Functions */
/**
* Outputs the entire contents of the (X)HTML page
*/
public function execute() {
global $wgVectorUseIconWatch;
// Build additional attributes for navigation urls
$nav = $this->data['content_navigation'];
if ( $wgVectorUseIconWatch ) {
$mode = $this->getSkin()->getUser()->isWatched( $this->getSkin()->getRelevantTitle() ) ? 'unwatch' : 'watch';
if ( isset( $nav['actions'][$mode] ) ) {
$nav['views'][$mode] = $nav['actions'][$mode];
$nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' );
$nav['views'][$mode]['primary'] = true;
unset( $nav['actions'][$mode] );
}
}
$xmlID = '';
foreach ( $nav as $section => $links ) {
foreach ( $links as $key => $link ) {
if ( $section == 'views' && !( isset( $link['primary'] ) && $link['primary'] ) ) {
$link['class'] = rtrim( 'collapsible ' . $link['class'], ' ' );
}
$xmlID = isset( $link['id'] ) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] =
' id="' . Sanitizer::escapeId( $xmlID ) . '"';
if ( $link['class'] ) {
$nav[$section][$key]['attributes'] .=
' class="' . htmlspecialchars( $link['class'] ) . '"';
unset( $nav[$section][$key]['class'] );
}
if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) {
$nav[$section][$key]['key'] =
Linker::tooltip( $xmlID );
} else {
$nav[$section][$key]['key'] =
Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) );
}
}
}
$this->data['namespace_urls'] = $nav['namespaces'];
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
// Reverse horizontally rendered navigation elements
if ( $this->data['rtl'] ) {
$this->data['view_urls'] =
array_reverse( $this->data['view_urls'] );
$this->data['namespace_urls'] =
array_reverse( $this->data['namespace_urls'] );
$this->data['personal_urls'] =
array_reverse( $this->data['personal_urls'] );
}
// Output HTML Page
$this->html( 'headelement' );
?>
<!-- reactos-header -->
<div id="header">
<a href="/">
<img id="logo" src="https://www.reactos.org/sites/all/themes/zen_reactos/images/reactos-logo.png" alt="Home" />
</a>
<!-- KICKSTARTER -->
<div id="kickstarter"><br /><a href="http://community.reactos.org/"><img src="https://reactos.org/sites/default/files/evolution.png" /></a></div>
<!-- /KICKSTARTER -->
<div id="topMenu">
<div id="main-menu">
<a href="/forum">Forum</a> | <a href="/wiki">Wiki</a> | <a href="http://jira.reactos.org">Bugtracker</a> | <a href="/node/127">Contact</a>
</div>
</div>
<!-- /#topMenu -->
</div>
<!-- /reactos-header -->
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<!-- content -->
<div id="content" class="mw-body">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
<?php if ( $this->data['sitenotice'] ): ?>
<!-- sitenotice -->
<div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
<!-- /sitenotice -->
<?php endif; ?>
<!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<!-- /firstHeading -->
<!-- bodyContent -->
<div id="bodyContent">
<?php if ( $this->data['isarticle'] ): ?>
<!-- tagline -->
<div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
<!-- /tagline -->
<?php endif; ?>
<!-- subtitle -->
<div id="contentSub"<?php $this->html( 'userlangattributes' ) ?>><?php $this->html( 'subtitle' ) ?></div>
<!-- /subtitle -->
<?php if ( $this->data['undelete'] ): ?>
<!-- undelete -->
<div id="contentSub2"><?php $this->html( 'undelete' ) ?></div>
<!-- /undelete -->
<?php endif; ?>
<?php if( $this->data['newtalk'] ): ?>
<!-- newtalk -->
<div class="usermessage"><?php $this->html( 'newtalk' ) ?></div>
<!-- /newtalk -->
<?php endif; ?>
<?php if ( $this->data['showjumplinks'] ): ?>
<!-- jumpto -->
<div id="jump-to-nav" class="mw-jump">
<?php $this->msg( 'jumpto' ) ?>
<a href="#mw-head"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
<a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
</div>
<!-- /jumpto -->
<?php endif; ?>
<!-- bodycontent -->
<?php $this->html( 'bodycontent' ) ?>
<!-- /bodycontent -->
<?php if ( $this->data['printfooter'] ): ?>
<!-- printfooter -->
<div class="printfooter">
<?php $this->html( 'printfooter' ); ?>
</div>
<!-- /printfooter -->
<?php endif; ?>
<?php if ( $this->data['catlinks'] ): ?>
<!-- catlinks -->
<?php $this->html( 'catlinks' ); ?>
<!-- /catlinks -->
<?php endif; ?>
<?php if ( $this->data['dataAfterContent'] ): ?>
<!-- dataAfterContent -->
<?php $this->html( 'dataAfterContent' ); ?>
<!-- /dataAfterContent -->
<?php endif; ?>
<div class="visualClear"></div>
<!-- debughtml -->
<?php $this->html( 'debughtml' ); ?>
<!-- /debughtml -->
</div>
<!-- /bodyContent -->
</div>
<!-- /content -->
<!-- header -->
<div id="mw-head" class="noprint">
<?php $this->renderNavigation( 'PERSONAL' ); ?>
<div id="left-navigation">
<?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
</div>
<div id="right-navigation">
<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
</div>
</div>
<!-- /header -->
<!-- panel -->
<div id="mw-panel" class="noprint">
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
</div>
<!-- /panel -->
<!-- footer -->
<div id="footer"<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach( $this->getFooterLinks() as $category => $links ): ?>
<ul id="footer-<?php echo $category ?>">
<?php foreach( $links as $link ): ?>
<li id="footer-<?php echo $category ?>-<?php echo $link ?>"><?php $this->html( $link ) ?></li>
<?php endforeach; ?>
</ul>
<?php endforeach; ?>
<?php $footericons = $this->getFooterIcons("icononly");
if ( count( $footericons ) > 0 ): ?>
<ul id="footer-icons" class="noprint">
<?php foreach ( $footericons as $blockName => $footerIcons ): ?>
<li id="footer-<?php echo htmlspecialchars( $blockName ); ?>ico">
<?php foreach ( $footerIcons as $icon ): ?>
<?php echo $this->getSkin()->makeFooterIcon( $icon ); ?>
<?php endforeach; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<div style="clear:both"></div>
</div>
<!-- /footer -->
<?php $this->printTrail(); ?>
</body>
</html>
<?php
}
/**
* Render a series of portals
*
* @param $portals array
*/
protected function renderPortals( $portals ) {
// Force the rendering of the following portals
if ( !isset( $portals['SEARCH'] ) ) {
$portals['SEARCH'] = true;
}
if ( !isset( $portals['TOOLBOX'] ) ) {
$portals['TOOLBOX'] = true;
}
if ( !isset( $portals['LANGUAGES'] ) ) {
$portals['LANGUAGES'] = true;
}
// Render portals
foreach ( $portals as $name => $content ) {
if ( $content === false )
continue;
echo "\n<!-- {$name} -->\n";
switch( $name ) {
case 'SEARCH':
break;
case 'TOOLBOX':
$this->renderPortal( 'tb', $this->getToolbox(), 'toolbox', 'SkinTemplateToolboxEnd' );
break;
case 'LANGUAGES':
if ( $this->data['language_urls'] ) {
$this->renderPortal( 'lang', $this->data['language_urls'], 'otherlanguages' );
}
break;
default:
$this->renderPortal( $name, $content );
break;
}
echo "\n<!-- /{$name} -->\n";
}
}
/**
* @param $name string
* @param $content array
* @param $msg null|string
* @param $hook null|string|array
*/
protected function renderPortal( $name, $content, $msg = null, $hook = null ) {
if ( $msg === null ) {
$msg = $name;
}
?>
<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
<h5<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h5>
<div class="body">
<?php
if ( is_array( $content ) ): ?>
<ul>
<?php
foreach( $content as $key => $val ): ?>
<?php echo $this->makeListItem( $key, $val ); ?>
<?php
endforeach;
if ( $hook !== null ) {
wfRunHooks( $hook, array( &$this, true ) );
}
?>
</ul>
<?php
else: ?>
<?php echo $content; /* Allow raw HTML block to be defined by extensions */ ?>
<?php
endif; ?>
</div>
</div>
<?php
}
/**
* Render one or more navigations elements by name, automatically reveresed
* when UI is in RTL mode
*
* @param $elements array
*/
protected function renderNavigation( $elements ) {
global $wgVectorUseSimpleSearch;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
if ( !is_array( $elements ) ) {
$elements = array( $elements );
// If there's a series of elements, reverse them when in RTL mode
} elseif ( $this->data['rtl'] ) {
$elements = array_reverse( $elements );
}
// Render elements
foreach ( $elements as $name => $element ) {
echo "\n<!-- {$name} -->\n";
switch ( $element ) {
case 'NAMESPACES':
?>
<div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg( 'namespaces' ) ?></h5>
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach ( $this->data['namespace_urls'] as $link ): ?>
<li <?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></span></li>
<?php endforeach; ?>
</ul>
</div>
<?php
break;
case 'VARIANTS':
?>
<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h4>
<?php foreach ( $this->data['variant_urls'] as $link ): ?>
<?php if ( stripos( $link['attributes'], 'selected' ) !== false ): ?>
<?php echo htmlspecialchars( $link['text'] ) ?>
<?php endif; ?>
<?php endforeach; ?>
</h4>
<h5><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h5>
<div class="menu">
<ul>
<?php foreach ( $this->data['variant_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" lang="<?php echo htmlspecialchars( $link['lang'] ) ?>" hreflang="<?php echo htmlspecialchars( $link['hreflang'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php
break;
case 'VIEWS':
?>
<div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
<h5><?php $this->msg('views') ?></h5>
<ul<?php $this->html('userlangattributes') ?>>
<?php foreach ( $this->data['view_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><span><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php
// $link['text'] can be undefined - bug 27764
if ( array_key_exists( 'text', $link ) ) {
echo array_key_exists( 'img', $link ) ? '<img src="' . $link['img'] . '" alt="' . $link['text'] . '" />' : htmlspecialchars( $link['text'] );
}
?></a></span></li>
<?php endforeach; ?>
</ul>
</div>
<?php
break;
case 'ACTIONS':
?>
<div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h5>
<div class="menu">
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach ( $this->data['action_urls'] as $link ): ?>
<li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php
break;
case 'PERSONAL':
?>
<div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
<h5><?php $this->msg( 'personaltools' ) ?></h5>
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach( $this->getPersonalTools() as $key => $item ) { ?>
<?php echo $this->makeListItem( $key, $item ); ?>
<?php } ?>
</ul>
</div>
<?php
break;
case 'SEARCH':
?>
<div id="p-search">
<h5<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?>
<div id="simpleSearch">
<?php if ( $this->data['rtl'] ): ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?>
<?php endif; ?>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?>
<?php if ( !$this->data['rtl'] ): ?>
<?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?>
<?php endif; ?>
<?php else: ?>
<div>
<?php echo $this->makeSearchInput( array( 'id' => 'searchInput' ) ); ?>
<?php echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) ); ?>
<?php echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) ); ?>
<?php endif; ?>
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
</div>
</form>
</div>
<?php
break;
}
echo "\n<!-- /{$name} -->\n";
}
}
}

View File

@ -0,0 +1,110 @@
<?php
/**
* Vector - Modern version of MonoBook with fresh look and many usability
* improvements.
*
* 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 2 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Skins
*/
$GLOBALS['wgExtensionCredits']['skin'][] = array(
'path' => __FILE__,
'name' => 'Vector',
'namemsg' => 'skinname-vector',
'descriptionmsg' => 'vector-skin-desc',
'url' => 'https://www.mediawiki.org/wiki/Skin:Vector',
'author' => array( 'Trevor Parscal', 'Roan Kattouw', '...' ),
'license-name' => 'GPLv2+',
);
// Register files
$GLOBALS['wgAutoloadClasses']['SkinVector'] = __DIR__ . '/SkinVector.php';
$GLOBALS['wgAutoloadClasses']['VectorTemplate'] = __DIR__ . '/VectorTemplate.php';
$GLOBALS['wgMessagesDirs']['Vector'] = __DIR__ . '/i18n';
// Register skin
$GLOBALS['wgValidSkinNames']['vector'] = 'Vector';
// Register config
$GLOBALS['wgConfigRegistry']['vector'] = 'GlobalVarConfig::newInstance';
// Configuration options
/**
* Search form look.
* - true = use an icon search button
* - false = use Go & Search buttons
*/
$GLOBALS['wgVectorUseSimpleSearch'] = true;
/**
* Watch and unwatch as an icon rather than a link.
* - true = use an icon watch/unwatch button
* - false = use watch/unwatch text link
*/
$GLOBALS['wgVectorUseIconWatch'] = true;
// Register modules
$GLOBALS['wgResourceModules']['skins.vector.styles'] = array(
'styles' => array(
'screen.less' => array( 'media' => 'screen' ),
'screen-hd.less' => array( 'media' => 'screen and (min-width: 982px)' ),
),
'remoteSkinPath' => 'Vector',
'localBasePath' => __DIR__,
);
$GLOBALS['wgResourceModules']['skins.vector.js'] = array(
'scripts' => array(
'collapsibleTabs.js',
'vector.js',
),
'position' => 'top',
'dependencies' => array(
'jquery.throttle-debounce',
'jquery.tabIndex',
),
'remoteSkinPath' => 'Vector',
'localBasePath' => __DIR__,
);
// Apply module customizations
$GLOBALS['wgResourceModuleSkinStyles']['vector'] = array(
'jquery.tipsy' => 'skinStyles/jquery.tipsy.less',
'jquery.ui.core' => array(
'skinStyles/jquery.ui/jquery.ui.core.css',
'skinStyles/jquery.ui/jquery.ui.theme.css',
),
'jquery.ui.accordion' => 'skinStyles/jquery.ui/jquery.ui.accordion.css',
'jquery.ui.autocomplete' => 'skinStyles/jquery.ui/jquery.ui.autocomplete.css',
'jquery.ui.button' => 'skinStyles/jquery.ui/jquery.ui.button.css',
'jquery.ui.datepicker' => 'skinStyles/jquery.ui/jquery.ui.datepicker.css',
'jquery.ui.dialog' => 'skinStyles/jquery.ui/jquery.ui.dialog.css',
'jquery.ui.menu' => 'skinStyles/jquery.ui/jquery.ui.menu.css',
'jquery.ui.progressbar' => 'skinStyles/jquery.ui/jquery.ui.progressbar.css',
'jquery.ui.resizable' => 'skinStyles/jquery.ui/jquery.ui.resizable.css',
'jquery.ui.selectable' => 'skinStyles/jquery.ui/jquery.ui.selectable.css',
'jquery.ui.slider' => 'skinStyles/jquery.ui/jquery.ui.slider.css',
'jquery.ui.spinner' => 'skinStyles/jquery.ui/jquery.ui.spinner.css',
'jquery.ui.tabs' => 'skinStyles/jquery.ui/jquery.ui.tabs.css',
'jquery.ui.tooltips' => 'skinStyles/jquery.ui/jquery.ui.tooltips.css',
'mediawiki.notification' => 'skinStyles/mediawiki.notification.less',
'mediawiki.special' => 'skinStyles/mediawiki.special.less',
'mediawiki.special.preferences' => 'skinStyles/mediawiki.special.preferences.less',
'remoteSkinPath' => 'Vector',
'localBasePath' => __DIR__,
);

View File

@ -1,980 +0,0 @@
/*
* Any rules which should not be flipped automatically in right-to-left situations should be
* prepended with @noflip in a comment block. Images that should be embedded as base64 data-URLs
* should be prepended with @embed in a comment block.
*
* This style-sheet employs a few CSS trick to accomplish compatibility with a wide range of web
* browsers. The most common trick is to use some styles in IE6 only. This is accomplished by using
* a rule that makes things work in IE6, and then following it with a rule that begins with
* "html > body" or use a child selector ">", which is ignored by IE6 because it does not support
* the child selector. You can spot this by looking for the "OVERRIDDEN BY COMPLIANT BROWSERS" and
* "IGNORED BY IE6" comments.
*/
/* Framework */
html,
body {
height: 100%;
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 1em;
background-color: #ffffff;
}
/* Content */
div#content {
margin-left: 10em;
padding: 1em;
/* @embed */
background-image: url(images/border.png);
background-position: top left;
background-repeat: repeat-y;
background-color: white;
color: black;
direction: ltr;
}
/* Head */
#mw-page-base {
height: 40px;
background-color: white;
/* @embed */
background-image: url(images/page-fade.png);
background-position: bottom left;
background-repeat: repeat-x;
margin-left: 11em;
margin-top: 120px;
}
#mw-head-base {
margin-top: -80px;
margin-left: 10em;
height: 5em;
/* @embed */
background-image: url(images/border.png);
background-position: bottom left;
background-repeat: repeat-x;
margin-left: 11em;
}
div#mw-head {
position: absolute;
top: 80px;
right: 0;
width: 100%;
height: 0;
overflow: visible;
}
div#mw-head h5 {
margin: 0;
padding: 0;
}
/* Hide empty portlets */
div.emptyPortlet {
display: none;
}
/* Personal */
#p-personal {
position: absolute;
top: 17px;
right: 0.75em;
}
#p-personal h5 {
display: none;
}
#p-personal ul {
list-style: none;
margin: 0;
padding-left: 10em; /* Keep from overlapping logo */
}
/* @noflip */
#p-personal li {
line-height: 1.125em;
float: left;
}
/* This one flips! */
#p-personal li {
margin-left: 0.75em;
margin-top: 0.5em;
font-size: 0.75em;
white-space: nowrap;
}
/* Navigation Containers */
#left-navigation {
position: absolute;
left: 10em;
top: 2.5em;
}
#right-navigation {
float: right;
margin-top: 2.5em;
}
/* Navigation Labels */
div.vectorTabs h5,
div.vectorMenu h5 span {
display: none;
}
/* Namespaces and Views */
/* @noflip */
div.vectorTabs {
float: left;
height: 2.5em;
}
div.vectorTabs {
/* @embed */
background-image: url(images/tab-break.png);
background-position: bottom left;
background-repeat: no-repeat;
padding-left: 1px;
}
/* @noflip */
div.vectorTabs ul {
float: left;
}
div.vectorTabs ul {
height: 100%;
list-style: none;
margin: 0;
padding: 0;
}
/* @noflip */
div.vectorTabs ul li {
float: left;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorTabs ul li {
line-height: 1.125em;
display: inline-block;
height: 100%;
margin: 0;
padding: 0;
background-color: #f3f3f3;
/* @embed */
background-image: url(images/tab-normal-fade.png);
background-position: bottom left;
background-repeat: repeat-x;
white-space: nowrap;
}
/* IGNORED BY IE6 */
div.vectorTabs ul > li {
display: block;
}
div.vectorTabs li.selected {
/* @embed */
background-image: url(images/tab-current-fade.png);
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorTabs li a {
display: inline-block;
height: 1.9em;
padding-left: 0.5em;
padding-right: 0.5em;
color: #0645ad;
cursor: pointer;
font-size: 0.8em;
}
/* IGNORED BY IE6 */
div.vectorTabs li > a {
display: block;
}
div.vectorTabs li.icon a {
background-position: bottom right;
background-repeat: no-repeat;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorTabs span a {
display: inline-block;
padding-top: 1.25em;
}
/* IGNORED BY IE6 */
/* @noflip */
div.vectorTabs span > a {
float: left;
display: block;
}
div.vectorTabs span {
display: inline-block;
/* @embed */
background-image: url(images/tab-break.png);
background-position: bottom right;
background-repeat: no-repeat;
}
div.vectorTabs li.selected a,
div.vectorTabs li.selected a:visited{
color: #333;
text-decoration: none;
}
div.vectorTabs li.new a,
div.vectorTabs li.new a:visited{
color: #a55858;
}
/* Variants and Actions */
/* @noflip */
div.vectorMenu {
direction: ltr;
float: left;
/* @embed */
background-image: url(images/arrow-down-icon.png);
background-position: 100% 60%;
background-repeat: no-repeat;
cursor: pointer;
}
div.vectorMenuFocus {
/* @embed */
background-image: url(images/arrow-down-focus-icon.png);
background-position: 100% 60%;
}
/* @noflip */
body.rtl div.vectorMenu {
direction: rtl;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
/* @noflip */
div#mw-head div.vectorMenu h5 {
float: left;
/* @embed */
background-image: url(images/tab-break.png);
background-repeat: no-repeat;
}
/* This will be flipped - unlike the one above it */
div#mw-head div.vectorMenu h5 {
background-position: bottom left;
margin-left: -1px;
}
/* IGNORED BY IE6 */
div#mw-head div.vectorMenu > h5 {
background-image: none;
}
div#mw-head div.vectorMenu h4 {
display: inline-block;
float: left;
font-size: 0.8em;
padding-left: 0.5em;
padding-top: 1.375em;
font-weight: normal;
border: none;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
/* @noflip */
div.vectorMenu h5 a {
display: inline-block;
width: 24px;
height: 2.5em;
text-decoration: none;
/* @embed */
background-image: url(images/tab-break.png);
background-repeat: no-repeat;
}
/* This will be flipped - unlike the one above it */
div.vectorMenu h5 a {
background-position: bottom right;
}
/* IGNORED BY IE6 */
div.vectorMenu h5 > a {
display: block;
}
div.vectorMenu div.menu {
position: relative;
display: none;
clear: both;
text-align: left;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
/* @noflip */
body.rtl div.vectorMenu div.menu {
margin-left: 24px;
}
/* IGNORED BY IE6 */
/* @noflip */
body.rtl div.vectorMenu > div.menu {
margin-left: auto;
}
/* IGNORED BY IE6 */
/* Also fixes old versions of FireFox */
/* @noflip */
body.rtl div.vectorMenu > div.menu,
x:-moz-any-link {
margin-left: 23px;
}
/* Enable forcing showing of the menu for accessibility */
div.vectorMenu:hover div.menu,
div.vectorMenu div.menuForceShow {
display: block;
}
div.vectorMenu ul {
position: absolute;
background-color: white;
border: solid 1px silver;
border-top-width: 0;
list-style: none;
list-style-image: none;
list-style-type: none;
padding: 0;
margin: 0;
margin-left: -1px;
text-align: left;
}
/* Fixes old versions of FireFox */
div.vectorMenu ul,
x:-moz-any-link {
min-width: 5em;
}
/* Returns things back to normal in modern versions of FireFox */
div.vectorMenu ul,
x:-moz-any-link,
x:default {
min-width: 0;
}
div.vectorMenu li {
padding: 0;
margin: 0;
text-align: left;
line-height: 1em;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div.vectorMenu li a {
display: inline-block;
padding: 0.5em;
white-space: nowrap;
color: #0645ad;
cursor: pointer;
font-size: 0.8em;
}
/* IGNORED BY IE6 */
div.vectorMenu li > a {
display: block;
}
div.vectorMenu li.selected a,
div.vectorMenu li.selected a:visited {
color: #333;
text-decoration: none;
}
/* Search */
#p-search h5 {
display: none;
}
/* @noflip */
#p-search {
float: left;
}
#p-search {
margin-right: 0.5em;
margin-left: 0.5em;
}
#p-search form,
#p-search input {
margin: 0;
margin-top: 0.4em;
}
div#simpleSearch {
display: block;
width: 14em;
height: 1.4em;
margin-top: 0.65em;
position: relative;
min-height: 1px; /* Gotta trigger hasLayout for IE7 */
border: solid 1px #aaa;
color: black;
background-color: white;
/* @embed */
background-image: url(images/search-fade.png);
background-position: top left;
background-repeat: repeat-x;
}
div#simpleSearch label {
/*
* DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent
* this from ever being shown anyways.
*/
font-size: 13px;
top: 0.25em;
direction: ltr;
}
div#simpleSearch input {
color: black;
direction: ltr;
}
div#simpleSearch input:focus {
outline: none;
}
div#simpleSearch input.placeholder {
color: #999;
}
div#simpleSearch input::-webkit-input-placeholder {
color: #999;
}
div#simpleSearch input#searchInput {
position: absolute;
top: 0;
left: 0;
width: 90%;
margin: 0;
padding: 0;
padding-left: 0.2em;
padding-top: 0.2em;
padding-bottom: 0.2em;
outline: none;
border: none;
/*
* DON'T PANIC! Browsers that won't scale this properly are the same browsers that have JS issues that prevent
* this from ever being shown anyways.
*/
font-size: 13px;
background-color: transparent;
direction: ltr;
}
div#simpleSearch button#searchButton {
position: absolute;
width: 10%;
right: 0;
top: 0;
padding: 0;
padding-top: 0.3em;
padding-bottom: 0.2em;
padding-right: 0.4em;
margin: 0;
border: none;
cursor: pointer;
background-color: transparent;
background-image: none;
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
div#simpleSearch button#searchButton img {
border: none;
margin: 0;
margin-top: -3px;
padding: 0;
}
/* IGNORED BY IE6 */
div#simpleSearch button#searchButton > img {
margin: 0;
}
/* Panel */
div#mw-panel {
position: absolute;
top: 137px;
padding-top: 1em;
width: 10em;
left: 0;
}
div#mw-panel div.portal {
padding-bottom: 1.5em;
direction: ltr;
}
div#mw-panel div.portal h5 {
font-weight: normal;
color: #444;
padding: 0.25em;
padding-top: 0;
padding-left: 1.75em;
cursor: default;
border: none;
font-size: 0.75em;
}
div#mw-panel div.portal div.body {
margin: 0;
padding-top: 0.5em;
margin-left: 1.25em;
/* @embed */
background-image: url(images/portal-break.png);
background-repeat: no-repeat;
background-position: top left;
}
div#mw-panel div.portal div.body ul {
list-style: none;
list-style-image: none;
list-style-type: none;
padding: 0;
margin: 0;
}
div#mw-panel div.portal div.body ul li {
line-height: 1.125em;
padding: 0;
padding-bottom: 0.5em;
margin: 0;
font-size: 0.75em;
word-wrap: break-word;
}
div#mw-panel div.portal div.body ul li a {
color: #0645ad;
}
div#mw-panel div.portal div.body ul li a:visited {
color: #0b0080;
}
/* Footer */
div#footer {
margin-left: 10em;
margin-top: 0;
padding: 0.75em;
/* @embed */
background-image: url(images/border.png);
background-position: top left;
background-repeat: repeat-x;
direction: ltr;
}
div#footer ul {
list-style: none;
list-style-image: none;
list-style-type: none;
margin: 0;
padding: 0;
}
div#footer ul li {
margin: 0;
padding: 0;
padding-top: 0.5em;
padding-bottom: 0.5em;
color: #333;
font-size: 0.7em;
}
div#footer #footer-icons {
float: right;
}
/* @noflip */
body.ltr div#footer #footer-places {
float: left;
}
div#footer #footer-info li {
line-height: 1.4em;
}
div#footer #footer-icons li {
float: left;
margin-left: 0.5em;
line-height: 2em;
text-align: right;
}
div#footer #footer-places li {
float: left;
margin-right: 1em;
line-height: 2em;
}
/* Logo */
#p-logo {
position: absolute;
top: -160px;
left: 0;
width: 10em;
height: 160px;
}
#p-logo a {
display: block;
width: 10em;
height: 160px;
background-repeat: no-repeat;
background-position: center center;
text-decoration: none;
}
/*
*
* The following code is highly modified from monobook. It would be nice if the
* preftoc id was more human readable like preferences-toc for instance,
* howerver this would require backporting the other skins.
*/
/* Preferences */
#preftoc {
/* Tabs */
width: 100%;
float: left;
clear: both;
margin: 0 !important;
padding: 0 !important;
/* @embed */
background-image: url(images/preferences-break.png);
background-position: bottom left;
background-repeat: no-repeat;
}
#preftoc li {
/* Tab */
float: left;
margin: 0;
padding: 0;
padding-right: 1px;
height: 2.25em;
white-space: nowrap;
list-style-type: none;
list-style-image: none;
/* @embed */
background-image: url(images/preferences-break.png);
background-position: bottom right;
background-repeat: no-repeat;
}
/* Sadly, IE6 won't understand this */
#preftoc li:first-child {
margin-left: 1px;
}
#preftoc a,
#preftoc a:active {
display: inline-block;
position: relative;
color: #0645ad;
padding: 0.5em;
text-decoration: none;
background-image: none;
font-size: 0.9em;
}
#preftoc a:hover,
#preftoc a:focus {
text-decoration: underline;
}
#preftoc li.selected a {
/* @embed */
background-image: url(images/preferences-fade.png);
background-position: bottom;
background-repeat: repeat-x;
color: #333;
text-decoration: none;
}
#preferences {
float: left;
width: 100%;
margin: 0;
margin-top: -2px;
clear: both;
border: solid 1px #ccc;
background-color: #f9f9f9;
/* @embed */
background-image: url(images/preferences-base.png);
}
#preferences fieldset {
border: none;
border-top: solid 1px #ccc;
}
#preferences fieldset.prefsection {
border: none;
padding: 0;
margin: 1em;
}
#preferences legend {
color: #666;
}
#preferences fieldset.prefsection legend.mainLegend {
display: none;
}
#preferences td {
padding-left: 0.5em;
padding-right: 0.5em;
}
.htmlform-tip {
font-size: x-small;
padding: .2em 2em;
color: #666;
}
#preferences div.mw-prefs-buttons {
padding: 1em;
}
#preferences div.mw-prefs-buttons input {
margin-right: 0.25em;
}
/**
* The following code is slightly modified from monobook
*/
div#content {
line-height: 1.5em;
}
#bodyContent {
font-size: 0.8em;
}
.editsection {
float: right;
}
ul {
/* @embed */
list-style-image: url(images/bullet-icon.png);
}
pre, .mw-code {
line-height: 1.3em;
}
/* Site Notice (includes notices from CentralNotice extension) */
#siteNotice {
font-size: 0.8em;
}
#firstHeading {
padding-top: 0;
margin-top: 0;
padding-top: 0;
font-size: 1.6em;
}
div#content a.external,
div#content a.external[href ^="gopher://"] {
/* @embed */
background: url(images/external-link-ltr-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href ^="https://"],
.link-https {
/* @embed */
background: url(images/lock-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href ^="mailto:"],
.link-mailto {
/* @embed */
background: url(images/mail-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href ^="news:"] {
/* @embed */
background: url(images/news-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href ^="ftp://"],
.link-ftp {
/* @embed */
background: url(images/file-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href ^="irc://"],
div#content a.external[href ^="ircs://"],
.link-irc {
/* @embed */
background: url(images/talk-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href $=".ogg"], div#content a.external[href $=".OGG"],
div#content a.external[href $=".mid"], div#content a.external[href $=".MID"],
div#content a.external[href $=".midi"], div#content a.external[href $=".MIDI"],
div#content a.external[href $=".mp3"], div#content a.external[href $=".MP3"],
div#content a.external[href $=".wav"], div#content a.external[href $=".WAV"],
div#content a.external[href $=".wma"], div#content a.external[href $=".WMA"],
.link-audio {
/* @embed */
background: url(images/audio-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href $=".ogm"], div#content a.external[href $=".OGM"],
div#content a.external[href $=".avi"], div#content a.external[href $=".AVI"],
div#content a.external[href $=".mpeg"], div#content a.external[href $=".MPEG"],
div#content a.external[href $=".mpg"], div#content a.external[href $=".MPG"],
.link-video {
/* @embed */
background: url(images/video-icon.png) center right no-repeat;
padding-right: 13px;
}
div#content a.external[href $=".pdf"], div#content a.external[href $=".PDF"],
div#content a.external[href *=".pdf#"], div#content a.external[href *=".PDF#"],
div#content a.external[href *=".pdf?"], div#content a.external[href *=".PDF?"],
.link-document {
/* @embed */
background: url(images/document-icon.png) center right no-repeat;
padding-right: 13px;
}
/* Icon for Usernames */
#pt-userpage,
#pt-anonuserpage,
#pt-login {
/* @embed */
background: url(images/user-icon.png) left top no-repeat;
padding-left: 15px !important;
text-transform: none;
}
.redirectText {
font-size: 140%;
}
.redirectMsg img {
vertical-align: text-bottom;
}
#bodyContent {
position: relative;
width: 100%;
}
div#bodyContent {
line-height: 1.5em;
}
/* mediawiki.notification */
.skin-vector #mw-notification-area {
top: 7em;
font-size: 0.8em;
}
.skin-vector .mw-notification {
background-color: #fff;
background-color: rgba(255, 255, 255, 0.93);
padding: 0.75em 1.5em;
border: solid 1px #a7d7f9;
border-radius: 0.75em;
-webkit-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
-moz-box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.125);
}
/* Watch/Unwatch Icon Styling */
#ca-unwatch.icon a,
#ca-watch.icon a {
margin: 0;
padding: 0;
outline: none;
display: block;
width: 26px;
/* This hides the text but shows the background image */
padding-top: 3.1em;
margin-top: 0;
/* Only applied in IE6 */
margin-top: -0.8em !ie;
height: 0;
overflow: hidden;
/* @embed */
background-image: url(images/watch-icons.png);
}
#ca-unwatch.icon a {
background-position: -43px 60%;
}
#ca-watch.icon a {
background-position: 5px 60%;
}
#ca-unwatch.icon a:hover,
#ca-unwatch.icon a:focus {
background-position: -67px 60%;
}
#ca-watch.icon a:hover,
#ca-watch.icon a:focus {
background-position: -19px 60%;
}
#ca-unwatch.icon a.loading,
#ca-watch.icon a.loading {
/* @embed */
background-image: url(images/watch-icon-loading.gif);
background-position: 5px 60%;
}
#ca-unwatch.icon a span,
#ca-watch.icon a span {
display: none;
}
div.vectorTabs ul {
/* @embed */
background-image: url(images/tab-break.png);
background-position: right bottom;
background-repeat: no-repeat;
}
/* Tooltips are outside of the normal body code, so this helps make the size of the text sensible */
.tipsy {
font-size: 0.8em;
}
/* Animate between standard and high definition layouts */
body.vector-animateLayout div#content,
body.vector-animateLayout div#footer {
-moz-transition: margin-left 250ms, padding 250ms;
-webkit-transition: margin-left 250ms, padding 250ms;
-o-transition: margin-left 250ms, padding 250ms;
transition: margin-left 250ms, padding 250ms;
}
body.vector-animateLayout #p-logo,
body.vector-animateLayout #left-navigation {
-moz-transition: left 250ms;
-webkit-transition: left 250ms;
-o-transition: left 250ms;
transition: left 250ms;
}
body.vector-animateLayout #mw-panel {
-moz-transition: padding-left 250ms;
-webkit-transition: padding-left 250ms;
-o-transition: padding-left 250ms;
transition: padding-left 250ms;
}
body.vector-animateLayout #p-search {
-moz-transition: margin-right 250ms;
-webkit-transition: margin-right 250ms;
-o-transition: margin-right 250ms;
transition: margin-right 250ms;
}
body.vector-animateLayout #p-personal {
-moz-transition: right 250ms;
-webkit-transition: right 250ms;
-o-transition: right 250ms;
transition: right 250ms;
}
body.vector-animateLayout #mw-head-base {
-moz-transition: margin-left 250ms;
-webkit-transition: margin-left 250ms;
-o-transition: margin-left 250ms;
transition: margin-left 250ms;
}
/* Copied from reactos-style.css */
#header {
background-image: url('../sites/all/themes/zen_reactos/images/topgradient.png');
background-repeat: repeat-x;
height: 80px;
width: 100%;
z-index: 100;
position: fixed;
font-family: Arial, sans-serif !important;
top: 0;
}
#logo {
float: left;
height: 100px;
margin: 3px 0 0 43px;
padding: 0;
width: auto;
}
#kickstarter {
width: 400px;
height: 45px;
padding: 7px;
position: absolute;
margin-left: 320px;
font-family: Arial, sans-serif;
font-size: 17px;
}
#kickstarter a {
font-size: 22px;
font-weight: bold;
text-decoration: none;
}
#kickstarter img {
margin-top: -20px;
margin-left: -25px;
}
#topMenu {
margin: 0;
padding: 70px 0 0 0;
}
#main-menu {
color: #fff;
font-size: 14px;
padding: 3px 0 3px 300px;
box-shadow: 0 5px 5px #ddd;
background-color: #5984c3;
background-image: -moz-linear-gradient(top, #6C95D2, #5984C3);
background-image: -webkit-linear-gradient(top, #6C95D2, #5984C3);
background-image: -ms-linear-gradient(top, #6C95D2, #5984C3);
background-image: linear-gradient(top, #6C95D2, #5984C3);
line-height: 16px;
height: 16px;
min-width: 800px;
}
#main-menu a {
color: #fff;
font-size: 14px;
padding: 1px 12px;
text-decoration: none;
text-shadow: 1px 1px 1px rgba(0,0,0,.3);
margin: 0;
border-radius: 2px;
}
#main-menu a:hover {
background-color: #fc3;
color: #333;
text-shadow: none;
}