Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Mar 24, 2014
1 parent bd33ef3 commit c8b6aba
Show file tree
Hide file tree
Showing 30 changed files with 934 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cubexio
cubex.io
=======

Cubex Website
This is the office source for the cubex.io website
126 changes: 126 additions & 0 deletions assets/css/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/* OVERRIDES */
body {
padding: 0;
font-family: 'Open Sans', sans-serif;
}

/** HELPERS */
.text-center {
text-align: center;
}

.strtoupper {
text-transform: uppercase;
}

/** STICKY FOOTER */
html,
body {
height: 100%;
}

#sf-wrap {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -155px;
}

#sf-push {
height: 155px;
}

footer {
height: 155px;
line-height: 20px;
}

/** GLOBAL STYLES */
header {
background: #4099d4;
background: -moz-linear-gradient(left, #4099d4 0%, #84cbf0 50%, #4099d4 100%);
background: -webkit-gradient(linear, left top, right top, color-stop(0%, #4099d4), color-stop(50%, #84cbf0), color-stop(100%, #4099d4));
background: -webkit-linear-gradient(left, #4099d4 0%, #84cbf0 50%, #4099d4 100%);
background: -o-linear-gradient(left, #4099d4 0%, #84cbf0 50%, #4099d4 100%);
background: -ms-linear-gradient(left, #4099d4 0%, #84cbf0 50%, #4099d4 100%);
background: linear-gradient(to right, #4099d4 0%, #84cbf0 50%, #4099d4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4099d4', endColorstr='#4099d4', GradientType=1);
}

header#topbar {
padding-bottom: 16px;
border-bottom: 3px solid #DEDEDE;
}

header#topbar .logo {
margin-top: 16px;
opacity: 0.8;
}

header#topbar .logo:hover {
opacity: 1;
}

nav.main {
margin-top: 29px;
}

header nav > ul > li > a {
padding: 0 7px;
color: #30719c;
text-shadow: 0 1px 0 #67b5e4;
}

header nav > ul > li > a:hover,
header nav > ul > li.active > a {
text-decoration: none;
color: #fff;
text-shadow: 0 1px 0 #3f8dc5;
}

footer {
background: #E9E9E9;
font-size: 11px;
padding-top: 14px;
border-top: 1px solid #CCC;
}

footer hr {
border: 0;
border-top: 1px solid #CCC;
margin: 5px 0;
}

.container {
max-width: 960px;
}

pre
{
border:1px solid #55a8dd;
}

pre code,code {
padding: 0;
color: #e9604a;
display: block;
overflow: hidden;
white-space: pre-wrap;
word-wrap: break-word;
font-family: monospace;
background: #eeeeee;
border-radius: 5px;
text-shadow: none;
}

code
{
background:transparent !important;
}



.home-features .panel
{
min-height:250px;
}
45 changes: 45 additions & 0 deletions assets/css/hero.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
header#topbar {
border-bottom: none;
}

header.hero {
font-size: 18px;
padding: 20px 0;
border-bottom: 3px solid #DEDEDE;
color: #ffffff;
}

header.hero h1 {
text-align: center;
font-family: Calibri, 'Open Sans', sans-serif;
font-weight: 400;
font-size: 53px;
margin-top: 15px;
text-shadow: 0 2px 0 #3b8ec8;
}

header.hero a:hover {
text-decoration: none;
}

header.hero a {
color: #ffffff;
}

header.hero aside {
display: block;
float: right;
width: 440px;
padding-top: 15px;
text-shadow: 0 1px 0 #3b8ec8;
}

header.hero hgroup {
float: left;
width: 440px;
}

.hero-links
{
padding-top:10px;
}
Binary file added assets/img/cubex-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/highlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/icons-cubes-sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/watermark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/icons-cubes-sprite.psd
Binary file not shown.
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "cubex/cubexio",
"description": "Cubex Website",
"homepage": "http://cubex.io",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Brooke Bryan",
"email": "[email protected]",
"homepage": "http://www.bajb.net"
}
],
"require": {
"cubex/framework": "*",
"stack/builder": "*",
"packaged/dispatch": "*",
"dflydev/markdown": "*"
},
"autoload": {
"psr-4": {
"CubexIo\\": "src/"
}
},
"minimum-stability": "dev"
}
10 changes: 10 additions & 0 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[kernel]
default = \CubexIo\CubexIoApplication

