This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* 1. Check if it's an ajax request | |
* 2. Set up Page Data (title, activenav etc) | |
* 3. add any addtional data to be passed to the View. | |
* @param $route | |
* @return mixed | |
* | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Base_Controller extends Controller { | |
public $layout = 'layouts.main'; | |
public function __construct(){ | |
//Styles | |
Asset::add('css', 'css/main.css'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Convert a 'route' into a page title. | |
* | |
* @static | |
* @param $route | |
* @return string | |
* | |
*/ | |
public static function setTitle($route){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.action').on('click', function(){ | |
var icon = $(this).find('i'); | |
var toggleIcon = function (){ | |
var newIcon = (icon.hasClass('icon-plus')) ? 'icon-minus' : 'icon-plus' ; | |
icon.removeClass('icon-plus icon-minus'); | |
icon.addClass(newIcon); | |
} | |
toggleIcon(); | |
var action = $(this).data('action'); | |
var elem = $(this).data('elem'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vert_gradient($start, $finish){ | |
background: $start; /* Old browsers */ | |
background: -moz-linear-gradient(top, $start 1%, $finish 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,$start), color-stop(100%,$finish)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, $start 1%,$finish 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, $start 1%,$finish 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, $start 1%,$finish 100%); /* IE10+ */ | |
background: linear-gradient(top, $start 1%,$finish 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = #{$start}, endColorstr = #{$finish}, GradientType = 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* Helper Class to output correct Twitter Bootstrap Markup. | |
* Only option for now is the horizontal Form. | |
* | |
* Usage : | |
* | |
$form = new BootstrapForm('add_user'); | |
$form->addInput('text-input', 'user_name', 'Your name:', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#mainNav { display: inline-block; list-style: none;} | |
#mainNav li { float: left; } | |
#mainNav li a { display: inline-block; padding: 20px;} | |
#mainNav li a:hover { background: blue;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin vert_gradient($start, $finish){ | |
background: $start; /* Old browsers */ | |
background: -moz-linear-gradient(top, $start 1%, $finish 100%); /* FF3.6+ */ | |
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,$start), color-stop(100%,$finish)); /* Chrome,Safari4+ */ | |
background: -webkit-linear-gradient(top, $start 1%,$finish 100%); /* Chrome10+,Safari5.1+ */ | |
background: -o-linear-gradient(top, $start 1%,$finish 100%); /* Opera 11.10+ */ | |
background: -ms-linear-gradient(top, $start 1%,$finish 100%); /* IE10+ */ | |
background: linear-gradient(top, $start 1%,$finish 100%); /* W3C */ | |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = #{$start}, endColorstr = #{$finish}, GradientType = 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Category extends Eloquent | |
{ | |
/** | |
* ----------------------------------- | |
* Make Permalink from a Title. | |
* ----------------------------------- | |
* |
OlderNewer