Skip to content

Commit

Permalink
Merging grid framework updates, adding foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
aembler committed Nov 6, 2014
1 parent 45d22e3 commit 75d85fb
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/tests/Core/Page/PageThemeGridFrameworkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* Time: 7:47 AM
*/

class PageThemeGridFrameworkTest extends \PHPUnit_Framework_TestCase {
class PageThemeGridFrameworkTest extends \PHPUnit_Framework_TestCase
{

public function testGridFrameworkManagerLoading()
{
Expand All @@ -16,6 +17,7 @@ public function testGridFrameworkManagerLoading()
$this->assertInstanceOf('\Concrete\Core\Page\Theme\GridFramework\Type\NineSixty', $gf->driver('nine_sixty'));
$this->assertInstanceOf('\Concrete\Core\Page\Theme\GridFramework\Type\Bootstrap2', $gf->driver('bootstrap2'));
$this->assertInstanceOf('\Concrete\Core\Page\Theme\GridFramework\Type\Bootstrap3', $gf->driver('bootstrap3'));
$this->assertInstanceOf('\Concrete\Core\Page\Theme\GridFramework\Type\Foundation', $gf->driver('foundation'));
}

}
6 changes: 6 additions & 0 deletions web/concrete/src/Page/Theme/GridFramework/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Concrete\Core\Page\Theme\GridFramework\Type\Bootstrap2;
use Concrete\Core\Page\Theme\GridFramework\Type\Bootstrap3;
use Concrete\Core\Page\Theme\GridFramework\Type\NineSixty;
use Concrete\Core\Page\Theme\GridFramework\Type\Foundation;
use Concrete\Core\Support\Manager as CoreManager;

class Manager extends CoreManager
Expand All @@ -23,4 +24,9 @@ protected function createBootstrap3Driver()
return new Bootstrap3();
}

protected function createFoundationDriver()
{
return new Foundation();
}

}
84 changes: 84 additions & 0 deletions web/concrete/src/Page/Theme/GridFramework/Type/Foundation.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php
namespace Concrete\Core\Page\Theme\GridFramework\Type;

use Concrete\Core\Page\Theme\GridFramework\GridFramework;

defined('C5_EXECUTE') or die(_("Access Denied."));

class Foundation extends GridFramework
{

public function getPageThemeGridFrameworkName()
{
return t('Foundation');
}

public function getPageThemeGridFrameworkRowStartHTML()
{
return '<div class="row">';
}

public function getPageThemeGridFrameworkRowEndHTML()
{
return '</div>';
}

public function getPageThemeGridFrameworkContainerStartHTML()
{
return '';
}

public function getPageThemeGridFrameworkContainerEndHTML()
{
return '';
}

public function getPageThemeGridFrameworkColumnClasses()
{
$columns = array(
'small-1 ',
'small-2 ',
'small-3',
'small-4',
'small-5',
'small-6',
'small-7',
'small-8',
'small-9',
'small-10',
'small-11',
'small-12',
);
return $columns;
}

public function getPageThemeGridFrameworkColumnOffsetClasses()
{
$offsets = array(
'small-offset-1',
'small-offset-2',
'small-offset-3',
'small-offset-4',
'small-offset-5',
'small-offset-6',
'small-offset-7',
'small-offset-8',
'small-offset-9',
'small-offset-10',
'small-offset-11',
'small-offset-12',
);
return $offsets;
}

public function getPageThemeGridFrameworkColumnAdditionalClasses()
{
return 'columns';
}

public function getPageThemeGridFrameworkColumnOffsetAdditionalClasses()
{
return 'columns';
}

}

0 comments on commit 75d85fb

Please sign in to comment.