mirror of
https://github.com/Hutchy68/pivot.git
synced 2024-11-24 19:39:04 +01:00
Merge pull request #5 from Hutchy68/codecleanup
Code fixes, cleanup, introduces unused $cache, but it is needed by MW for cached data
This commit is contained in:
commit
a98d04e3ac
@ -1,70 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internationalization file for skin Pivot.
|
* This is a backwards-compatibility shim, generated by:
|
||||||
|
* https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
|
||||||
*
|
*
|
||||||
* @file
|
* Beginning with MediaWiki 1.23, translation strings are stored in json files,
|
||||||
* @ingroup Skins
|
* and the EXTENSION.i18n.php file only exists to provide compatibility with
|
||||||
|
* older releases of MediaWiki. For more information about this migration, see:
|
||||||
|
* https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
|
||||||
|
*
|
||||||
|
* This shim maintains compatibility back to MediaWiki 1.17.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
|
if ( !function_exists( 'wfJsonI18nShimd9f8f6c360c3cca9' ) ) {
|
||||||
|
function wfJsonI18nShimd9f8f6c360c3cca9( $cache, $code, &$cachedData ) {
|
||||||
|
$codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
|
||||||
|
foreach ( $codeSequence as $csCode ) {
|
||||||
|
$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
|
||||||
|
if ( is_readable( $fileName ) ) {
|
||||||
|
$data = FormatJson::decode( file_get_contents( $fileName ), true );
|
||||||
|
foreach ( array_keys( $data ) as $key ) {
|
||||||
|
if ( $key === '' || $key[0] === '@' ) {
|
||||||
|
unset( $data[$key] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
|
||||||
|
}
|
||||||
|
|
||||||
/** English
|
$cachedData['deps'][] = new FileDependency( $fileName );
|
||||||
* @author Garrick Van Buren
|
}
|
||||||
*/
|
return true;
|
||||||
$messages['en'] = array(
|
}
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'A mobile skin which "Pivots" seamlessly to any size display.',
|
|
||||||
'pivot-browsermsg' => 'may not look as expected in this version of Internet Explorer. We recommend you upgrade to a newer version of Internet Explorer or switch to a browser like Firefox or Chrome.',
|
|
||||||
'pivot-menutitle' => 'Menu'
|
|
||||||
);
|
|
||||||
|
|
||||||
/** German (Deutsch)
|
$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nShimd9f8f6c360c3cca9';
|
||||||
* @author Kghbln
|
}
|
||||||
*/
|
|
||||||
$messages['de'] = array(
|
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'Stellt eine Benutzeroberfläche bereit, die die Inhalte des Wikis betont',
|
|
||||||
'pivot-browsermsg' => 'sieht in dieser Version des Internet Explorers nicht wie gewünscht aus. Es wird ein Upgrade des Internet Explorers oder der Umstieg auf einen Browser wie Firefox oder Chrome empfohlen.',
|
|
||||||
'pivot-menutitle' => 'Menü'
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Spanish (español)
|
|
||||||
* @author Manuel Rubio
|
|
||||||
*/
|
|
||||||
$messages['es'] = array(
|
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'Provee una plantilla que se centra en resaltar en primer plano el contenido.',
|
|
||||||
'pivot-browsermsg' => 'puede verse diferente a lo esperado en esta versión de Internet Explorer le recomendamos que se actualice a una versión más reciente, o cambie a un navegador como Firefox o Chrome.',
|
|
||||||
'pivot-menutitle' => 'Menu'
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Dutch (nederlands)
|
|
||||||
* @author Marijke Stuivenberg
|
|
||||||
*/
|
|
||||||
$messages['nl'] = array(
|
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'Biedt een uiterlijk dat er voor zorgt dat de inhoud op de voorgrond wordt weergegeven',
|
|
||||||
'pivot-browsermsg' => 'wordt mogelijk niet goed weergegeven in deze versie van Internet Explorer. Aanbevolen wordt te upgraden naar een nieuwere versie van Internet Explorer of om te schakelen naar een browser zoals Firefox of Chrome.',
|
|
||||||
'pivot-menutitle' => 'Menu'
|
|
||||||
);
|
|
||||||
|
|
||||||
/** Arabic
|
|
||||||
* @author النعيمي باشا
|
|
||||||
*/
|
|
||||||
$messages['ar'] = array(
|
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'نوفر مظهر يركز على وضع محتواك في المقدمة',
|
|
||||||
'pivot-browsermsg' => 'ربما يظهر بشكل غير مقبول في هذه النسخة من انترنت اكسبلورر. ننصحك بالترقية إلى إصدار أحدث لانترنت اكسبلورر أو التغير إلى متصفح مثل فايرفوكس أو كروم.',
|
|
||||||
'pivot-menutitle' => 'قائمة'
|
|
||||||
);
|
|
||||||
|
|
||||||
/** French
|
|
||||||
* @author MATsxm
|
|
||||||
*/
|
|
||||||
$messages['fr'] = array(
|
|
||||||
'skinname-pivot' => 'Pivot',
|
|
||||||
'pivot-desc' => 'Un skin pour mobiles qui permet un affichage du contenu pour tous types d\'affichages.',
|
|
||||||
'pivot-browsermsg' => 'l\'affichage sur cette version d\'Internet Explorer peut être altéré. Nous vous recommandons de la mettre à jour niveau vers une version plus récente d\Internet Explorer ou de passer à un autre navigateur tel que Firefox ou Chrome.',
|
|
||||||
'pivot-menutitle' => 'Menu'
|
|
||||||
);
|
|
||||||
|
@ -79,14 +79,10 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
}
|
}
|
||||||
switch ($wgPivotFeatures['showFooterIcons']) {
|
switch ($wgPivotFeatures['showFooterIcons']) {
|
||||||
case true:
|
case true:
|
||||||
$footerLeftClass = 'small-12 medium-8 large-9 columns';
|
|
||||||
$footerRightClass = 'small-12 medium-4 large-3 columns';
|
|
||||||
$poweredbyType = "icononly";
|
$poweredbyType = "icononly";
|
||||||
$poweredbyMakeType = 'withImage';
|
$poweredbyMakeType = 'withImage';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$footerLeftClass = 'small-12 medium-8 large-9 columns';
|
|
||||||
$footerRightClass = 'small-12 medium-4 large-3 columns';
|
|
||||||
$poweredbyType = "nocopyright";
|
$poweredbyType = "nocopyright";
|
||||||
$poweredbyMakeType = 'withoutImage';
|
$poweredbyMakeType = 'withoutImage';
|
||||||
break;
|
break;
|
||||||
@ -239,14 +235,14 @@ class pivotTemplate extends BaseTemplate {
|
|||||||
<footer class="row">
|
<footer class="row">
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div id="footer-left" class="<?php echo $footerLeftClass;?>">
|
<div id="footer-left" class="small-12 medium-8 large-9 columns">
|
||||||
<ul id="footer-left">
|
<ul id="footer-left">
|
||||||
<?php foreach ($this->getFooterLinks("flat") as $key) { ?>
|
<?php foreach ($this->getFooterLinks("flat") as $key) { ?>
|
||||||
<li id="footer-<?php echo $key ?>"><?php $this->html($key) ?></li>
|
<li id="footer-<?php echo $key ?>"><?php $this->html($key) ?></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer-right-icons" class="<?php echo $footerRightClass;?>">
|
<div id="footer-right-icons" class="small-12 medium-4 large-3 columns">
|
||||||
<ul id="footer-right">
|
<ul id="footer-right">
|
||||||
<li class="social-follow">
|
<li class="social-follow">
|
||||||
<?php if ($wgPivotFeatures['useAddThisFollow'] != false) { ?>
|
<?php if ($wgPivotFeatures['useAddThisFollow'] != false) { ?>
|
||||||
|
@ -2,6 +2,8 @@ body { line-height: 1.6em; font-size: 16px; }
|
|||||||
|
|
||||||
p, ul, ol, dl { font-size: 16px; }
|
p, ul, ol, dl { font-size: 16px; }
|
||||||
|
|
||||||
|
h4,h5,h6 {color: 2e2e2e;}
|
||||||
|
|
||||||
#toc ul, .toc ul { font-size: 16px; }
|
#toc ul, .toc ul { font-size: 16px; }
|
||||||
|
|
||||||
@media only screen and (min-width: 40.0625em) {
|
@media only screen and (min-width: 40.0625em) {
|
||||||
@ -10,7 +12,7 @@ p, ul, ol, dl { font-size: 14px; }
|
|||||||
#toc ul, .toc ul { font-size: 13.3px; }
|
#toc ul, .toc ul { font-size: 13.3px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
p, table { margin-bottom: 1em; max-width: 100%; }
|
p, table { border: none; margin-bottom: 1em; max-width: 100%; }
|
||||||
|
|
||||||
|
|
||||||
a.label:hover,
|
a.label:hover,
|
||||||
@ -77,10 +79,18 @@ body.action-formedit .row.hide-on-form-edit { display: none;}
|
|||||||
#p-cactions > a.button {
|
#p-cactions > a.button {
|
||||||
float:right; }
|
float:right; }
|
||||||
|
|
||||||
|
/* Fix scaling issue for menu icon */
|
||||||
|
@media only screen and (min-width: 40.0625em) {
|
||||||
|
#drop .fa.fa-navicon.fa-lg {
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
span#page-actions {
|
span#page-actions {
|
||||||
font-size: .75em;
|
font-size: 0.85em;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
vertical-align: top;
|
vertical-align: middle;
|
||||||
|
padding:0 0 0 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure top bar is even more z-indx! */
|
/* Make sure top bar is even more z-indx! */
|
||||||
@ -98,9 +108,6 @@ color: #eee;
|
|||||||
section.middle.tab-bar-section a {
|
section.middle.tab-bar-section a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
ul.off-canvas-list form#searchform {
|
|
||||||
margin: 1em;
|
|
||||||
}
|
|
||||||
ul.off-canvas-list form#searchform-offcanvas {
|
ul.off-canvas-list form#searchform-offcanvas {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
}
|
}
|
||||||
@ -211,15 +218,12 @@ ul#drop1.f-dropdown {
|
|||||||
color: #222;
|
color: #222;
|
||||||
border-bottom: 1px solid #eee;
|
border-bottom: 1px solid #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mw-content-ltr ul {
|
.mw-content-ltr ul {
|
||||||
margin: .5em 0 1em 2em;
|
margin: .5em 0 1em 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul.accordion {
|
ul.accordion {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.columns ul.special li {
|
.columns ul.special li {
|
||||||
float:none;
|
float:none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -321,6 +325,22 @@ li.social-follow {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix Tables on narrow pages for Special Pages and Category Pages */
|
||||||
|
@media screen and (max-width:782px) {
|
||||||
|
.ns-14 #mw-subcategories table td,
|
||||||
|
.ns-14 #mw-pages table td,
|
||||||
|
.ns--1 table.mw-specialpages-table td {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.ns-14 table,
|
||||||
|
.ns--1 table {
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.ns-14 table ul,
|
||||||
|
.ns--1 table ul {
|
||||||
|
margin: 0 0 0 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* TABS */
|
/* TABS */
|
||||||
|
|
||||||
@ -852,7 +872,7 @@ body.mw-special-Userlogin h2.title {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Aside CSS */
|
/* Aside CSS */
|
||||||
ul.off-canvas-list input#searchInput,
|
ul.off-canvas-list input#searchInput-offcanvas,
|
||||||
ul.off-canvas-list button.button.search {
|
ul.off-canvas-list button.button.search {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -875,7 +895,8 @@ ul.side-nav .button {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
ul.side-nav input[type="search"] {
|
ul.side-nav input[type="search"] {
|
||||||
height: 2.1em;
|
height: 1.9rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.side-nav li a:not(.button) {
|
.side-nav li a:not(.button) {
|
||||||
padding: 0 0 0 .5em;
|
padding: 0 0 0 .5em;
|
||||||
@ -898,8 +919,9 @@ ul.off-canvas-list li a:hover {
|
|||||||
background: #f1f0ff;
|
background: #f1f0ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-nav li a:not(.button):hover {
|
.side-nav li a:not(.button):hover,
|
||||||
background: #eeffee;
|
.side-nav li a:not(.button):focus {
|
||||||
|
background: transparent;
|
||||||
color: #0b0080;
|
color: #0b0080;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -915,7 +937,6 @@ body {
|
|||||||
}
|
}
|
||||||
li.name.logo {
|
li.name.logo {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
display: table;
|
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
@ -1146,3 +1167,14 @@ td.htmlform-tip {
|
|||||||
.orbit-bullets {
|
.orbit-bullets {
|
||||||
margin: 0 auto 30px auto !important;
|
margin: 0 auto 30px auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Block-Grid UL fixes */
|
||||||
|
ul[class*="block-grid"] {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* WikiEditor Label Fix */
|
||||||
|
.wikiEditor-ui-toolbar .label {
|
||||||
|
background: transparent;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
11
i18n/ar.json
Normal file
11
i18n/ar.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"النعيمي باشا"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "نوفر مظهر يركز على وضع محتواك في المقدمة",
|
||||||
|
"pivot-browsermsg": "ربما يظهر بشكل غير مقبول في هذه النسخة من انترنت اكسبلورر. ننصحك بالترقية إلى إصدار أحدث لانترنت اكسبلورر أو التغير إلى متصفح مثل فايرفوكس أو كروم.",
|
||||||
|
"pivot-menutitle": "قائمة"
|
||||||
|
}
|
11
i18n/de.json
Normal file
11
i18n/de.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"Kghbln"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "Stellt eine Benutzeroberfläche bereit, die die Inhalte des Wikis betont",
|
||||||
|
"pivot-browsermsg": "sieht in dieser Version des Internet Explorers nicht wie gewünscht aus. Es wird ein Upgrade des Internet Explorers oder der Umstieg auf einen Browser wie Firefox oder Chrome empfohlen.",
|
||||||
|
"pivot-menutitle": "Menü"
|
||||||
|
}
|
11
i18n/en.json
Normal file
11
i18n/en.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"Garrick Van Buren"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "A mobile skin which \"Pivots\" seamlessly to any size display.",
|
||||||
|
"pivot-browsermsg": "may not look as expected in this version of Internet Explorer. We recommend you upgrade to a newer version of Internet Explorer or switch to a browser like Firefox or Chrome.",
|
||||||
|
"pivot-menutitle": "Menu"
|
||||||
|
}
|
11
i18n/es.json
Normal file
11
i18n/es.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"Manuel Rubio "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "Provee una plantilla que se centra en resaltar en primer plano el contenido.",
|
||||||
|
"pivot-browsermsg": "puede verse diferente a lo esperado en esta versión de Internet Explorer le recomendamos que se actualice a una versión más reciente, o cambie a un navegador como Firefox o Chrome.",
|
||||||
|
"pivot-menutitle": "Menu"
|
||||||
|
}
|
11
i18n/fr.json
Normal file
11
i18n/fr.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"MATsxm"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "Un skin pour mobiles qui permet un affichage du contenu pour tous types d'affichages.",
|
||||||
|
"pivot-browsermsg": "l'affichage sur cette version d'Internet Explorer peut être altéré. Nous vous recommandons de la mettre à jour niveau vers une version plus récente d\\Internet Explorer ou de passer à un autre navigateur tel que Firefox ou Chrome.",
|
||||||
|
"pivot-menutitle": "Menu"
|
||||||
|
}
|
11
i18n/nl.json
Normal file
11
i18n/nl.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"@metadata": {
|
||||||
|
"authors": [
|
||||||
|
"Marijke Stuivenberg"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"skinname-pivot": "Pivot",
|
||||||
|
"pivot-desc": "Biedt een uiterlijk dat er voor zorgt dat de inhoud op de voorgrond wordt weergegeven",
|
||||||
|
"pivot-browsermsg": "wordt mogelijk niet goed weergegeven in deze versie van Internet Explorer. Aanbevolen wordt te upgraden naar een nieuwere versie van Internet Explorer of om te schakelen naar een browser zoals Firefox of Chrome.",
|
||||||
|
"pivot-menutitle": "Menu"
|
||||||
|
}
|
@ -3,15 +3,16 @@
|
|||||||
/**
|
/**
|
||||||
* Pivot Skin
|
* Pivot Skin
|
||||||
*
|
*
|
||||||
* @file
|
* @file Since Version 1.0
|
||||||
* @ingroup Skins
|
* @ingroup Skins
|
||||||
* @author Garrick Van Buren, Jamie Thingelstad
|
* @author Garrick Van Buren, Jamie Thingelstad
|
||||||
|
* @author Tom Hutchison
|
||||||
* @license 2-clause BSD
|
* @license 2-clause BSD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined('MEDIAWIKI'))
|
if ( ! defined('MEDIAWIKI'))
|
||||||
{
|
{
|
||||||
die("Wiki Wonders What You're Doing");
|
die("Not Directly Called So What Are You Doing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -31,6 +32,8 @@ $wgValidSkinNames['pivot'] = 'Pivot';
|
|||||||
|
|
||||||
$wgAutoloadClasses['SkinPivot'] = __DIR__.'/Pivot.skin.php';
|
$wgAutoloadClasses['SkinPivot'] = __DIR__.'/Pivot.skin.php';
|
||||||
|
|
||||||
|
$wgMessagesDirs['SkinPivot'] = __DIR__ . '/i18n';
|
||||||
|
|
||||||
$wgExtensionMessagesFiles['SkinPivot'] = __DIR__ . '/Pivot.i18n.php';
|
$wgExtensionMessagesFiles['SkinPivot'] = __DIR__ . '/Pivot.i18n.php';
|
||||||
|
|
||||||
$wgResourceModules['skins.pivot'] = array(
|
$wgResourceModules['skins.pivot'] = array(
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pivot Skin
|
||||||
|
*
|
||||||
|
* @file Builds the Sidebar reducing code duplication
|
||||||
|
* @since Version 1.0
|
||||||
|
* @ingroup Skins
|
||||||
|
* @author Tom Hutchison
|
||||||
|
* @license 2-clause BSD
|
||||||
|
*/
|
||||||
|
|
||||||
if ( ! defined('MEDIAWIKI'))
|
if ( ! defined('MEDIAWIKI'))
|
||||||
{
|
{
|
||||||
die("Wiki Wonders What You're Doing");
|
die("Not Directly Called So What Are You Doing?");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->getSidebar() as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { ?>
|
foreach ($this->getSidebar() as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user