1
0
mirror of https://github.com/Hutchy68/pivot.git synced 2024-11-22 02:19:03 +01:00

Merge pull request #13 from Hutchy68/wfLoadSkin

Wf load skin
This commit is contained in:
Tom Hutchison 2017-03-12 16:55:02 -04:00 committed by GitHub
commit 895feed17a
18 changed files with 3173 additions and 2115 deletions

View File

@ -1 +1,3 @@
1.0.0
## Version 1.0.0
* Initial release of Pivot skin for MediaWiki

28
COPYING Normal file
View File

@ -0,0 +1,28 @@
Copyright (c) 2016-2017, Tom Hutchison All rights reserved.
Foreground Original Copyright Notice as stated below:
Copyright (c) 2013, Garrick Van Buren, Jamie Thingelstad All rights
reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1) Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -8,7 +8,7 @@
*/
class Skinpivot extends SkinTemplate {
class SkinPivot extends SkinTemplate {
public $skinname = 'pivot', $stylename = 'pivot', $template = 'pivotTemplate', $useHeadElement = true;
public function setupSkinUserCss(OutputPage $out) {
@ -17,6 +17,7 @@ class Skinpivot extends SkinTemplate {
$wgPivotFeaturesDefaults = array(
'showActionsForAnon' => true,
'fixedNavBar' => false,
'usePivotTabs' => false,
'showHelpUnderTools' => true,
'showRecentChangesUnderTools' => true,
'wikiName' => &$GLOBALS['wgSitename'],
@ -42,7 +43,7 @@ class Skinpivot extends SkinTemplate {
header('X-UA-Compatible: IE=edge');
break;
}
$out->addModuleStyles('skins.pivot');
$out->addModuleStyles('skins.pivot.styles');
}
public function initPage(OutputPage $out) {
@ -51,7 +52,7 @@ class Skinpivot extends SkinTemplate {
$viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0';
$out->addMeta('viewport', $viewport_meta);
$out->addModuleScripts('skins.pivot');
$out->addModuleScripts('skins.pivot.js');
}
}
@ -93,7 +94,7 @@ class pivotTemplate extends BaseTemplate {
<div class="off-canvas-wrap docs-wrap" data-offcanvas="">
<div class="inner-wrap">
<?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "<div class='fixed'>"; ?>
<nav class="tab-bar">
<nav class="tab-bar hide-for-print">
<section id="left-nav-aside" class="left-small show-for-small">
<a class="left-off-canvas-toggle"><span id="menu-user"><i class="fa fa-navicon fa-lg"></i></span></a>
</section>
@ -126,7 +127,7 @@ class pivotTemplate extends BaseTemplate {
</form>
</li>
<?php include(__DIR__.'/view/sidebar.php'); ?>
<?php $this->renderSidebar() ?>
</ul>
</aside>
@ -155,11 +156,11 @@ class pivotTemplate extends BaseTemplate {
<div class="row">
<div id="sidebar" class="large-2 medium-3 columns hide-for-small">
<div id="sidebar" class="large-2 medium-3 columns hide-for-small hide-for-print">
<ul class="side-nav">
<li class="name logo">
<a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>">
<img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 100%;height:auto;display: inline-block; vertical-align:middle;text-align:center;"></a>
<img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 100%;height: auto;display: inline-block; vertical-align: middle;"></a>
</li>
<li class="has-form">
<form action="/w/index.php" id="searchform" class="mw-search">
@ -171,7 +172,7 @@ class pivotTemplate extends BaseTemplate {
</form>
</li>
<?php include(__DIR__.'/view/sidebar.php'); ?>
<?php $this->renderSidebar() ?>
</ul>
</div>
@ -189,10 +190,10 @@ class pivotTemplate extends BaseTemplate {
</div>
<?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?>
<a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up">&nbsp;<?php echo wfMessage( 'actions' )->text() ?></span></i></a>
<a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right hide-for-print" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up">&nbsp;<?php echo wfMessage( 'actions' )->text() ?></span></i></a>
<ul id="drop1" class="tiny content f-dropdown" data-dropdown-content>
<?php foreach($this->data['content_actions'] as $key => $item) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'),'',$this->makeListItem($key, $item)); } ?>
<?php wfRunHooks(SkinTemplateToolboxEnd, array(&$this, true)); ?>
<?php foreach($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'),'',$this->makeListItem($key, $tab)); } ?>
<?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true )); ?>
</ul>
<?php if ($wgUser->isLoggedIn()): ?>
<div id="echo-notifications"></div>
@ -208,7 +209,7 @@ class pivotTemplate extends BaseTemplate {
<h2 class="title"><?php print $displaytitle; ?></h2>
<?php if ($wgPivotFeatures['useAddThisShare'] != false) { ?>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_sharing_toolbox show-for-large-up"></div>
<div class="addthis_sharing_toolbox show-for-large-up hide-for-print"></div>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<?php } ?>
<?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?>
@ -219,7 +220,6 @@ class pivotTemplate extends BaseTemplate {
switch ($wgPivotFeatures['usePivotTabs']) {
case true:
echo $body;
ob_flush();
break;
default:
$this->html('bodytext');
@ -245,9 +245,9 @@ class pivotTemplate extends BaseTemplate {
<?php } ?>
</ul>
</div>
<div id="footer-right-icons" class="small-12 medium-4 large-3 columns">
<div id="footer-right-icons" class="small-12 medium-4 large-3 columns hide-for-print">
<ul id="footer-right">
<li class="social-follow">
<li class="social-follow hide-for-print">
<?php if ($wgPivotFeatures['useAddThisFollow'] != false) { ?>
<div class="social-links">
<!-- Go to www.addthis.com/dashboard to customize your tools -->
@ -280,7 +280,7 @@ class pivotTemplate extends BaseTemplate {
<?php $this->printTrail(); ?>
<?php if ($wgPivotFeatures['addThisFollowPUBID'] != '') { ?>
<?php if ($wgPivotFeatures['addThisPUBID'] != '') { ?>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgPivotFeatures['addThisPUBID']; ?>" async="async">></script>
<?php } ?>
</body>
@ -288,6 +288,21 @@ class pivotTemplate extends BaseTemplate {
<?php
wfRestoreWarnings();
}
function renderSidebar() {
$sidebar = $this->getSidebar();
$toolbox = $this->getToolbox();
foreach ($sidebar as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) {
echo '<li id='.Sanitizer::escapeId( $box['id'] ); Linker::tooltip( $box['id'] ).'>';
echo '<li><label>'.htmlspecialchars( $box['header'] ).'</label></li>';
if ( is_array( $box['content'] ) ) {
foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); }
} }
}
echo '<li><label>Toolbox</label></li>';
foreach ($toolbox as $key => $tbitem) { echo $this->makeListItem($key, $tbitem); }
}
}
?>

View File

@ -1,8 +1,3 @@
# RC-1!
This skin is based on a fork of and complete rework of the layout of the Foreground skin. Added classes available in Foundation 5, 100% width like Vector, but is totally mobile responsive.
# MediaWiki Pivot Skin
[![Build Status](https://travis-ci.org/Hutchy68/pivot.svg?branch=master)](https://travis-ci.org/Hutchy68/pivot)
@ -28,7 +23,7 @@ After that, you can issue `git pull` to update the code at anytime.
Once the skin is in place add the following line to your `LocalSettings.php` file.
require_once "$IP/skins/pivot/pivot.php";
wfLoadSkin( 'pivot' );
This will activate Pivot in your installation. At this point you can select it as a user skin in your user preferences.
@ -51,7 +46,7 @@ Use following features in `LocalSettings.php` to change the behavior.
- `'useAddThisShare' => false` default, do not use AddThis share, `true` will insert the share toolbox div directly under page title, but before the tagline.
- `'useAddThisFollow' => false` default, do not use AddThis follow, `true` will insert the follow toolbox div in the `right-footer` area before icon or text output.
These are the default values:
These are the default values and the example of the array to change the defaults. Add the following after `wfLoadSkin( 'pivot' );` in `LocalSettings.php` to change the feature defaults:
$wgPivotFeatures = array(
'showActionsForAnon' => true,

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 348 KiB

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

View File

@ -60,7 +60,7 @@ if ( jQuery( '#ca-addsection' ).length ) {
jQuery('li#n-recentchanges a').prepend('<div id="drop-icon"><i class="fa fa-tasks fa-fw"></i></div>')
jQuery('li#n-help a').prepend('<div id="drop-icon"><i class="fa fa-question fa-fw"></i></div>')
jQuery('li#n-randompage a').prepend('<div id="drop-icon"><i class="fa fa-random fa-fw"></i></div>')
// Turn categories into labels

View File

@ -1,13 +1,13 @@
/*!
* Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.4.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.4.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.4.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.4.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.4.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular') format('svg');
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
@ -118,31 +118,31 @@
}
}
.fa-rotate-90 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.fa-rotate-180 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.fa-rotate-270 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.fa-flip-horizontal {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
}
.fa-flip-vertical {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
@ -1383,7 +1383,7 @@
.fa-digg:before {
content: "\f1a6";
}
.fa-pied-piper:before {
.fa-pied-piper-pp:before {
content: "\f1a7";
}
.fa-pied-piper-alt:before {
@ -1509,6 +1509,7 @@
content: "\f1ce";
}
.fa-ra:before,
.fa-resistance:before,
.fa-rebel:before {
content: "\f1d0";
}
@ -1831,6 +1832,7 @@
content: "\f23e";
}
.fa-battery-4:before,
.fa-battery:before,
.fa-battery-full:before {
content: "\f240";
}
@ -2024,3 +2026,312 @@
.fa-fonticons:before {
content: "\f280";
}
.fa-reddit-alien:before {
content: "\f281";
}
.fa-edge:before {
content: "\f282";
}
.fa-credit-card-alt:before {
content: "\f283";
}
.fa-codiepie:before {
content: "\f284";
}
.fa-modx:before {
content: "\f285";
}
.fa-fort-awesome:before {
content: "\f286";
}
.fa-usb:before {
content: "\f287";
}
.fa-product-hunt:before {
content: "\f288";
}
.fa-mixcloud:before {
content: "\f289";
}
.fa-scribd:before {
content: "\f28a";
}
.fa-pause-circle:before {
content: "\f28b";
}
.fa-pause-circle-o:before {
content: "\f28c";
}
.fa-stop-circle:before {
content: "\f28d";
}
.fa-stop-circle-o:before {
content: "\f28e";
}
.fa-shopping-bag:before {
content: "\f290";
}
.fa-shopping-basket:before {
content: "\f291";
}
.fa-hashtag:before {
content: "\f292";
}
.fa-bluetooth:before {
content: "\f293";
}
.fa-bluetooth-b:before {
content: "\f294";
}
.fa-percent:before {
content: "\f295";
}
.fa-gitlab:before {
content: "\f296";
}
.fa-wpbeginner:before {
content: "\f297";
}
.fa-wpforms:before {
content: "\f298";
}
.fa-envira:before {
content: "\f299";
}
.fa-universal-access:before {
content: "\f29a";
}
.fa-wheelchair-alt:before {
content: "\f29b";
}
.fa-question-circle-o:before {
content: "\f29c";
}
.fa-blind:before {
content: "\f29d";
}
.fa-audio-description:before {
content: "\f29e";
}
.fa-volume-control-phone:before {
content: "\f2a0";
}
.fa-braille:before {
content: "\f2a1";
}
.fa-assistive-listening-systems:before {
content: "\f2a2";
}
.fa-asl-interpreting:before,
.fa-american-sign-language-interpreting:before {
content: "\f2a3";
}
.fa-deafness:before,
.fa-hard-of-hearing:before,
.fa-deaf:before {
content: "\f2a4";
}
.fa-glide:before {
content: "\f2a5";
}
.fa-glide-g:before {
content: "\f2a6";
}
.fa-signing:before,
.fa-sign-language:before {
content: "\f2a7";
}
.fa-low-vision:before {
content: "\f2a8";
}
.fa-viadeo:before {
content: "\f2a9";
}
.fa-viadeo-square:before {
content: "\f2aa";
}
.fa-snapchat:before {
content: "\f2ab";
}
.fa-snapchat-ghost:before {
content: "\f2ac";
}
.fa-snapchat-square:before {
content: "\f2ad";
}
.fa-pied-piper:before {
content: "\f2ae";
}
.fa-first-order:before {
content: "\f2b0";
}
.fa-yoast:before {
content: "\f2b1";
}
.fa-themeisle:before {
content: "\f2b2";
}
.fa-google-plus-circle:before,
.fa-google-plus-official:before {
content: "\f2b3";
}
.fa-fa:before,
.fa-font-awesome:before {
content: "\f2b4";
}
.fa-handshake-o:before {
content: "\f2b5";
}
.fa-envelope-open:before {
content: "\f2b6";
}
.fa-envelope-open-o:before {
content: "\f2b7";
}
.fa-linode:before {
content: "\f2b8";
}
.fa-address-book:before {
content: "\f2b9";
}
.fa-address-book-o:before {
content: "\f2ba";
}
.fa-vcard:before,
.fa-address-card:before {
content: "\f2bb";
}
.fa-vcard-o:before,
.fa-address-card-o:before {
content: "\f2bc";
}
.fa-user-circle:before {
content: "\f2bd";
}
.fa-user-circle-o:before {
content: "\f2be";
}
.fa-user-o:before {
content: "\f2c0";
}
.fa-id-badge:before {
content: "\f2c1";
}
.fa-drivers-license:before,
.fa-id-card:before {
content: "\f2c2";
}
.fa-drivers-license-o:before,
.fa-id-card-o:before {
content: "\f2c3";
}
.fa-quora:before {
content: "\f2c4";
}
.fa-free-code-camp:before {
content: "\f2c5";
}
.fa-telegram:before {
content: "\f2c6";
}
.fa-thermometer-4:before,
.fa-thermometer:before,
.fa-thermometer-full:before {
content: "\f2c7";
}
.fa-thermometer-3:before,
.fa-thermometer-three-quarters:before {
content: "\f2c8";
}
.fa-thermometer-2:before,
.fa-thermometer-half:before {
content: "\f2c9";
}
.fa-thermometer-1:before,
.fa-thermometer-quarter:before {
content: "\f2ca";
}
.fa-thermometer-0:before,
.fa-thermometer-empty:before {
content: "\f2cb";
}
.fa-shower:before {
content: "\f2cc";
}
.fa-bathtub:before,
.fa-s15:before,
.fa-bath:before {
content: "\f2cd";
}
.fa-podcast:before {
content: "\f2ce";
}
.fa-window-maximize:before {
content: "\f2d0";
}
.fa-window-minimize:before {
content: "\f2d1";
}
.fa-window-restore:before {
content: "\f2d2";
}
.fa-times-rectangle:before,
.fa-window-close:before {
content: "\f2d3";
}
.fa-times-rectangle-o:before,
.fa-window-close-o:before {
content: "\f2d4";
}
.fa-bandcamp:before {
content: "\f2d5";
}
.fa-grav:before {
content: "\f2d6";
}
.fa-etsy:before {
content: "\f2d7";
}
.fa-imdb:before {
content: "\f2d8";
}
.fa-ravelry:before {
content: "\f2d9";
}
.fa-eercast:before {
content: "\f2da";
}
.fa-microchip:before {
content: "\f2db";
}
.fa-snowflake-o:before {
content: "\f2dc";
}
.fa-superpowers:before {
content: "\f2dd";
}
.fa-wpexplorer:before {
content: "\f2de";
}
.fa-meetup:before {
content: "\f2e0";
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,24 @@
@media print {
nav, footer { display:none; }
/* stop double border at bottom with print */
footer.row {
border: none;
}
/*make namespace labels stand out */
h4.namespace.label {
padding: 0.25em;
font-size: 1.4em !important;
font-weight: normal;
background-color: #2284a1 !important;
color: #fff !important;
}
/* do not print borders of page */
#p-cactions {
border-right:none;
border-left:none;
}
/* if addThis share is used, hide mobile content from js */
#at4m-dock {
display: none;
}
}

View File

@ -283,7 +283,6 @@ footer.row ul.views.columns li {
footer.row {
border-top: 1px solid #c3c3e5;
padding-top: 1em;
padding-bottom: 2em;
color: #333;
max-width: 100%;
@ -401,6 +400,7 @@ table.formedit tr:nth-of-type(even) {
table {
width: auto;
max-width: 100%;
}
td.mw-label {
@ -939,6 +939,7 @@ li.name.logo {
margin-bottom: 1em;
margin-right: auto;
margin-left: auto;
text-align: center;
}
@media only screen and (min-width: 642px) {
.tab-bar-section.middle { left: .8125rem; text-align: left; }
@ -1009,7 +1010,7 @@ h5.subtitle {
}
h4.namespace.label {
padding:0.25em;
font-size:1.1em !important;
font-size:1.25em !important;
font-weight:normal;
background-color: #2284a1;
}

View File

@ -1,72 +1,14 @@
<?php
/**
* Pivot Skin
*
* @file Since Version 1.0
* @ingroup Skins
* @author Garrick Van Buren, Jamie Thingelstad
* @author Tom Hutchison
* @license 2-clause BSD
*/
if ( ! defined('MEDIAWIKI'))
{
die("Not Directly Called So What Are You Doing");
if ( function_exists( 'wfLoadSkin' ) ) {
wfLoadSkin( 'pivot' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['pivot'] = __DIR__ . '/i18n';
/* wfWarn(
'Deprecated PHP entry point used for Pivot skin. Please use wfLoadSkin instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
); */
return true;
} else {
die( 'This version of the Pivot skin requires MediaWiki 1.25+' );
}
$wgExtensionCredits['skin'][] = array(
'path' => __FILE__,
'name' => 'skinname-pivot',
'url' => 'http://github.com/hutchy68/pivot/',
'author' => array(
'Tom Hutchison',
'...'
),
'version' => '1.0.0 rc',
'descriptionmsg' => 'pivot-desc'
);
$wgValidSkinNames['pivot'] = 'Pivot';
$wgAutoloadClasses['SkinPivot'] = __DIR__.'/Pivot.skin.php';
$wgMessagesDirs['SkinPivot'] = __DIR__.'/i18n';
$wgResourceModules['skins.pivot'] = array(
'styles' => array(
'pivot/assets/stylesheets/normalize.css',
'pivot/assets/stylesheets/font-awesome.css',
'pivot/assets/stylesheets/foundation.css',
'pivot/assets/stylesheets/pivot.css',
'pivot/assets/stylesheets/pivot-print.css',
'pivot/assets/stylesheets/jquery.autocomplete.css'
),
'scripts' => array(
'pivot/assets/scripts/vendor/jquery.cookie.js',
'pivot/assets/scripts/vendor/modernizr.js',
'pivot/assets/scripts/vendor/fastclick.js',
'pivot/assets/scripts/vendor/placeholder.js',
'pivot/assets/scripts/foundation/foundation.js',
'pivot/assets/scripts/foundation/foundation.topbar.js',
'pivot/assets/scripts/foundation/foundation.tooltip.js',
'pivot/assets/scripts/foundation/foundation.tab.js',
'pivot/assets/scripts/foundation/foundation.slider.js',
'pivot/assets/scripts/foundation/foundation.reveal.js',
'pivot/assets/scripts/foundation/foundation.orbit.js',
'pivot/assets/scripts/foundation/foundation.offcanvas.js',
'pivot/assets/scripts/foundation/foundation.magellan.js',
'pivot/assets/scripts/foundation/foundation.joyride.js',
'pivot/assets/scripts/foundation/foundation.interchange.js',
'pivot/assets/scripts/foundation/foundation.equalizer.js',
'pivot/assets/scripts/foundation/foundation.dropdown.js',
'pivot/assets/scripts/foundation/foundation.clearing.js',
'pivot/assets/scripts/foundation/foundation.alert.js',
'pivot/assets/scripts/foundation/foundation.accordion.js',
'pivot/assets/scripts/foundation/foundation.abide.js',
'pivot/assets/scripts/pivot.js',
),
'remoteBasePath' => &$GLOBALS['wgStylePath'],
'localBasePath' => &$GLOBALS['wgStyleDirectory']
);

76
skin.json Normal file
View File

@ -0,0 +1,76 @@
{
"name": "Pivot",
"version": "1.0.0",
"author": [
"Tom Hutchison",
"..."
],
"url": "http://github.com/hutchy68/pivot",
"descriptionmsg": "pivot-desc",
"type": "skin",
"ValidSkinNames": {
"pivot": "Pivot"
},
"MessagesDirs": {
"Skinpivot": [
"i18n"
]
},
"AutoloadClasses": {
"SkinPivot": "Pivot.skin.php"
},
"ResourceModules": {
"skins.pivot.styles": {
"position": "top",
"styles": [
"assets/stylesheets/normalize.css",
"assets/stylesheets/font-awesome.css",
"assets/stylesheets/foundation.css",
"assets/stylesheets/pivot.css",
"assets/stylesheets/pivot-print.css"
]
},
"skins.pivot.modernizr": {
"position": "top",
"scripts": [
"assets/scripts/vendor/modernizr.js"
]
},
"skins.pivot.js": {
"position": "bottom",
"scripts": [
"assets/scripts/vendor/jquery.cookie.js",
"assets/scripts/vendor/fastclick.js",
"assets/scripts/vendor/placeholder.js",
"assets/scripts/foundation/foundation.js",
"assets/scripts/foundation/foundation.topbar.js",
"assets/scripts/foundation/foundation.tooltip.js",
"assets/scripts/foundation/foundation.tab.js",
"assets/scripts/foundation/foundation.slider.js",
"assets/scripts/foundation/foundation.reveal.js",
"assets/scripts/foundation/foundation.orbit.js",
"assets/scripts/foundation/foundation.offcanvas.js",
"assets/scripts/foundation/foundation.magellan.js",
"assets/scripts/foundation/foundation.joyride.js",
"assets/scripts/foundation/foundation.interchange.js",
"assets/scripts/foundation/foundation.equalizer.js",
"assets/scripts/foundation/foundation.dropdown.js",
"assets/scripts/foundation/foundation.clearing.js",
"assets/scripts/foundation/foundation.alert.js",
"assets/scripts/foundation/foundation.accordion.js",
"assets/scripts/foundation/foundation.abide.js",
"assets/scripts/pivot.js"
],
"dependencies": [
"jquery.cookie",
"skins.pivot.modernizr"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteSkinPath": "pivot"
},
"config": {},
"manifest_version": 1
}

View File

@ -1,26 +0,0 @@
<?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'))
{
die("Not Directly Called So What Are You Doing?");
}
foreach ($this->getSidebar() as $boxName => $box) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { ?>
<li id='<?php echo Sanitizer::escapeId( $box['id'] ) ?>'<?php echo Linker::tooltip( $box['id'] ) ?>>
<li><label><?php echo htmlspecialchars( $box['header'] ); ?></label></li>
<?php if ( is_array( $box['content'] ) ) { ?>
<?php foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } ?>
<?php } } ?>
<?php } ?>
<li><label>Toolbox</label></li>
<?php foreach ($this->getToolbox() as $key => $item) { echo $this->makeListItem($key, $item); } ?>