Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #324 from Hutchy68/develop-merge
Browse files Browse the repository at this point in the history
Develop merge into master, ready for release
  • Loading branch information
Hutchy68 committed Mar 4, 2018
2 parents a0f33d7 + 3fc9333 commit 87533a5
Show file tree
Hide file tree
Showing 44 changed files with 13,079 additions and 6,961 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
## Version 2.1

* [bug] Regression - Text footer alignment and social icons (follow) #319
* [bug fix] AddThis div container #295
* [enhancement] Hide AddThis on non content pages by disabling <script> from running
* [bug fix] Fixes for VisualEditor changes in editor layout #313
* [compatibilit] Remove IE 8 Support entirely
* [code] CSS fixes for Issues #88, #172 and #196 (Print.css, firstHeading and Wikitable override by Foundation)
* [code] Moved icon appending for Visual Editor to `(window).load` function
* [code] Improved styling of TOC
* [code] [b/c break] Switch to MW 1.25+ extension registration mechanism
* [code] [b/c break] Removed I18n shim for < MW 1.23
* [code] Move Echo above Page Actions button
* [feature] Add page indicator support
* [feature] Add 'enableTabs' for tabs on page support
* [language] Enable "Back" in mobile nav menu to be localised
* [bug fix] RTL detection improved
* [code] More CSS fixes for Orbit, Tabs, etc

## Version 2.0

* [feature] [b/c break] Upgrade to Foundation 5.5.3 (Foundation Tabs have a coding change to build tabs on pages)
* [code] [b/c break] Use the help page set with MediaWiki:Helppage
* [feature] [code] Remove "Login" word for annon users, dropdown for log in and create account links
* [icons] Update to Font Awesome 4.5
* [icons] Missing icons for Visual Editor, CiteThisPage, et al were added
* [feature] Support of more menu items in top-bar, flows automatically
* [code] Hard set of logo icon in top-bar now controlled by CSS in foreground.css file (can be overridden)
* [code] Actions button on_hover is using native Foundation 5 on_hover (regression in Foundation 5 caused move on_hover to left instead of bottom)
* [code] Echo div container divided with div for alerts and div for messages (MW Flow extension compatible)
* [bug fix] Visual Editor z-index issue, toolbar and widget sizing
* [code] z-index values for z-indexed elements re-indexed appropriately

## Version 1.2

* [compatibility] Update skin for skin registration on MW 1.25 and higher
Expand Down
15 changes: 13 additions & 2 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Copyright (c) 2013, Garrick Van Buren, Jamie Thingelstad All rights
reserved.
Copyright (c) 2013, Garrick Van Buren, Jamie Thingelstad, Tom Hutchison.
All rights reserved.

The license text below "====" applies to all files within this
distribution, other than those that are in a directory which contains
files named "LICENSE" or "COPYING", or a subdirectory thereof. For
those files, the license text contained in said file overrides any
license information contained in directories of smaller depth.
Alternative licenses are typically used for software that is provided
by external parties, and merely packaged with the Foreground release
for convenience.

====

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down
35 changes: 0 additions & 35 deletions Foreground.i18n.php

This file was deleted.

