summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /skins
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'skins')
-rw-r--r--skins/ArchLinux.php36
-rw-r--r--skins/Chick.php2
-rw-r--r--skins/CologneBlue.php661
-rw-r--r--skins/Modern.php16
-rw-r--r--skins/MonoBook.php36
-rw-r--r--skins/Nostalgia.php2
-rw-r--r--skins/Standard.php18
-rw-r--r--skins/Vector.php90
-rw-r--r--skins/archlinux/main.css54
-rw-r--r--skins/cologneblue/screen.css171
-rw-r--r--skins/common/commonContent.css19
-rw-r--r--skins/common/commonElements.css7
-rw-r--r--skins/common/commonInterface.css10
-rw-r--r--skins/common/commonPrint.css4
-rw-r--r--skins/common/config.css1
-rw-r--r--skins/common/images/icons/fileicon-djvu.xcfbin83394 -> 0 bytes
-rw-r--r--skins/common/images/icons/fileicon-ogg.xcfbin40236 -> 0 bytes
-rw-r--r--skins/common/images/icons/fileicon-psd.pngbin0 -> 10376 bytes
-rw-r--r--skins/common/shared.css44
-rw-r--r--skins/common/wikibits.js3
-rw-r--r--skins/modern/main.css15
-rw-r--r--skins/monobook/main.css54
-rw-r--r--skins/simple/main.css6
-rw-r--r--skins/vector/images/border.pngbin69 -> 0 bytes
-rw-r--r--skins/vector/images/page-base.pngbin67 -> 0 bytes
-rw-r--r--skins/vector/images/preferences-base.pngbin67 -> 0 bytes
-rw-r--r--skins/vector/images/preferences-edge.pngbin67 -> 0 bytes
-rw-r--r--skins/vector/screen.css71
-rw-r--r--skins/vector/vector.js2
29 files changed, 806 insertions, 516 deletions
diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php
index a5ce1714..d7a79616 100644
--- a/skins/ArchLinux.php
+++ b/skins/ArchLinux.php
@@ -103,11 +103,14 @@ class ArchLinuxTemplate extends BaseTemplate {
</div><!-- #archnavbar -->
<div id="globalWrapper">
-<div id="column-content"><div id="content" class="mw-body-primary">
+<div id="column-content"><div id="content" class="mw-body-primary" role="main">
<a id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ <h1 id="firstHeading" class="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
<div id="bodyContent" class="mw-body">
<div id="siteSub"><?php $this->msg('tagline') ?></div>
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
@@ -127,9 +130,10 @@ class ArchLinuxTemplate extends BaseTemplate {
</div>
</div></div>
<div id="column-one"<?php $this->html('userlangattributes') ?>>
+ <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<?php $this->cactions(); ?>
- <div class="portlet" id="p-personal">
- <h5><?php $this->msg('personaltools') ?></h5>
+ <div class="portlet" id="p-personal" role="navigation">
+ <h3><?php $this->msg('personaltools') ?></h3>
<div class="pBody">
<ul<?php $this->html('userlangattributes') ?>>
<?php foreach($this->getPersonalTools() as $key => $item) { ?>
@@ -139,7 +143,7 @@ class ArchLinuxTemplate extends BaseTemplate {
</ul>
</div>
</div>
- <div class="portlet" id="p-logo">
+ <div class="portlet" id="p-logo" role="banner">
<?php
echo Html::element( 'a', array(
'href' => $this->data['nav_urls']['mainpage']['href'],
@@ -157,7 +161,7 @@ class ArchLinuxTemplate extends BaseTemplate {
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
<?php
$footerEnd = '</div>';
} else {
@@ -223,8 +227,8 @@ echo $footerEnd;
function searchBox() {
global $wgUseTwoButtonsSearchForm;
?>
- <div id="p-search" class="portlet">
- <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+ <div id="p-search" class="portlet" role="search">
+ <h3><label for="searchInput"><?php $this->msg('search') ?></label></h3>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('wgScript') ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
@@ -250,8 +254,8 @@ echo $footerEnd;
*/
function cactions() {
?>
- <div id="p-cactions" class="portlet">
- <h5><?php $this->msg('views') ?></h5>
+ <div id="p-cactions" class="portlet" role="navigation">
+ <h3><?php $this->msg('views') ?></h3>
<div class="pBody">
<ul><?php
foreach($this->data['content_actions'] as $key => $tab) {
@@ -267,8 +271,8 @@ echo $footerEnd;
/*************************************************************************************************/
function toolbox() {
?>
- <div class="portlet" id="p-tb">
- <h5><?php $this->msg('toolbox') ?></h5>
+ <div class="portlet" id="p-tb" role="navigation">
+ <h3><?php $this->msg('toolbox') ?></h3>
<div class="pBody">
<ul>
<?php
@@ -290,8 +294,8 @@ echo $footerEnd;
function languageBox() {
if( $this->data['language_urls'] ) {
?>
- <div id="p-lang" class="portlet">
- <h5<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
+ <div id="p-lang" class="portlet" role="navigation">
+ <h3<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h3>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $key => $langlink) { ?>
@@ -311,7 +315,7 @@ echo $footerEnd;
* @param $cont array|string
*/
function customBox( $bar, $cont ) {
- $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
+ $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' );
$tooltip = Linker::titleAttrib( "p-$bar" );
if ( $tooltip !== false ) {
$portletAttribs['title'] = $tooltip;
@@ -319,7 +323,7 @@ echo $footerEnd;
echo ' ' . Html::openElement( 'div', $portletAttribs );
?>
- <h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
+ <h3><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h3>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
diff --git a/skins/Chick.php b/skins/Chick.php
index 54dada3d..75b807ad 100644
--- a/skins/Chick.php
+++ b/skins/Chick.php
@@ -36,7 +36,7 @@ class SkinChick extends SkinTemplate {
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.chick' );
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php
index 1823d882..21b07f7d 100644
--- a/skins/CologneBlue.php
+++ b/skins/CologneBlue.php
@@ -30,136 +30,335 @@ if( !defined( 'MEDIAWIKI' ) ) {
* @todo document
* @ingroup Skins
*/
-class SkinCologneBlue extends SkinLegacy {
+class SkinCologneBlue extends SkinTemplate {
var $skinname = 'cologneblue', $stylename = 'cologneblue',
$template = 'CologneBlueTemplate';
+ var $useHeadElement = true;
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
- parent::setupSkinUserCss( $out );
+ function setupSkinUserCss( OutputPage $out ) {
+ $out->addModuleStyles( 'mediawiki.legacy.shared' );
+ $out->addModuleStyles( 'mediawiki.legacy.oldshared' );
$out->addModuleStyles( 'skins.cologneblue' );
-
- $qb = $this->qbSetting();
- $rules = array();
-
- if ( 2 == $qb ) { # Right
- $rules[] = "/* @noflip */#quickbar { position: absolute; right: 4px; }";
- $rules[] = "/* @noflip */#article { margin-left: 4px; margin-right: 148px; }";
- $rules[] = "/* @noflip */#footer { margin-right: 152px; }";
- } elseif ( 1 == $qb ) {
- $rules[] = "/* @noflip */#quickbar { position: absolute; left: 4px; }";
- $rules[] = "/* @noflip */#article { margin-left: 148px; margin-right: 4px; }";
- $rules[] = "/* @noflip */#footer { margin-left: 152px; }";
- } elseif ( 3 == $qb ) { # Floating left
- $rules[] = "/* @noflip */#quickbar { position:absolute; left:4px }";
- $rules[] = "/* @noflip */#topbar { margin-left: 148px }";
- $rules[] = "/* @noflip */#article { margin-left:148px; margin-right: 4px; }";
- $rules[] = "/* @noflip */body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto; bottom:4px;}"; # Hides from IE
- $rules[] = "/* @noflip */#footer { margin-left: 152px; }";
- } elseif ( 4 == $qb ) { # Floating right
- $rules[] = "/* @noflip */#quickbar { position: fixed; right: 4px; }";
- $rules[] = "/* @noflip */#topbar { margin-right: 148px }";
- $rules[] = "/* @noflip */#article { margin-right: 148px; margin-left: 4px; }";
- $rules[] = "/* @noflip */body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto; bottom:4px;}"; # Hides from IE
- $rules[] = "/* @noflip */#footer { margin-right: 152px; }";
- }
- $style = implode( "\n", $rules );
- $out->addInlineStyle( $style, 'flip' );
}
+ /**
+ * Override langlink formatting behavior not to uppercase the language names.
+ * See otherLanguages() in CologneBlueTemplate.
+ */
+ function formatLanguageName( $name ) {
+ return $name;
+ }
}
-class CologneBlueTemplate extends LegacyTemplate {
+class CologneBlueTemplate extends BaseTemplate {
+ function execute() {
+ // Suppress warnings to prevent notices about missing indexes in $this->data
+ wfSuppressWarnings();
+ $this->html( 'headelement' );
+ echo $this->beforeContent();
+ $this->html( 'bodytext' );
+ echo "\n";
+ echo $this->afterContent();
+ $this->html( 'dataAfterContent' );
+ $this->printTrail();
+ echo "\n</body></html>";
+ wfRestoreWarnings();
+ }
/**
+ * Language/charset variant links for classic-style skins
* @return string
*/
- function doBeforeContent() {
- $mainPageObj = Title::newMainPage();
-
- $s = "\n<div id='content'>\n<div id='topbar'>" .
- '<table width="100%" cellspacing="0" cellpadding="8"><tr>';
+ function variantLinks() {
+ $s = array();
- $s .= '<td class="top" nowrap="nowrap">';
- $s .= '<a href="' . htmlspecialchars( $mainPageObj->getLocalURL() ) . '">';
- $s .= '<span id="sitetitle">' . wfMessage( 'sitetitle' )->escaped() . '</span></a>';
+ $variants = $this->data['content_navigation']['variants'];
- $s .= '</td><td class="top" id="top-syslinks" width="100%">';
- $s .= $this->sysLinks();
- $s .= '</td></tr><tr><td class="top-subheader">';
+ foreach ( $variants as $key => $link ) {
+ $s[] = $this->makeListItem( $key, $link, array( 'tag' => 'span' ) );
+ }
- $s .= '<font size="-1"><span id="sitesub">';
- $s .= wfMessage( 'sitesubtitle' )->escaped() . '</span></font>';
- $s .= '</td><td class="top-linkcollection">';
+ return $this->getSkin()->getLanguage()->pipeList( $s );
+ }
- $s .= '<font size="-1"><span id="langlinks">';
- $s .= str_replace( '<br />', '', $this->otherLanguages() );
+ function otherLanguages() {
+ global $wgHideInterlanguageLinks;
+ if ( $wgHideInterlanguageLinks ) {
+ return "";
+ }
- $s .= $this->getSkin()->getCategories();
+ // We override SkinTemplate->formatLanguageName() in SkinCologneBlue
+ // not to capitalize the language names.
+ $language_urls = $this->data['language_urls'];
+ if ( empty( $language_urls ) ) {
+ return "";
+ }
- $s .= '<br />' . $this->pageTitleLinks();
- $s .= '</span></font>';
+ $s = array();
+ foreach ( $language_urls as $key => $data ) {
+ $s[] = $this->makeListItem( $key, $data, array( 'tag' => 'span' ) );
+ }
- $s .= "</td></tr></table>\n";
+ return wfMessage( 'otherlanguages' )->text()
+ . wfMessage( 'colon-separator' )->text()
+ . $this->getSkin()->getLanguage()->pipeList( $s );
+ }
- $s .= "\n</div>\n<div id='article'>";
+ function pageTitleLinks() {
+ $s = array();
+ $footlinks = $this->getFooterLinks();
- $notice = $this->getSkin()->getSiteNotice();
- if( $notice ) {
- $s .= "\n<div id='siteNotice'>$notice</div>\n";
+ foreach ( $footlinks['places'] as $item ) {
+ $s[] = $this->data[$item];
}
- $s .= $this->pageTitle();
- $s .= $this->pageSubtitle() . "\n";
- return $s;
+
+ return $this->getSkin()->getLanguage()->pipeList( $s );
}
/**
+ * Used in bottomLinks() to eliminate repetitive code.
+ *
+ * @param $key string Key to be passed to makeListItem()
+ * @param $navlink array Navlink suitable for processNavlinkForDocument()
+ * @param $message string Key of the message to use in place of standard text
+ *
* @return string
*/
- function doAfterContent(){
- $s = "\n</div><br clear='all' />\n";
+ function processBottomLink( $key, $navlink, $message=null ) {
+ if ( !$navlink ) {
+ // Empty navlinks might be passed.
+ return null;
+ }
- $s .= "\n<div id='footer'>";
- $s .= '<table width="98%" cellspacing="0"><tr>';
+ if ( $message ) {
+ $navlink['text'] = wfMessage( $message )->escaped();
+ }
- $s .= '<td class="bottom">';
+ return $this->makeListItem( $key, $this->processNavlinkForDocument( $navlink ), array( 'tag' => 'span' ) );
+ }
- $s .= $this->bottomLinks();
- $s .= $this->getSkin()->getLanguage()->pipeList( array(
- "\n<br />" . Linker::linkKnown(
- Title::newMainPage()
- ),
- $this->getSkin()->aboutLink(),
- $this->searchForm( wfMessage( 'qbfind' )->text() )
- ) );
+ function bottomLinks() {
+ $toolbox = $this->getToolbox();
+ $content_nav = $this->data['content_navigation'];
+
+ $lines = array();
+
+ if ( $this->getSkin()->getOutput()->isArticleRelated() ) {
+ // First row. Regular actions.
+ $element = array();
+
+ $editLinkMessage = $this->getSkin()->getTitle()->exists() ? 'editthispage' : 'create-this-page';
+ $element[] = $this->processBottomLink( 'edit', $content_nav['views']['edit'], $editLinkMessage );
+ $element[] = $this->processBottomLink( 'viewsource', $content_nav['views']['viewsource'], 'viewsource' );
+
+ $element[] = $this->processBottomLink( 'watch', $content_nav['actions']['watch'], 'watchthispage' );
+ $element[] = $this->processBottomLink( 'unwatch', $content_nav['actions']['unwatch'], 'unwatchthispage' );
+
+ $element[] = $this->talkLink();
+
+ $element[] = $this->processBottomLink( 'history', $content_nav['views']['history'], 'history' );
+ $element[] = $this->processBottomLink( 'info', $toolbox['info'] );
+ $element[] = $this->processBottomLink( 'whatlinkshere', $toolbox['whatlinkshere'] );
+ $element[] = $this->processBottomLink( 'recentchangeslinked', $toolbox['recentchangeslinked'] );
+
+ $element[] = $this->processBottomLink( 'contributions', $toolbox['contributions'] );
+ $element[] = $this->processBottomLink( 'emailuser', $toolbox['emailuser'] );
+
+ $lines[] = $this->getSkin()->getLanguage()->pipeList( array_filter( $element ) );
- $s .= "\n<br />" . $this->pageStats();
- $s .= '</td>';
- $s .= "</tr></table>\n</div>\n</div>\n";
+ // Second row. Privileged actions.
+ $element = array();
- if ( $this->getSkin()->qbSetting() != 0 ) {
- $s .= $this->quickBar();
+ $element[] = $this->processBottomLink( 'delete', $content_nav['actions']['delete'], 'deletethispage' );
+ $element[] = $this->processBottomLink( 'undelete', $content_nav['actions']['undelete'], 'undeletethispage' );
+
+ $element[] = $this->processBottomLink( 'protect', $content_nav['actions']['protect'], 'protectthispage' );
+ $element[] = $this->processBottomLink( 'unprotect', $content_nav['actions']['unprotect'], 'unprotectthispage' );
+
+ $element[] = $this->processBottomLink( 'move', $content_nav['actions']['move'], 'movethispage' );
+
+ $lines[] = $this->getSkin()->getLanguage()->pipeList( array_filter( $element ) );
+
+
+ // Third row. Language links.
+ $lines[] = $this->otherLanguages();
+ }
+
+ return implode( array_filter( $lines ), "<br />\n" ) . "<br />\n";
+ }
+
+ function talkLink() {
+ $title = $this->getSkin()->getTitle();
+
+ if ( $title->getNamespace() == NS_SPECIAL ) {
+ // No discussion links for special pages
+ return "";
+ }
+
+ $companionTitle = $title->isTalkPage() ? $title->getSubjectPage() : $title->getTalkPage();
+ $companionNamespace = $companionTitle->getNamespace();
+
+ // TODO these messages appear to only be used by CologneBlue and legacy skins,
+ // kill and replace with something more sensibly named?
+ $nsToMessage = array(
+ NS_MAIN => 'articlepage',
+ NS_USER => 'userpage',
+ NS_PROJECT => 'projectpage',
+ NS_FILE => 'imagepage',
+ NS_MEDIAWIKI => 'mediawikipage',
+ NS_TEMPLATE => 'templatepage',
+ NS_HELP => 'viewhelppage',
+ NS_CATEGORY => 'categorypage',
+ NS_FILE => 'imagepage',
+ );
+
+ // Find out the message to use for link text. Use either the array above or,
+ // for non-talk pages, a generic "discuss this" message.
+ // Default is the same as for main namespace.
+ if ( isset( $nsToMessage[$companionNamespace] ) ) {
+ $message = $nsToMessage[$companionNamespace];
+ } else {
+ $message = $companionTitle->isTalkPage() ? 'talkpage' : 'articlepage';
+ }
+
+ // Obviously this can't be reasonable and just return the key for talk namespace, only for content ones.
+ // Thus we have to mangle it in exactly the same way SkinTemplate does. (bug 40805)
+ $key = $companionTitle->getNamespaceKey( '' );
+ if ( $companionTitle->isTalkPage() ) {
+ $key = ( $key == 'main' ? 'talk' : $key . "_talk" );
}
+
+ // Use the regular navigational link, but replace its text. Everything else stays unmodified.
+ $namespacesLinks = $this->data['content_navigation']['namespaces'];
+ return $this->processBottomLink( $message, $namespacesLinks[$key], $message );
+ }
+
+ /**
+ * Takes a navigational link generated by SkinTemplate in whichever way
+ * and mangles attributes unsuitable for repeated use. In particular, this modifies the ids
+ * and removes the accesskeys. This is necessary to be able to use the same navlink twice,
+ * e.g. in sidebar and in footer.
+ *
+ * @param $navlink array Navigational link generated by SkinTemplate
+ * @param $idPrefix mixed Prefix to add to id of this navlink. If false, id is removed entirely. Default is 'cb-'.
+ */
+ function processNavlinkForDocument( $navlink, $idPrefix='cb-' ) {
+ if ( $navlink['id'] ) {
+ $navlink['single-id'] = $navlink['id']; // to allow for tooltip generation
+ $navlink['tooltiponly'] = true; // but no accesskeys
+
+ // mangle or remove the id
+ if ( $idPrefix === false ) {
+ unset( $navlink['id'] );
+ } else {
+ $navlink['id'] = $idPrefix . $navlink['id'];
+ }
+ }
+
+ return $navlink;
+ }
+
+ /**
+ * @return string
+ */
+ function beforeContent() {
+ ob_start();
+?>
+<div id="content">
+ <div id="topbar">
+ <p id="sitetitle" role="banner">
+ <a href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>">
+ <?php echo wfMessage( 'sitetitle' )->escaped() ?>
+ </a>
+ </p>
+ <p id="sitesub"><?php echo wfMessage( 'sitesubtitle' )->escaped() ?></p>
+ <div id="linkcollection" role="navigation">
+ <div id="langlinks"><?php echo str_replace( '<br />', '', $this->otherLanguages() ) ?></div>
+ <?php echo $this->getSkin()->getCategories() ?>
+ <div id="titlelinks"><?php echo $this->pageTitleLinks() ?></div>
+ <?php if ( $this->data['newtalk'] ) { ?>
+ <div class="usermessage"><strong><?php echo $this->data['newtalk'] ?></strong></div>
+ <?php } ?>
+ </div>
+ </div>
+ <div id="article" role="main">
+ <?php if ( $this->getSkin()->getSiteNotice() ) { ?>
+ <div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
+ <?php } ?>
+ <h1 id="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
+ <?php if ( $this->translator->translate( 'tagline' ) ) { ?>
+ <p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p>
+ <?php } ?>
+ <?php if ( $this->getSkin()->getOutput()->getSubtitle() ) { ?>
+ <p class="subtitle"><?php echo $this->getSkin()->getOutput()->getSubtitle() ?></p>
+ <?php } ?>
+ <?php if ( $this->getSkin()->subPageSubtitle() ) { ?>
+ <p class="subpages"><?php echo $this->getSkin()->subPageSubtitle() ?></p>
+ <?php } ?>
+<?php
+ $s = ob_get_contents();
+ ob_end_clean();
+
return $s;
}
/**
* @return string
*/
- function sysLinks() {
- $li = SpecialPage::getTitleFor( 'Userlogin' );
- $lo = SpecialPage::getTitleFor( 'Userlogout' );
+ function afterContent() {
+ ob_start();
+?>
+ </div>
+ <div id="footer" role="contentinfo">
+<?php
+ // Page-related links
+ echo $this->bottomLinks();
+ echo "\n<br />";
- $rt = $this->getSkin()->getTitle()->getPrefixedURL();
- if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
- $q = array();
- } else {
- $q = array( 'returnto' => $rt );
+ // Footer and second searchbox
+ echo $this->getSkin()->getLanguage()->pipeList( array(
+ $this->getSkin()->mainPageLink(),
+ $this->getSkin()->aboutLink(),
+ $this->searchForm( 'footer' )
+ ) );
+ echo "\n<br />";
+
+ // Standard footer info
+ $footlinks = $this->getFooterLinks();
+ if ( $footlinks['info'] ) {
+ foreach ( $footlinks['info'] as $item ) {
+ echo $this->data[$item] . ' ';
+ }
}
+?>
+ </div>
+</div>
+<div id="mw-navigation">
+ <h2><?php echo wfMessage( 'navigation-heading' )->escaped() ?></h2>
+ <div id="toplinks" role="navigation">
+ <p id="syslinks"><?php echo $this->sysLinks() ?></p>
+ <p id="variantlinks"><?php echo $this->variantLinks() ?></p>
+ </div>
+ <?php echo $this->quickBar() ?>
+</div>
+<?php
+ $s = ob_get_contents();
+ ob_end_clean();
+ return $s;
+ }
+
+ /**
+ * @return string
+ */
+ function sysLinks() {
$s = array(
$this->getSkin()->mainPageLink(),
Linker::linkKnown(
@@ -174,189 +373,153 @@ class CologneBlueTemplate extends LegacyTemplate {
Title::newFromText( wfMessage( 'faqpage' )->inContentLanguage()->text() ),
wfMessage( 'faq' )->text()
),
- Linker::specialLink( 'Specialpages' )
);
- /* show links to different language variants */
- if( $this->variantLinks() ) {
- $s[] = $this->variantLinks();
- }
- if( $this->extensionTabLinks() ) {
- $s[] = $this->extensionTabLinks();
- }
- if ( $this->data['loggedin'] ) {
- $s[] = Linker::linkKnown(
- $lo,
- wfMessage( 'logout' )->text(),
- array(),
- $q
- );
- } else {
- $s[] = Linker::linkKnown(
- $li,
- wfMessage( 'login' )->text(),
- array(),
- $q
- );
+ $personalUrls = $this->getPersonalTools();
+ foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+ if ( $personalUrls[$key] ) {
+ $s[] = $this->makeListItem( $key, $personalUrls[$key], array( 'tag' => 'span' ) );
+ }
}
return $this->getSkin()->getLanguage()->pipeList( $s );
}
/**
+ * Adds CologneBlue-specific items to the sidebar: qbedit, qbpageoptions and qbmyoptions menus.
+ *
+ * @param $bar sidebar data
+ * @return array modified sidebar data
+ */
+ function sidebarAdditions( $bar ) {
+ // "This page" and "Edit" menus
+ // We need to do some massaging here... we reuse all of the items, except for $...['views']['view'],
+ // as $...['namespaces']['main'] and $...['namespaces']['talk'] together serve the same purpose.
+ // We also don't use $...['variants'], these are displayed in the top menu.
+ $content_navigation = $this->data['content_navigation'];
+ $qbpageoptions = array_merge(
+ $content_navigation['namespaces'],
+ array(
+ 'history' => $content_navigation['views']['history'],
+ 'watch' => $content_navigation['actions']['watch'],
+ 'unwatch' => $content_navigation['actions']['unwatch'],
+ )
+ );
+ $content_navigation['actions']['watch'] = null;
+ $content_navigation['actions']['unwatch'] = null;
+ $qbedit = array_merge(
+ array(
+ 'edit' => $content_navigation['views']['edit'],
+ 'addsection' => $content_navigation['views']['addsection'],
+ ),
+ $content_navigation['actions']
+ );
+
+ // Personal tools ("My pages")
+ $qbmyoptions = $this->getPersonalTools();
+ foreach ( array ( 'logout', 'createaccount', 'login', 'anonlogin' ) as $key ) {
+ $qbmyoptions[$key] = null;
+ }
+
+ // Use the closest reasonable name
+ $bar['cactions'] = $qbedit;
+ $bar['pageoptions'] = $qbpageoptions; // this is a non-standard portlet name, but nothing fits
+ $bar['personal'] = $qbmyoptions;
+
+ return $bar;
+ }
+
+ /**
* Compute the sidebar
* @access private
*
* @return string
*/
- function quickBar(){
- $s = "\n<div id='quickbar'>";
-
- $sep = '<br />';
- $s .= $this->menuHead( 'qbfind' );
- $s .= $this->searchForm();
-
- $s .= $this->menuHead( 'qbbrowse' );
-
- # Use the first heading from the Monobook sidebar as the "browse" section
- $bar = $this->getSkin()->buildSidebar();
- unset( $bar['SEARCH'] );
- unset( $bar['LANGUAGES'] );
- unset( $bar['TOOLBOX'] );
-
- $barnumber = 1;
- foreach ( $bar as $heading => $browseLinks ) {
- if ( $barnumber > 1 ) {
- $headingMsg = wfMessage( $heading );
- if ( $headingMsg->exists() ) {
- $h = $headingMsg->text();
- } else {
- $h = $heading;
- }
- $s .= "\n<h6>" . htmlspecialchars( $h ) . "</h6>";
+ function quickBar() {
+ // Massage the sidebar. We want to:
+ // * place SEARCH at the beginning
+ // * add new portlets before TOOLBOX (or at the end, if it's missing)
+ // * remove LANGUAGES (langlinks are displayed elsewhere)
+ $orig_bar = $this->data['sidebar'];
+ $bar = array();
+ $hasToolbox = false;
+
+ // Always display search first
+ $bar['SEARCH'] = true;
+ // Copy everything except for langlinks, inserting new items before toolbox
+ foreach ( $orig_bar as $heading => $data ) {
+ if ( $heading == 'TOOLBOX' ) {
+ // Insert the stuff
+ $bar = $this->sidebarAdditions( $bar );
+ $hasToolbox = true;
}
- if( is_array( $browseLinks ) ) {
- foreach ( $browseLinks as $link ) {
- if ( $link['text'] != '-' ) {
- $s .= "<a href=\"{$link['href']}\">" .
- htmlspecialchars( $link['text'] ) . '</a>' . $sep;
- }
- }
+
+ if ( $heading != 'LANGUAGES' ) {
+ $bar[$heading] = $data;
}
- $barnumber++;
+ }
+ // If toolbox is missing, add our items at the end
+ if ( !$hasToolbox ) {
+ $bar = $this->sidebarAdditions( $bar );
}
- $user = $this->getSkin()->getUser();
- if ( $this->data['isarticle'] ) {
- $s .= $this->menuHead( 'qbedit' );
- $s .= '<strong>' . $this->editThisPage() . '</strong>';
+ // Fill out special sidebar items with content
+ $orig_bar = $bar;
+ $bar = array();
+ foreach ( $orig_bar as $heading => $data ) {
+ if ( $heading == 'SEARCH' ) {
+ $bar['search'] = $this->searchForm( 'sidebar' );
+ } elseif ( $heading == 'TOOLBOX' ) {
+ $bar['tb'] = $this->getToolbox();
+ } else {
+ $bar[$heading] = $data;
+ }
+ }
- $s .= $sep . Linker::linkKnown(
- Title::newFromText( wfMessage( 'edithelppage' )->inContentLanguage()->text() ),
- wfMessage( 'edithelp' )->text()
- );
- if( $this->data['loggedin'] ) {
- $s .= $sep . $this->moveThisPage();
- }
- if ( $user->isAllowed( 'delete' ) ) {
- $dtp = $this->deleteThisPage();
- if ( $dtp != '' ) {
- $s .= $sep . $dtp;
- }
- }
- if ( $user->isAllowed( 'protect' ) ) {
- $ptp = $this->protectThisPage();
- if ( $ptp != '' ) {
- $s .= $sep . $ptp;
- }
- }
- $s .= $sep;
-
- $s .= $this->menuHead( 'qbpageoptions' );
- $s .= $this->talkLink()
- . $sep . $this->commentLink()
- . $sep . $this->printableLink();
- if ( $this->data['loggedin'] ) {
- $s .= $sep . $this->watchThisPage();
- }
+ // Output the sidebar
+ // CologneBlue uses custom messages for some portlets, but we should keep the ids for consistency
+ $idToMessage = array(
+ 'search' => 'qbfind',
+ 'navigation' => 'qbbrowse',
+ 'tb' => 'toolbox',
+ 'cactions' => 'qbedit',
+ 'personal' => 'qbmyoptions',
+ 'pageoptions' => 'qbpageoptions',
+ );
- $s .= $sep;
-
- $s .= $this->menuHead( 'qbpageinfo' )
- . $this->historyLink()
- . $sep . $this->whatLinksHere()
- . $sep . $this->watchPageLinksLink();
-
- $title = $this->getSkin()->getTitle();
- $tns = $title->getNamespace();
- if ( $tns == NS_USER || $tns == NS_USER_TALK ) {
- $id = User::idFromName( $title->getText() );
- if( $id != 0 ) {
- $s .= $sep . $this->userContribsLink();
- if( $this->getSkin()->showEmailUser( $id ) ) {
- $s .= $sep . $this->emailUserLink();
+ $s = "<div id='quickbar'>\n";
+
+ foreach ( $bar as $heading => $data ) {
+ $portletId = Sanitizer::escapeId( "p-$heading" );
+ $headingMsg = wfMessage( $idToMessage[$heading] ? $idToMessage[$heading] : $heading );
+ $headingHTML = "<h3>" . ( $headingMsg->exists() ? $headingMsg->escaped() : htmlspecialchars( $heading ) ) . "</h3>";
+ $listHTML = "";
+
+ if ( is_array( $data ) ) {
+ // $data is an array of links
+ foreach ( $data as $key => $link ) {
+ // Can be empty due to how the sidebar additions are done
+ if ( $link ) {
+ $listHTML .= $this->makeListItem( $key, $link );
}
}
+ if ( $listHTML ) {
+ $listHTML = "<ul>$listHTML</ul>";
+ }
+ } else {
+ // $data is a HTML <ul>-list string
+ $listHTML = $data;
}
- $s .= $sep;
- }
- $s .= $this->menuHead( 'qbmyoptions' );
- if ( $this->data['loggedin'] ) {
- $tl = Linker::linkKnown(
- $user->getTalkPage(),
- wfMessage( 'mytalk' )->escaped()
- );
- if ( $user->getNewtalk() ) {
- $tl .= ' *';
+ if ( $listHTML ) {
+ $role = ( $heading == 'search' ) ? 'search' : 'navigation';
+ $s .= "<div class=\"portlet\" id=\"$portletId\" role=\"$role\">\n$headingHTML\n$listHTML\n</div>\n";
}
-
- $s .= Linker::linkKnown(
- $user->getUserPage(),
- wfMessage( 'mypage' )->escaped()
- ) . $sep . $tl . $sep . Linker::specialLink( 'Watchlist' )
- . $sep .
- Linker::linkKnown(
- SpecialPage::getSafeTitleFor( 'Contributions', $user->getName() ),
- wfMessage( 'mycontris' )->escaped()
- ) . $sep . Linker::specialLink( 'Preferences' )
- . $sep . Linker::specialLink( 'Userlogout' );
- } else {
- $s .= Linker::specialLink( 'Userlogin' );
- }
-
- $s .= $this->menuHead( 'qbspecialpages' )
- . Linker::specialLink( 'Newpages' )
- . $sep . Linker::specialLink( 'Listfiles' )
- . $sep . Linker::specialLink( 'Statistics' );
- if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
- $s .= $sep . $this->getUploadLink();
}
- global $wgSiteSupportPage;
-
- if( $wgSiteSupportPage ) {
- $s .= $sep . '<a href="' . htmlspecialchars( $wgSiteSupportPage ) . '" class="internal">'
- . wfMessage( 'sitesupport' )->escaped() . '</a>';
- }
-
- $s .= $sep . Linker::linkKnown(
- SpecialPage::getTitleFor( 'Specialpages' ),
- wfMessage( 'moredotdotdot' )->text()
- );
-
- $s .= $sep . "\n</div>\n";
- return $s;
- }
-
- /**
- * @param $key string
- * @return string
- */
- function menuHead( $key ) {
- $s = "\n<h6>" . wfMessage( $key )->text() . "</h6>";
+ $s .= "</div>\n";
return $s;
}
@@ -364,31 +527,29 @@ class CologneBlueTemplate extends LegacyTemplate {
* @param $label string
* @return string
*/
- function searchForm( $label = '' ) {
+ function searchForm( $which ) {
global $wgUseTwoButtonsSearchForm;
$search = $this->getSkin()->getRequest()->getText( 'search' );
$action = $this->data['searchaction'];
- $s = "<form id=\"searchform{$this->searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">";
- if( $label != '' ) {
- $s .= "{$label}: ";
+ $s = "<form id=\"searchform-" . htmlspecialchars($which) . "\" method=\"get\" class=\"inline\" action=\"$action\">";
+ if( $which == 'footer' ) {
+ $s .= wfMessage( 'qbfind' )->text() . ": ";
}
- $s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
- . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" /><br />"
- . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
+ $s .= "<input type='text' class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
+ . htmlspecialchars( substr( $search, 0, 256 ) ) . "\" />"
+ . ($which == 'footer' ? " " : "<br />")
+ . "<input type='submit' class=\"searchButton\" name=\"go\" value=\"" . wfMessage( 'searcharticle' )->escaped() . "\" />";
if( $wgUseTwoButtonsSearchForm ) {
- $s .= "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'search' )->escaped() . "\" />\n";
+ $s .= " <input type='submit' class=\"searchButton\" name=\"fulltext\" value=\"" . wfMessage( 'searchbutton' )->escaped() . "\" />\n";
} else {
$s .= '<div><a href="' . $action . '" rel="search">' . wfMessage( 'powersearch-legend' )->escaped() . "</a></div>\n";
}
$s .= '</form>';
- // Ensure unique id's for search boxes made after the first
- $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
-
return $s;
}
}
diff --git a/skins/Modern.php b/skins/Modern.php
index 4211bb84..9dbefb11 100644
--- a/skins/Modern.php
+++ b/skins/Modern.php
@@ -37,7 +37,7 @@ class SkinModern extends SkinTemplate {
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles ('skins.modern');
}
@@ -65,7 +65,10 @@ class ModernTemplate extends MonoBookTemplate {
?>
<!-- heading -->
- <div id="mw_header"><h1 id="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
+ <div id="mw_header"><h1 id="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html('title') ?></span></h1></div>
<div id="mw_main">
<div id="mw_contentwrapper">
@@ -73,7 +76,7 @@ class ModernTemplate extends MonoBookTemplate {
<?php $this->cactions(); ?>
<!-- content -->
- <div id="mw_content">
+ <div id="mw_content" role="main">
<!-- contentholder does nothing by default, but it allows users to style the text inside
the content area without affecting the meaning of 'em' in #mw_content, which is used
for the margins -->
@@ -103,6 +106,7 @@ class ModernTemplate extends MonoBookTemplate {
</div><!-- mw_contentwrapper -->
<div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
+ <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<!-- portlets -->
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
@@ -115,8 +119,8 @@ class ModernTemplate extends MonoBookTemplate {
<div class="mw_clear"></div>
<!-- personal portlet -->
- <div class="portlet" id="p-personal">
- <h5><?php $this->msg('personaltools') ?></h5>
+ <div class="portlet" id="p-personal" role="navigation">
+ <h3><?php $this->msg('personaltools') ?></h3>
<div class="pBody">
<ul>
<?php foreach($this->getPersonalTools() as $key => $item) { ?>
@@ -129,7 +133,7 @@ class ModernTemplate extends MonoBookTemplate {
<!-- footer -->
- <div id="footer"<?php $this->html('userlangattributes') ?>>
+ <div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
<ul id="f-list">
<?php
foreach( $this->getFooterLinks("flat") as $aLink ) {
diff --git a/skins/MonoBook.php b/skins/MonoBook.php
index 0bd7134b..f03d31b8 100644
--- a/skins/MonoBook.php
+++ b/skins/MonoBook.php
@@ -80,11 +80,14 @@ class MonoBookTemplate extends BaseTemplate {
$this->html( 'headelement' );
?><div id="globalWrapper">
-<div id="column-content"><div id="content" class="mw-body-primary">
+<div id="column-content"><div id="content" class="mw-body-primary" role="main">
<a id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
- <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html('title') ?></span></h1>
+ <h1 id="firstHeading" class="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html('title') ?></span></h1>
<div id="bodyContent" class="mw-body">
<div id="siteSub"><?php $this->msg('tagline') ?></div>
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
@@ -104,9 +107,10 @@ class MonoBookTemplate extends BaseTemplate {
</div>
</div></div>
<div id="column-one"<?php $this->html('userlangattributes') ?>>
+ <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
<?php $this->cactions(); ?>
- <div class="portlet" id="p-personal">
- <h5><?php $this->msg('personaltools') ?></h5>
+ <div class="portlet" id="p-personal" role="navigation">
+ <h3><?php $this->msg('personaltools') ?></h3>
<div class="pBody">
<ul<?php $this->html('userlangattributes') ?>>
<?php foreach($this->getPersonalTools() as $key => $item) { ?>
@@ -116,7 +120,7 @@ class MonoBookTemplate extends BaseTemplate {
</ul>
</div>
</div>
- <div class="portlet" id="p-logo">
+ <div class="portlet" id="p-logo" role="banner">
<?php
echo Html::element( 'a', array(
'href' => $this->data['nav_urls']['mainpage']['href'],
@@ -134,7 +138,7 @@ class MonoBookTemplate extends BaseTemplate {
$validFooterLinks = $this->getFooterLinks( "flat" ); // Additional footer links
if ( count( $validFooterIcons ) + count( $validFooterLinks ) > 0 ) { ?>
-<div id="footer"<?php $this->html('userlangattributes') ?>>
+<div id="footer" role="contentinfo"<?php $this->html('userlangattributes') ?>>
<?php
$footerEnd = '</div>';
} else {
@@ -200,8 +204,8 @@ echo $footerEnd;
function searchBox() {
global $wgUseTwoButtonsSearchForm;
?>
- <div id="p-search" class="portlet">
- <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+ <div id="p-search" class="portlet" role="search">
+ <h3><label for="searchInput"><?php $this->msg('search') ?></label></h3>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('wgScript') ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
@@ -227,8 +231,8 @@ echo $footerEnd;
*/
function cactions() {
?>
- <div id="p-cactions" class="portlet">
- <h5><?php $this->msg('views') ?></h5>
+ <div id="p-cactions" class="portlet" role="navigation">
+ <h3><?php $this->msg('views') ?></h3>
<div class="pBody">
<ul><?php
foreach($this->data['content_actions'] as $key => $tab) {
@@ -244,8 +248,8 @@ echo $footerEnd;
/*************************************************************************************************/
function toolbox() {
?>
- <div class="portlet" id="p-tb">
- <h5><?php $this->msg('toolbox') ?></h5>
+ <div class="portlet" id="p-tb" role="navigation">
+ <h3><?php $this->msg('toolbox') ?></h3>
<div class="pBody">
<ul>
<?php
@@ -267,8 +271,8 @@ echo $footerEnd;
function languageBox() {
if( $this->data['language_urls'] ) {
?>
- <div id="p-lang" class="portlet">
- <h5<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
+ <div id="p-lang" class="portlet" role="navigation">
+ <h3<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h3>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $key => $langlink) { ?>
@@ -288,7 +292,7 @@ echo $footerEnd;
* @param $cont array|string
*/
function customBox( $bar, $cont ) {
- $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ) );
+ $portletAttribs = array( 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' );
$tooltip = Linker::titleAttrib( "p-$bar" );
if ( $tooltip !== false ) {
$portletAttribs['title'] = $tooltip;
@@ -296,7 +300,7 @@ echo $footerEnd;
echo ' ' . Html::openElement( 'div', $portletAttribs );
?>
- <h5><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h5>
+ <h3><?php $msg = wfMessage( $bar ); echo htmlspecialchars( $msg->exists() ? $msg->text() : $bar ); ?></h3>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index c3f73e5b..3028915e 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -36,7 +36,7 @@ class SkinNostalgia extends SkinLegacy {
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.nostalgia' );
}
diff --git a/skins/Standard.php b/skins/Standard.php
index de116391..5b358e06 100644
--- a/skins/Standard.php
+++ b/skins/Standard.php
@@ -2,6 +2,22 @@
/**
* Standard (a.k.a. Classic) skin: old MediaWiki default skin
*
+ * 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
*/
@@ -21,7 +37,7 @@ class SkinStandard extends SkinLegacy {
/**
* @param $out OutputPage
*/
- function setupSkinUserCss( OutputPage $out ){
+ function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$out->addModuleStyles( 'skins.standard' );
diff --git a/skins/Vector.php b/skins/Vector.php
index 6045ed6e..d0f99951 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -57,7 +57,7 @@ class SkinVector extends SkinTemplate {
"/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
);
- $out->addModuleScripts( 'skins.vector' );
+ $out->addModules( 'skins.vector.js' );
}
/**
@@ -65,14 +65,14 @@ class SkinVector extends SkinTemplate {
* fixes bug 22916
* @param $out OutputPage object
*/
- function setupSkinUserCss( OutputPage $out ){
+ 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
*/
@@ -156,7 +156,7 @@ class VectorTemplate extends BaseTemplate {
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<!-- content -->
- <div id="content" class="mw-body">
+ <div id="content" class="mw-body" role="main">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
<?php if ( $this->data['sitenotice'] ): ?>
@@ -165,7 +165,10 @@ class VectorTemplate extends BaseTemplate {
<!-- /sitenotice -->
<?php endif; ?>
<!-- firstHeading -->
- <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
+ <h1 id="firstHeading" class="firstHeading" lang="<?php
+ $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
+ $this->html( 'pageLanguage' );
+ ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
<!-- /firstHeading -->
<!-- bodyContent -->
<div id="bodyContent">
@@ -191,7 +194,7 @@ class VectorTemplate extends BaseTemplate {
<!-- 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="#mw-navigation"><?php $this->msg( 'jumptonavigation' ) ?></a><?php $this->msg( 'comma-separator' ) ?>
<a href="#p-search"><?php $this->msg( 'jumptosearch' ) ?></a>
</div>
<!-- /jumpto -->
@@ -224,27 +227,30 @@ class VectorTemplate extends BaseTemplate {
<!-- /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 id="mw-navigation">
+ <h2><?php $this->msg( 'navigation-heading' ) ?></h2>
+ <!-- header -->
+ <div id="mw-head">
+ <?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>
- </div>
- <!-- /header -->
- <!-- panel -->
- <div id="mw-panel" class="noprint">
+ <!-- /header -->
+ <!-- panel -->
+ <div id="mw-panel">
<!-- logo -->
- <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a></div>
+ <div id="p-logo" role="banner"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a></div>
<!-- /logo -->
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
</div>
- <!-- /panel -->
+ <!-- /panel -->
+ </div>
<!-- footer -->
- <div id="footer"<?php $this->html( 'userlangattributes' ) ?>>
+ <div id="footer" role="contentinfo"<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach( $this->getFooterLinks() as $category => $links ): ?>
<ul id="footer-<?php echo $category ?>">
<?php foreach( $links as $link ): ?>
@@ -327,8 +333,8 @@ class VectorTemplate extends BaseTemplate {
$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="portal" role="navigation" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
+ <h3<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h3>
<div class="body">
<?php
if ( is_array( $content ) ): ?>
@@ -377,8 +383,8 @@ class VectorTemplate extends BaseTemplate {
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>
+<div id="p-namespaces" role="navigation" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h3><?php $this->msg( 'namespaces' ) ?></h3>
<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>
@@ -389,15 +395,15 @@ class VectorTemplate extends BaseTemplate {
break;
case 'VARIANTS':
?>
-<div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h4>
+<div id="p-variants" role="navigation" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h3 id="mw-vector-current-variant">
<?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>
+ </h3>
+ <h3><span><?php $this->msg( 'variants' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul>
<?php foreach ( $this->data['variant_urls'] as $link ): ?>
@@ -410,8 +416,8 @@ class VectorTemplate extends BaseTemplate {
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>
+<div id="p-views" role="navigation" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) { echo ' emptyPortlet'; } ?>">
+ <h3><?php $this->msg('views') ?></h3>
<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
@@ -427,8 +433,8 @@ class VectorTemplate extends BaseTemplate {
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 id="p-cactions" role="navigation" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h3><span><?php $this->msg( 'actions' ) ?></span><a href="#"></a></h3>
<div class="menu">
<ul<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach ( $this->data['action_urls'] as $link ): ?>
@@ -441,21 +447,23 @@ class VectorTemplate extends BaseTemplate {
break;
case 'PERSONAL':
?>
-<div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
- <h5><?php $this->msg( 'personaltools' ) ?></h5>
+<div id="p-personal" role="navigation" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
+ <h3><?php $this->msg( 'personaltools' ) ?></h3>
<ul<?php $this->html( 'userlangattributes' ) ?>>
-<?php foreach( $this->getPersonalTools() as $key => $item ) { ?>
- <?php echo $this->makeListItem( $key, $item ); ?>
-
-<?php } ?>
+<?php
+ $personalTools = $this->getPersonalTools();
+ foreach ( $personalTools as $key => $item ) {
+ echo $this->makeListItem( $key, $item );
+ }
+?>
</ul>
</div>
<?php
break;
case 'SEARCH':
?>
-<div id="p-search">
- <h5<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
+<div id="p-search" role="search">
+ <h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ): ?>
<div id="simpleSearch">
diff --git a/skins/archlinux/main.css b/skins/archlinux/main.css
index 5866d97d..4cbc0939 100644
--- a/skins/archlinux/main.css
+++ b/skins/archlinux/main.css
@@ -24,6 +24,11 @@ div#content {
div#column-one {
padding-top: 160px;
}
+/* Hide, but keep accessible for screen-readers */
+#column-one h2 {
+ position: absolute;
+ top: -9999px;
+}
div#content {
background: white;
color: black;
@@ -71,6 +76,7 @@ a.new,
}
ul {
+ list-style-type: square;
/* @embed */
list-style-image: url(bullet.gif);
}
@@ -224,12 +230,7 @@ table.rimage {
width: 11.6em;
overflow: hidden;
}
-.portlet h4 {
- font-size: 95%;
- font-weight: normal;
- white-space: nowrap;
-}
-.portlet h5 {
+.portlet h3 {
background: transparent;
padding: 0 1em 0 .5em;
display: inline;
@@ -239,18 +240,6 @@ table.rimage {
font-weight: normal;
white-space: nowrap;
}
-.portlet h6 {
- background: #ffae2e;
- border: 1px solid #2f6fab;
- border-style: solid solid none solid;
- padding: 0 1em 0 1em;
- text-transform: lowercase;
- display: block;
- font-size: 1em;
- height: 1.2em;
- font-weight: normal;
- white-space: nowrap;
-}
.pBody {
font-size: 95%;
background-color: white;
@@ -259,18 +248,8 @@ table.rimage {
border: 1px solid #aaa;
padding: 0 .8em .3em .5em;
}
-.portlet h1,
-.portlet h2,
-.portlet h3,
-.portlet h4 {
- margin: 0;
- padding: 0;
-}
.portlet ul {
line-height: 1.5em;
- list-style-type: square;
- /* @embed */
- list-style-image: url(bullet.gif);
font-size: 95%;
}
.portlet li {
@@ -291,7 +270,7 @@ table.rimage {
width: 12em;
overflow: visible;
}
-#p-logo h5 {
+#p-logo h3 {
display: none;
}
#p-logo a,
@@ -352,7 +331,7 @@ input.searchButton {
overflow: visible;
line-height: 1.2em;
}
-#p-personal h5 {
+#p-personal h3 {
display: none;
}
#p-personal .portlet,
@@ -372,7 +351,8 @@ input.searchButton {
padding: 0 2em 0 3em;
margin: 0;
text-align: right;
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
z-index: 0;
background: none;
cursor: default;
@@ -432,11 +412,11 @@ li#pt-login {
background: none;
border-collapse: collapse;
padding-left: 1em;
- list-style: none;
font-size: 95%;
}
#p-cactions ul {
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
}
#p-cactions li {
display: inline;
@@ -474,7 +454,7 @@ li#pt-login {
text-decoration: none;
background-color: white;
}
-#p-cactions h5 {
+#p-cactions h3 {
display: none;
}
#p-cactions li.istalk {
@@ -515,8 +495,7 @@ li#ca-print {
}
/* Override text-transform on languages where capitalization is significant */
-.capitalize-all-nouns .portlet h5,
-.capitalize-all-nouns .portlet h6,
+.capitalize-all-nouns .portlet h3,
.capitalize-all-nouns #p-personal ul,
.capitalize-all-nouns #p-cactions ul li a {
text-transform: none;
@@ -824,7 +803,8 @@ div#searchTarget {
}
div#searchTarget ul li {
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
}
div#searchTarget ul li:before {
diff --git a/skins/cologneblue/screen.css b/skins/cologneblue/screen.css
index 57b5410e..349638aa 100644
--- a/skins/cologneblue/screen.css
+++ b/skins/cologneblue/screen.css
@@ -2,6 +2,7 @@ body {
margin: 0;
padding: 0;
color: black;
+ font-family: serif;
}
#specialform {
@@ -20,10 +21,6 @@ body {
font-size: 8pt;
}
-#topbar {
- padding: 0;
-}
-
#powersearch {
background: #DDEEFF;
border-style: solid;
@@ -61,64 +58,20 @@ textarea {
}
#footer {
+ margin-right: 2%;
+ margin-top: 1em;
padding: 4px;
+ font-family: verdana, arial, sans-serif;
+ font-size: 10pt;
+ text-align: center;
}
#footer form {
display: inline;
}
-#sitetitle {
- font-family: Times, serif;
- color: white;
- font-weight: normal;
- font-size: 32pt;
- line-height: 32pt;
-}
-
-td.top {
- background-color: #6688AA;
- color: white;
- margin-top: 4px;
- margin-bottom: 4px;
- padding-top: 0;
- padding-bottom: 0;
- text-transform: uppercase;
- font-family: Verdana, Arial, sans-serif;
- font-size: 8pt;
-}
-
-td.top a {
- font-family: Verdana, Arial, sans-serif;
- background-color: #6688AA;
- color: white;
- text-decoration: none;
- font-size: 10pt;
-}
-
-td#top-syslinks {
- text-align: right;
- vertical-align: bottom;
-}
-td.top-linkcollection {
- text-align: right;
-}
-/**
- * Overrides text justification (user preference)
- * See bug 31990
- */
-td.top-linkcollection #catlinks {
- text-align: right;
-}
-td.top-subheader {
- vertical-align: top;
-}
-td.bottom {
- font-family: Verdana, Arial, sans-serif;
- font-size: 10pt;
- padding: 0;
- text-align: center;
- vertical-align: bottom;
+#cb-ca-edit {
+ font-weight: bold;
}
#pagestats {
@@ -127,12 +80,7 @@ td.bottom {
font-size: 9pt;
}
-#sitesub {
- font-family: Verdana, Arial, sans-serif;
- font-size: 9pt; font-weight: bold;
- color: black;
- padding-top: 0;
-}
+
#quickbar {
font-family: Verdana, Arial, sans-serif;
@@ -149,7 +97,13 @@ td.bottom {
color: #446688;
}
-#quickbar h6 {
+/* Hide, but keep accessible for screen-readers */
+#mw-navigation h2 {
+ position: absolute;
+ top: -9999px;
+}
+
+#quickbar h3 {
font-family: Verdana, Arial, sans-serif;
font-size: 10pt;
font-weight: bold;
@@ -166,6 +120,14 @@ td.bottom {
margin-top: 0;
}
+#quickbar .portlet ul,
+#quickbar .portlet li {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ line-height: inherit;
+}
+
h1 {
color: #666666;
font-family: Verdana, Arial, sans-serif;
@@ -177,12 +139,12 @@ h1 .editsection {
font-size: 55.6%;
}
-h1.pagetitle {
+h1#firstHeading {
padding-bottom: 0;
margin-bottom: 0;
}
-#article p.subtitle {
+#article p.subtitle, #article p.subpages, #article p.tagline {
color: #666666;
font-size: 11pt;
font-weight: bold;
@@ -212,7 +174,7 @@ a.stub, #quickbar a.stub {
text-decoration: none;
}
-a.new, #quickbar a.new {
+a.new, #quickbar span.new a, #footer span.new a {
color: #CC2200;
}
@@ -227,3 +189,82 @@ small {
input.mw-searchInput {
width: 106px;
}
+
+/* Directionality-specific styles */
+#quickbar { position: absolute; left: 4px; }
+#article { margin-left: 148px; margin-right: 4px; }
+#footer { margin-left: 152px; }
+
+
+#sitetitle, #sitesub, #toplinks, #linkcollection {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+#sitetitle, #toplinks {
+ color: white;
+ text-transform: uppercase;
+ height: 32pt;
+}
+#sitetitle {
+ padding-left: 8px;
+ font-family: Times, serif;
+ font-weight: normal;
+ font-size: 32pt;
+ line-height: 32pt;
+ background-color: #6688AA;
+}
+#sitetitle a, #toplinks a {
+ color: white;
+ text-decoration: none;
+}
+/* Bring #sitetitle to top. Otherwise #toplinks is overlaid over it, making the link unclickable. */
+#sitetitle a {
+ position: relative;
+ z-index: 10
+}
+
+#toplinks {
+ font-family: Verdana, Arial, sans-serif;
+ position: absolute;
+ top: 0;
+ right: 8px;
+ width: 100%;
+ font-size: 8pt;
+}
+#toplinks a {
+ font-size: 10pt;
+}
+#toplinks p {
+ position: absolute;
+ right: 0;
+ margin: 0;
+ width: 100%;
+ text-align: right;
+}
+#toplinks #syslinks {
+ bottom: 0;
+}
+#toplinks #variantlinks {
+ bottom: 12pt;
+}
+
+#sitesub {
+ float: left;
+ margin-left: 8px;
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 9pt;
+ font-weight: bold;
+ color: black;
+}
+
+#linkcollection {
+ margin-top: 0.5em;
+ font-size: small;
+ margin-right: 8px;
+ text-align: right;
+}
+/* Override text justification (user preference), see bug 31990 */
+#linkcollection * {
+ text-align: right;
+}
diff --git a/skins/common/commonContent.css b/skins/common/commonContent.css
index 0fe8489e..a550d97a 100644
--- a/skins/common/commonContent.css
+++ b/skins/common/commonContent.css
@@ -1,6 +1,9 @@
-/*
-** MediaWiki style sheet for general styles on complex content
-*/
+/**
+ * MediaWiki style sheet for general styles on complex content
+ *
+ * Styles for complex things which are a standard part of page content
+ * (ie: the CSS classing built into the system), like the TOC.
+ */
/* Table of Contents */
#toc,
@@ -110,6 +113,16 @@ img.thumbborder {
}
/**
+ * Edit forms
+ */
+#editform textarea {
+ display: block;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+/**
* Basic styles for the user login and create account forms
*/
#userlogin, #userloginForm {
diff --git a/skins/common/commonElements.css b/skins/common/commonElements.css
index 02fd29fe..2fa0cbaf 100644
--- a/skins/common/commonElements.css
+++ b/skins/common/commonElements.css
@@ -1,6 +1,9 @@
/**
* MediaWiki style sheet for general styles on basic content elements
- * This style sheet is used by the monobook and vector skins
+ *
+ * Styles for basic elements: links, lists, etc...
+ *
+ * This style sheet is used by the Monobook and Vector skins.
*/
/* Links */
@@ -186,7 +189,7 @@ blockquote {
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 behaviour without forcing a different font.
+ * Specifying any valid, second value will trigger correct behavior without forcing a different font.
*/
font-family: monospace, Courier;
}
diff --git a/skins/common/commonInterface.css b/skins/common/commonInterface.css
index 60d6436b..af6665e4 100644
--- a/skins/common/commonInterface.css
+++ b/skins/common/commonInterface.css
@@ -1,6 +1,10 @@
-/*
-** MediaWiki style sheet for common core styles on interfaces
-*/
+/**
+ * MediaWiki style sheet for common core styles on interfaces
+ *
+ * Styles for the Monobook/Vector pattern of laying out common interfaces.
+ * These ids/classes are not built into the system,
+ * they are outputted by the actual MonoBook/Vector code by convention.
+ */
/* Categories */
.catlinks {
diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css
index 48dd943f..6cb213f2 100644
--- a/skins/common/commonPrint.css
+++ b/skins/common/commonPrint.css
@@ -125,7 +125,9 @@ li#privacy,
.mw-hidden-catlinks,
tr.mw-metadata-show-hide-extended,
span.mw-filepage-other-resolutions,
-#filetoc {
+#filetoc,
+.usermessage,
+#mw-navigation {
/* Hides all the elements irrelevant for printing */
display: none;
}
diff --git a/skins/common/config.css b/skins/common/config.css
index aa982d32..39206c3a 100644
--- a/skins/common/config.css
+++ b/skins/common/config.css
@@ -102,7 +102,6 @@
.config-settings-block {
list-style-type: none;
list-style-image: none;
- float: left;
margin: 0;
padding: 0;
}
diff --git a/skins/common/images/icons/fileicon-djvu.xcf b/skins/common/images/icons/fileicon-djvu.xcf
deleted file mode 100644
index 8043dcdb..00000000
--- a/skins/common/images/icons/fileicon-djvu.xcf
+++ /dev/null
Binary files differ
diff --git a/skins/common/images/icons/fileicon-ogg.xcf b/skins/common/images/icons/fileicon-ogg.xcf
deleted file mode 100644
index a91024bf..00000000
--- a/skins/common/images/icons/fileicon-ogg.xcf
+++ /dev/null
Binary files differ
diff --git a/skins/common/images/icons/fileicon-psd.png b/skins/common/images/icons/fileicon-psd.png
new file mode 100644
index 00000000..5bd40cb0
--- /dev/null
+++ b/skins/common/images/icons/fileicon-psd.png
Binary files differ
diff --git a/skins/common/shared.css b/skins/common/shared.css
index 8f771e9a..6e1c94fd 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -31,6 +31,12 @@
direction: rtl;
}
+/* User-Agent styles for new HTML5 elements */
+mark {
+ background-color: yellow;
+ color: black;
+}
+
/* Input types that should follow user direction, like buttons */
/* TODO: What about buttons in wikipage content ? */
input[type="submit"],
@@ -226,6 +232,9 @@ td.mw-label {
.prefsection table {
width: 100%;
}
+.prefsection table.mw-htmlform-matrix {
+ width: auto;
+}
td.mw-submit {
white-space: nowrap;
}
@@ -248,6 +257,11 @@ tr.mw-htmlform-vertical-label td.mw-label {
white-space: nowrap;
}
+.mw-htmlform-matrix td {
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+}
+
input#wpSummary {
width: 80%;
margin-bottom: 1em;
@@ -307,6 +321,11 @@ input#wpSummary {
padding-left: 0.25em;
border-left: none;
}
+
+/* (bug 5346) make category redirects italic */
+.catlinks li a.mw-redirect {
+ font-style: italic;
+}
/**
* Hidden categories
*/
@@ -448,6 +467,11 @@ th.mw-revdel-checkbox {
text-align: center;
}
+/* red links; see bug 36276 */
+a.new {
+ color: #BA0000;
+}
+
/* feed links */
a.feedlink {
/* @embed */
@@ -815,6 +839,7 @@ div.gallerytext {
/* Language specific height correction for titles. Ref Bug 29405 and Bug 30809 */
/* Languages like hi or ml require slightly more vertical space to show diacritics properly */
+h1:lang(anp),
h1:lang(as),
h1:lang(bh), /* Macrolanguage, used on bh.wikipedia.org, should be removed one day */
h1:lang(bho),
@@ -822,16 +847,22 @@ h1:lang(bn),
h1:lang(gu),
h1:lang(hi),
h1:lang(kn),
+h1:lang(ks),
h1:lang(ml),
h1:lang(mr),
h1:lang(my),
+h1:lang(mai),
+h1:lang(ne),
+h1:lang(new),
h1:lang(or),
h1:lang(pa),
+h1:lang(pi),
h1:lang(sa),
h1:lang(ta),
h1:lang(te) {
line-height: 1.6em !important;
}
+h2:lang(anp), h3:lang(anp), h4:lang(anp), h5:lang(anp), h6:lang(anp),
h2:lang(as), h3:lang(as), h4:lang(as), h5:lang(as), h6:lang(as),
h2:lang(bho), h3:lang(bho), h4:lang(bho), h5:lang(bho), h6:lang(bho),
h2:lang(bh), h3:lang(bh), h4:lang(bh), h5:lang(bh), h6:lang(bh),
@@ -839,11 +870,16 @@ h2:lang(bn), h3:lang(bn), h4:lang(bn), h5:lang(bn), h6:lang(bn),
h2:lang(gu), h3:lang(gu), h4:lang(gu), h5:lang(gu), h6:lang(gu),
h2:lang(hi), h3:lang(hi), h4:lang(hi), h5:lang(hi), h6:lang(hi),
h2:lang(kn), h3:lang(kn), h4:lang(kn), h5:lang(kn), h6:lang(kn),
+h2:lang(ks), h3:lang(ks), h4:lang(ks), h5:lang(ks), h6:lang(ks),
h2:lang(ml), h3:lang(ml), h4:lang(ml), h5:lang(ml), h6:lang(ml),
h2:lang(mr), h3:lang(mr), h4:lang(mr), h5:lang(mr), h6:lang(mr),
h2:lang(my), h3:lang(my), h4:lang(my), h5:lang(my), h6:lang(my),
+h2:lang(mai), h3:lang(mai), h4:lang(mai), h5:lang(mai), h6:lang(mai),
+h2:lang(ne), h3:lang(ne), h4:lang(ne), h5:lang(ne), h6:lang(ne),
+h2:lang(new), h3:lang(new), h4:lang(new), h5:lang(new), h6:lang(new),
h2:lang(or), h3:lang(or), h4:lang(or), h5:lang(or), h6:lang(or),
h2:lang(pa), h3:lang(pa), h4:lang(pa), h5:lang(pa), h6:lang(pa),
+h2:lang(pi), h3:lang(pi), h4:lang(pi), h5:lang(pi), h6:lang(pi),
h2:lang(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa),
h2:lang(ta), h3:lang(ta), h4:lang(ta), h5:lang(ta), h6:lang(ta),
h2:lang(te), h3:lang(te), h4:lang(te), h5:lang(te), h6:lang(te) {
@@ -1057,8 +1093,8 @@ table.floatleft {
}
.editsection, .toctoggle {
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
}
diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js
index 05efb4a9..709cc334 100644
--- a/skins/common/wikibits.js
+++ b/skins/common/wikibits.js
@@ -91,10 +91,9 @@ window.importStylesheet = function( page ) {
window.importStylesheetURI = function( url, media ) {
var l = document.createElement( 'link' );
- l.type = 'text/css';
l.rel = 'stylesheet';
l.href = url;
- if( media ) {
+ if ( media ) {
l.media = media;
}
document.getElementsByTagName('head')[0].appendChild( l );
diff --git a/skins/modern/main.css b/skins/modern/main.css
index 7149551f..f201209d 100644
--- a/skins/modern/main.css
+++ b/skins/modern/main.css
@@ -58,6 +58,7 @@ body {
font-variant: small-caps;
}
+#p-personal h3,
#p-personal h5 {
display: none;
}
@@ -125,6 +126,12 @@ body {
background-color: #f0f0f0;
}
+/* Hide, but keep accessible for screen-readers */
+#mw_portlets h2 {
+ position: absolute;
+ top: -9999px;
+}
+
#mw_main {
padding: 0 0 0 0;
margin: 0 0 0 0;
@@ -150,6 +157,11 @@ textarea {
width: 100%;
padding: .1em;
}
+#editform textarea {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
#searchBody {
text-align: center;
@@ -165,11 +177,13 @@ textarea {
margin-top: .4em;
}
+.portlet h3,
.portlet h5 {
padding: 0.1em 0 0.3em 1em;
margin: 0 0 0 0;
background-color: #dddddd;
font-weight: bold;
+ font-size: 0.83em;
border-bottom: solid 1px #3c78b5;
height: 1.1em;
}
@@ -238,6 +252,7 @@ ul {
color: white;
}
+#p-cactions h3,
#p-cactions h5 {
display: none;
}
diff --git a/skins/monobook/main.css b/skins/monobook/main.css
index 5866d97d..4cbc0939 100644
--- a/skins/monobook/main.css
+++ b/skins/monobook/main.css
@@ -24,6 +24,11 @@ div#content {
div#column-one {
padding-top: 160px;
}
+/* Hide, but keep accessible for screen-readers */
+#column-one h2 {
+ position: absolute;
+ top: -9999px;
+}
div#content {
background: white;
color: black;
@@ -71,6 +76,7 @@ a.new,
}
ul {
+ list-style-type: square;
/* @embed */
list-style-image: url(bullet.gif);
}
@@ -224,12 +230,7 @@ table.rimage {
width: 11.6em;
overflow: hidden;
}
-.portlet h4 {
- font-size: 95%;
- font-weight: normal;
- white-space: nowrap;
-}
-.portlet h5 {
+.portlet h3 {
background: transparent;
padding: 0 1em 0 .5em;
display: inline;
@@ -239,18 +240,6 @@ table.rimage {
font-weight: normal;
white-space: nowrap;
}
-.portlet h6 {
- background: #ffae2e;
- border: 1px solid #2f6fab;
- border-style: solid solid none solid;
- padding: 0 1em 0 1em;
- text-transform: lowercase;
- display: block;
- font-size: 1em;
- height: 1.2em;
- font-weight: normal;
- white-space: nowrap;
-}
.pBody {
font-size: 95%;
background-color: white;
@@ -259,18 +248,8 @@ table.rimage {
border: 1px solid #aaa;
padding: 0 .8em .3em .5em;
}
-.portlet h1,
-.portlet h2,
-.portlet h3,
-.portlet h4 {
- margin: 0;
- padding: 0;
-}
.portlet ul {
line-height: 1.5em;
- list-style-type: square;
- /* @embed */
- list-style-image: url(bullet.gif);
font-size: 95%;
}
.portlet li {
@@ -291,7 +270,7 @@ table.rimage {
width: 12em;
overflow: visible;
}
-#p-logo h5 {
+#p-logo h3 {
display: none;
}
#p-logo a,
@@ -352,7 +331,7 @@ input.searchButton {
overflow: visible;
line-height: 1.2em;
}
-#p-personal h5 {
+#p-personal h3 {
display: none;
}
#p-personal .portlet,
@@ -372,7 +351,8 @@ input.searchButton {
padding: 0 2em 0 3em;
margin: 0;
text-align: right;
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
z-index: 0;
background: none;
cursor: default;
@@ -432,11 +412,11 @@ li#pt-login {
background: none;
border-collapse: collapse;
padding-left: 1em;
- list-style: none;
font-size: 95%;
}
#p-cactions ul {
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
}
#p-cactions li {
display: inline;
@@ -474,7 +454,7 @@ li#pt-login {
text-decoration: none;
background-color: white;
}
-#p-cactions h5 {
+#p-cactions h3 {
display: none;
}
#p-cactions li.istalk {
@@ -515,8 +495,7 @@ li#ca-print {
}
/* Override text-transform on languages where capitalization is significant */
-.capitalize-all-nouns .portlet h5,
-.capitalize-all-nouns .portlet h6,
+.capitalize-all-nouns .portlet h3,
.capitalize-all-nouns #p-personal ul,
.capitalize-all-nouns #p-cactions ul li a {
text-transform: none;
@@ -824,7 +803,8 @@ div#searchTarget {
}
div#searchTarget ul li {
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
}
div#searchTarget ul li:before {
diff --git a/skins/simple/main.css b/skins/simple/main.css
index 7b4f2ae5..edb1d7d4 100644
--- a/skins/simple/main.css
+++ b/skins/simple/main.css
@@ -84,6 +84,12 @@ a:hover {
left: 0;
}
+/* Hide, but keep accessible for screen-readers */
+#column-one h2 {
+ position: absolute;
+ top: -9999px;
+}
+
body {
margin: 0;
padding: 0;
diff --git a/skins/vector/images/border.png b/skins/vector/images/border.png
deleted file mode 100644
index f9ca8cc3..00000000
--- a/skins/vector/images/border.png
+++ /dev/null
Binary files differ
diff --git a/skins/vector/images/page-base.png b/skins/vector/images/page-base.png
deleted file mode 100644
index b3ecd30d..00000000
--- a/skins/vector/images/page-base.png
+++ /dev/null
Binary files differ
diff --git a/skins/vector/images/preferences-base.png b/skins/vector/images/preferences-base.png
deleted file mode 100644
index 8e0082b1..00000000
--- a/skins/vector/images/preferences-base.png
+++ /dev/null
Binary files differ
diff --git a/skins/vector/images/preferences-edge.png b/skins/vector/images/preferences-edge.png
deleted file mode 100644
index 411a1aaa..00000000
--- a/skins/vector/images/preferences-edge.png
+++ /dev/null
Binary files differ
diff --git a/skins/vector/screen.css b/skins/vector/screen.css
index 4069d9e4..2e09ee17 100644
--- a/skins/vector/screen.css
+++ b/skins/vector/screen.css
@@ -21,22 +21,26 @@ body {
font-size: 1em;
}
body {
- background-color: #f3f3f3;
- /* @embed */
- background-image: url(images/page-base.png);
+ background-color: #f6f6f6;
}
/* Content */
div#content {
margin-left: 10em;
padding: 1em;
- /* @embed */
- background-image: url(images/border.png);
- background-position: top left;
- background-repeat: repeat-y;
+ /* Border on top, left, and bottom side */
+ border: 1px solid #a7d7f9;
+ border-right-width: 0;
+ /* Merge the border with tabs' one (in their background image) */
+ margin-top: -1px;
background-color: white;
color: black;
direction: ltr;
}
+/* Hide, but keep accessible for screen-readers */
+#mw-navigation h2 {
+ position: absolute;
+ top: -9999px;
+}
/* Head */
#mw-page-base {
height: 5em;
@@ -50,10 +54,6 @@ div#content {
margin-top: -5em;
margin-left: 10em;
height: 5em;
- /* @embed */
- background-image: url(images/border.png);
- background-position: bottom left;
- background-repeat: repeat-x;
}
div#mw-head {
position: absolute;
@@ -61,6 +61,7 @@ div#mw-head {
right: 0;
width: 100%;
}
+div#mw-head h3,
div#mw-head h5 {
margin: 0;
padding: 0;
@@ -74,12 +75,16 @@ div.emptyPortlet {
position: absolute;
top: 0.33em;
right: 0.75em;
+ /* Display on top of page tabs - bug 37158 */
+ z-index: 1;
}
+#p-personal h3,
#p-personal h5 {
display: none;
}
#p-personal ul {
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
margin: 0;
padding-left: 10em; /* Keep from overlapping logo */
}
@@ -106,7 +111,9 @@ div.emptyPortlet {
margin-top: 2.5em;
}
/* Navigation Labels */
+div.vectorTabs h3,
div.vectorTabs h5,
+div.vectorMenu h3 span,
div.vectorMenu h5 span {
display: none;
}
@@ -129,7 +136,8 @@ div.vectorTabs ul {
}
div.vectorTabs ul {
height: 100%;
- list-style: none;
+ list-style-type: none;
+ list-style-image: none;
margin: 0;
padding: 0;
}
@@ -226,6 +234,7 @@ body.rtl div.vectorMenu {
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
/* @noflip */
+div#mw-head div.vectorMenu h3,
div#mw-head div.vectorMenu h5 {
float: left;
/* @embed */
@@ -233,15 +242,18 @@ div#mw-head div.vectorMenu h5 {
background-repeat: no-repeat;
}
/* This will be flipped - unlike the one above it */
+div#mw-head div.vectorMenu h3,
div#mw-head div.vectorMenu h5 {
background-position: bottom left;
margin-left: -1px;
}
/* IGNORED BY IE6 */
+div#mw-head div.vectorMenu > h3,
div#mw-head div.vectorMenu > h5 {
background-image: none;
}
-div#mw-head div.vectorMenu h4 {
+div#mw-head div.vectorMenu h4,
+div.vectorMenu#p-variants #mw-vector-current-variant {
display: inline-block;
float: left;
font-size: 0.8em;
@@ -252,20 +264,23 @@ div#mw-head div.vectorMenu h4 {
}
/* OVERRIDDEN BY COMPLIANT BROWSERS */
/* @noflip */
+div.vectorMenu h3 a,
div.vectorMenu h5 a {
display: inline-block;
width: 24px;
- height: 2.5em;
+ height: 1.9em;
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 h3 a,
div.vectorMenu h5 a {
background-position: bottom right;
}
/* IGNORED BY IE6 */
+div.vectorMenu h3 > a,
div.vectorMenu h5 > a {
display: block;
}
@@ -302,9 +317,8 @@ div.vectorMenu ul {
background-color: white;
border: solid 1px silver;
border-top-width: 0;
- list-style: none;
- list-style-image: none;
list-style-type: none;
+ list-style-image: none;
padding: 0;
margin: 0;
margin-left: -1px;
@@ -346,6 +360,7 @@ div.vectorMenu li.selected a:visited {
text-decoration: none;
}
/* Search */
+#p-search h3,
#p-search h5 {
display: none;
}
@@ -399,6 +414,12 @@ div#simpleSearch input.placeholder {
div#simpleSearch input::-webkit-input-placeholder {
color: #999;
}
+div#simpleSearch input:-moz-placeholder {
+ color: #999;
+}
+div#simpleSearch input:-ms-input-placeholder {
+ color: #999;
+}
div#simpleSearch input#searchInput {
position: absolute;
top: 0;
@@ -457,6 +478,7 @@ div#mw-panel div.portal {
padding-bottom: 1.5em;
direction: ltr;
}
+div#mw-panel div.portal h3,
div#mw-panel div.portal h5 {
font-weight: normal;
color: #444;
@@ -477,9 +499,8 @@ div#mw-panel div.portal div.body {
background-position: top left;
}
div#mw-panel div.portal div.body ul {
- list-style: none;
- list-style-image: none;
list-style-type: none;
+ list-style-image: none;
padding: 0;
margin: 0;
}
@@ -502,16 +523,11 @@ 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;
+ list-style-image: none;
margin: 0;
padding: 0;
}
@@ -629,9 +645,7 @@ div#footer #footer-places li {
margin-top: -2px;
clear: both;
border: solid 1px #ccc;
- background-color: #f9f9f9;
- /* @embed */
- background-image: url(images/preferences-base.png);
+ background-color: #fafafa;
}
#preferences fieldset {
border: none;
@@ -679,6 +693,7 @@ div#content {
}
ul {
+ list-style-type: disc;
/* @embed */
list-style-image: url(images/bullet-icon.png);
}
diff --git a/skins/vector/vector.js b/skins/vector/vector.js
index 8b719e5b..4427d9a3 100644
--- a/skins/vector/vector.js
+++ b/skins/vector/vector.js
@@ -4,7 +4,7 @@
jQuery( function ( $ ) {
$( 'div.vectorMenu' ).each( function () {
var $el = $( this );
- $el.find( 'h5:first a:first' )
+ $el.find( 'h3:first a:first' )
// For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
.click( function ( e ) {
$el.find( '.menu:first' ).toggleClass( 'menuForceShow' );