[dispatch]
run_on = path
run_match = assets
assets_dir = assets

[documentation]
source_path = /Websites/cubex/documentation/
30 changes: 30 additions & 0 deletions cubex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env php
<?php
/**
* Cubex Console Application
*/
//Defining PHP_START will allow cubex to add an execution time header
define('PHP_START', microtime(true));

//Include the composer autoloader
require_once __DIR__ . '/vendor/autoload.php';

//Create an instance of cubex, with the bin root defined
$app = new \Cubex\Cubex(__DIR__ . DIRECTORY_SEPARATOR . 'public/');

//Boot Cubex
$app->boot();

//Create a request object
$request = \Cubex\Http\Request::createConsoleRequest();
$app->instance('request', $request);

//Create a new console application
$console = \Cubex\Console\Console::withCubex($app);

//Execute the command and retrieve the exit code
$exit = $console->run();

$app->shutdown();

exit($exit);
32 changes: 32 additions & 0 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php
//Defining PHP_START will allow cubex to add an execution time header
define('PHP_START', microtime(true));

//Include the composer autoloader
require_once dirname(__DIR__) . '/vendor/autoload.php';

//Create an instance of cubex, with the web root defined
$app = new \Cubex\Cubex(__DIR__);
$app->boot();

$dispatcher = new \Packaged\Dispatch\Dispatch(
$app, $app->getConfiguration()->getSection('dispatch')
);
$dispatcher->setBaseDirectory(dirname(__DIR__));

//If you wish to use stackphp, uncomment the line below and require stackphp
$app = (new \Stack\Builder())
->push([$dispatcher, 'prepare'])
->resolve($app);

//Create a request object
$request = \Cubex\Http\Request::createFromGlobals();

//Tell Cubex to handle the request, and do its magic
$response = $app->handle($request);

//Send the generated response to the user
$response->send();

//Shutdown Cubex
$app->terminate($request, $response);
12 changes: 12 additions & 0 deletions src/Controllers/CookbookController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
namespace CubexIo\Controllers;

use CubexIo\Views\ComingSoon;

class CookbookController extends CubexIoController
{
public function defaultAction()
{
return new ComingSoon('Cookbooks');
}
}
65 changes: 65 additions & 0 deletions src/Controllers/CubexIoController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php
namespace CubexIo\Controllers;

use Cubex\Http\Response;
use Cubex\Kernel\ControllerKernel;
use Cubex\View\Layout;
use Cubex\View\Renderable;
use Cubex\View\ViewModel;
use Packaged\Dispatch\AssetManager;

abstract class CubexIoController extends ControllerKernel
{
protected $_layout;

protected $_contentName = 'content';

/**
* @return Layout
*/
public function layout()
{
if($this->_layout === null)
{
$this->_layout = new Layout($this);
$am = AssetManager::assetType();
$am->requireCss('css/base');
}

return $this->_layout;
}

public function __toString()
{
return $this->layout()->render();
}

public function handleResponse($response, $capturedOutput)
{
if($response instanceof ViewModel)
{
$this->layout()->insert($response, $this->_contentName);
return new Response($this->layout());
}

if($response === null)
{
$this->layout()->insert(
new Renderable($capturedOutput),
$this->_contentName
);
return new Response($this->layout());
}

if(is_scalar($response))
{
$this->layout()->insert(
new Renderable($response),
$this->_contentName
);
return new Response($this->layout());
}

return parent::handleResponse($response, $capturedOutput);
}
}
Loading

0 comments on commit c8b6aba

Please sign in to comment.