103 changes: 63 additions & 40 deletions Foreground.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ public function setupSkinUserCss(OutputPage $out) {
'NavWrapperType' => 'divonly',
'showHelpUnderTools' => true,
'showRecentChangesUnderTools' => true,
'enableTabs' => false,
'wikiName' => &$GLOBALS['wgSitename'],
'navbarIcon' => false,
'IeEdgeCode' => 1,
'showFooterIcons' => 0,
'addThisFollowPUBID' => ''
'showFooterIcons' => false,
'addThisPUBID' => '',
'useAddThisShare' => '',
'useAddThisFollow' => ''
);
foreach ($wgForegroundFeaturesDefaults as $fgOption => $fgOptionValue) {
if ( !isset($wgForegroundFeatures[$fgOption]) ) {
Expand All @@ -47,7 +50,7 @@ public function initPage( OutputPage $out ) {
parent::initPage($out);

$viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0';
$out->addMeta('viewport', $viewport_meta);
$out->addMeta('viewport', $viewport_meta);
$out->addModules('skins.foreground.js');
}

Expand All @@ -59,6 +62,20 @@ public function execute() {
global $wgForegroundFeatures;
wfSuppressWarnings();
$this->html('headelement');
switch ($wgForegroundFeatures['enableTabs']) {
case true:
ob_start();
$this->html('bodytext');
$out = ob_get_contents();
ob_end_clean();
$markers = array("&lt;a", "&lt;/a", "&gt;");
$tags = array("<a", "</a", ">");
$body = str_replace($markers, $tags, $out);
break;
default:
$body = '';
break;
}
switch ($wgForegroundFeatures['NavWrapperType']) {
case '0':
break;
Expand All @@ -70,7 +87,7 @@ public function execute() {
break;
}
// Set default variables for footer and switch them if 'showFooterIcons' => true
$footerLeftClass = 'small-8 large-centered columns text-center';
$footerLeftClass = 'small-12 large-centered columns text-center';
$footerRightClass = 'large-12 small-12 columns';
$poweredbyType = "nocopyright";
$poweredbyMakeType = 'withoutImage';
Expand All @@ -86,17 +103,17 @@ public function execute() {
}
?>
<!-- START FOREGROUNDTEMPLATE -->
<nav class="top-bar">
<nav class="top-bar" data-topbar role="navigation" data-options="back_text: <?php echo wfMessage( 'foreground-menunavback' )->text(); ?>">
<ul class="title-area">
<li class="name">
<h1 class="title-name">
<div class="title-name">
<a href="<?php echo $this->data['nav_urls']['mainpage']['href']; ?>">
<?php if ($wgForegroundFeatures['navbarIcon'] != '0') { ?>
<img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 64px;height:auto; max-height:36px; display: inline-block; vertical-align:middle;">
<img alt="<?php echo $this->text('sitename'); ?>" class="top-bar-logo" src="<?php echo $this->text('logopath') ?>">
<?php } ?>
<div class="title-name" style="display: inline-block;"><?php echo $wgForegroundFeatures['wikiName']; ?></div>
</a>
</h1>
</div>
</li>
<li class="toggle-topbar menu-icon">
<a href="#"><span><?php echo wfMessage( 'foreground-menutitle' )->text(); ?></span></a>
Expand All @@ -106,7 +123,7 @@ public function execute() {
<section class="top-bar-section">

<ul id="top-bar-left" class="left">
<li class="divider"></li>
<li class="divider show-for-small"></li>
<?php foreach ( $this->getSidebar() as $boxName => $box ) { if ( ($box['header'] != wfMessage( 'toolbox' )->text()) ) { ?>
<li class="has-dropdown active" id='<?php echo Sanitizer::escapeId( $box['id'] ) ?>'<?php echo Linker::tooltip( $box['id'] ) ?>>
<a href="#"><?php echo htmlspecialchars( $box['header'] ); ?></a>
Expand All @@ -121,7 +138,7 @@ public function execute() {
<ul id="top-bar-right" class="right">
<li class="has-form">
<form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search">
<div class="row">
<div class="row collapse">
<div class="small-12 columns">
<?php echo $this->makeSearchInput(array('placeholder' => wfMessage('searchsuggest-search')->text(), 'id' => 'searchInput') ); ?>
<button type="submit" class="button search"><?php echo wfMessage( 'search' )->text() ?></button>
Expand All @@ -130,44 +147,40 @@ public function execute() {
</form>
</li>
<li class="divider show-for-small"></li>
<li class="has-form">

<li class="has-dropdown active"><a href="#"><i class="fa fa-cogs"></i></a>
<ul id="toolbox-dropdown" class="dropdown">
<?php foreach ( $this->getToolbox() as $key => $item ) { echo $this->makeListItem($key, $item); } ?>
<?php if ($wgForegroundFeatures['showRecentChangesUnderTools']): ?><li id="n-recentchanges"><?php echo Linker::specialLink('Recentchanges') ?></li><?php endif; ?>
<?php if ($wgForegroundFeatures['showHelpUnderTools']): ?><li id="n-help" <?php echo Linker::tooltip('help') ?>><a href="/wiki/Help:Contents"><?php echo wfMessage( 'help' )->text() ?></a></li><?php endif; ?>
<?php if ($wgForegroundFeatures['showHelpUnderTools']): ?><li id="n-help" <?php echo Linker::tooltip('help') ?>><a href="<?php echo Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() )?>"><?php echo wfMessage( 'help' )->text() ?></a></li><?php endif; ?>
</ul>
</li>

<?php if ($wgUser->isLoggedIn()): ?>
<li id="personal-tools-dropdown" class="has-dropdown active"><a href="#"><i class="fa fa-user"></i></a>
<ul class="dropdown">
<?php foreach ( $this->getPersonalTools() as $key => $item ) { echo $this->makeListItem($key, $item); } ?>
</ul>
</li>

<?php else: ?>
<li>
<?php if (isset($this->data['personal_urls']['anonlogin'])): ?>
<a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage( 'login' )->text() ?></a>
<?php elseif (isset($this->data['personal_urls']['login'])): ?>
<a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a>
<?php else: ?>
<?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?>
<?php endif; ?>
</li>

<?php endif; ?>

</ul>
</section>
</nav>

<?php if ($wgForegroundFeatures['NavWrapperType'] != '0') echo "</div>"; ?>

<div id="page-content">
<div class="row">
<div class="large-12 columns">
<!-- Output page indicators -->
<?php echo $this->getIndicators(); ?>
<!-- If user is logged in output echo location -->
<?php if ($wgUser->isLoggedIn()): ?>
<div id="echo-notifications">
<div id="echo-notifications-alerts"></div>
<div id="echo-notifications-messages"></div>
<div id="echo-notifications-notice"></div>
</div>
<?php endif; ?>
<!--[if lt IE 9]>
<div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename') . ' '. wfMessage( 'foreground-browsermsg' )->text(); ?></div>
<![endif]-->
Expand All @@ -182,16 +195,13 @@ public function execute() {
<div class="row">
<div id="p-cactions" class="large-12 columns">
<?php if ($wgUser->isLoggedIn() || $wgForegroundFeatures['showActionsForAnon']): ?>
<a href="#" data-dropdown="drop1" class="button dropdown small secondary radius"><i class="fa fa-cog"><span class="show-for-medium-up">&nbsp;<?php echo wfMessage( 'actions' )->text() ?></span></i></a>
<a id="actions-button" href="#" data-dropdown="actions" data-options="align:left; is_hover: true; hover_timeout:700" class="button small secondary radius"><i class="fa fa-cog"><span class="show-for-medium-up">&nbsp;<?php echo wfMessage( 'actions' )->text() ?></span></i></a>
<!--RTL -->
<ul id="drop1" class="views large-12 columns right f-dropdown">
<ul id="actions" class="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 ) ); ?>
</ul>
<!--RTL -->
<?php if ($wgUser->isLoggedIn()): ?>
<div id="echo-notifications"></div>
<?php endif; ?>
<?php endif;
$namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText());
$displaytitle = $this->data['title'];
Expand All @@ -201,12 +211,26 @@ public function execute() {
$displaytitle = str_replace($pagetitle, $newtitle, $displaytitle);
?><h4 class="namespace label"><?php print $namespace; ?></h4><?php } ?>
<div id="content">
<h2 id="firstHeading" class="title"><?php print $displaytitle; ?></h2>
<h1 id="firstHeading" class="title"><?php print $displaytitle; ?></h1>
<?php if ($wgForegroundFeatures['useAddThisShare'] !== '') { ?>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="<?php echo $wgForegroundFeatures['useAddThisShare']; ?> 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 } ?>
<h5 id="siteSub" class="subtitle"><?php $this->html('subtitle') ?></h5>
<div id="contentSub" class="clear_both"></div>
<div id="bodyContent" class="mw-bodytext">
<?php $this->html('bodytext') ?>
<?php
switch ($wgForegroundFeatures['enableTabs']) {
case true:
echo $body;
break;
default:
$this->html('bodytext');
break;
}
?>
<div class="clear_both"></div>
</div>
<div class="group"><?php $this->html('catlinks'); ?></div>
Expand All @@ -217,13 +241,10 @@ public function execute() {

<footer class="row">
<div id="footer">
<?php if ($wgForegroundFeatures['addThisFollowPUBID'] != '') { ?>
<div class="social-footer large-12 small-12 columns">
<div class="social-links">
<?php if ($wgForegroundFeatures['useAddThisFollow'] !== '') { ?>
<div class="social-follow hide-for-print">
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_horizontal_follow_toolbox"></div>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgForegroundFeatures['addThisFollowPUBID'];?>"></script>
</div>
<div class="<?php echo $wgForegroundFeatures['useAddThisFollow']; ?> hide-for-print"></div>
</div>
<?php } ?>
<div id="footer-left" class="<?php echo $footerLeftClass;?>">
Expand All @@ -249,7 +270,9 @@ public function execute() {
</div>

<?php $this->printTrail(); ?>

<?php if ($this->data['isarticle'] && $wgForegroundFeatures['addThisPUBID'] !== '') { ?>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo $wgForegroundFeatures['addThisPUBID']; ?>" async="async">></script>
<?php } ?>
</body>
</html>

Expand Down
12 changes: 12 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Setup

- Browsers and versions:
- MediaWiki version:
- Database version:
- PHP version:
- Foreground version:
- Extension version (if connected to the issue):

### Issue

Detailed description of the issue goes here.
Loading

0 comments on commit 87533a5

Please sign in to comment.