├── .bowerrc ├── .gitignore ├── .travis.yml ├── CCF ├── app │ ├── App.php │ ├── classes │ │ └── User.php │ ├── config │ │ ├── app.config.php │ │ ├── auth.config.php │ │ ├── database.config.php │ │ ├── main.config.php │ │ └── router.config.php │ ├── console │ │ └── app.php │ ├── controllers │ │ ├── AuthController.php │ │ ├── ErrorController.php │ │ └── WelcomeController.php │ ├── language │ │ ├── de-de │ │ │ ├── controller │ │ │ │ └── auth.php │ │ │ └── model │ │ │ │ └── user.php │ │ └── en-us │ │ │ ├── controller │ │ │ └── auth.php │ │ │ └── model │ │ │ └── user.php │ ├── themes │ │ ├── Bootpack │ │ │ ├── blueprint.json │ │ │ ├── classes │ │ │ │ └── Theme.php │ │ │ ├── config │ │ │ │ └── theme.config.php │ │ │ └── views │ │ │ │ └── layout.php │ │ └── Bootstrap │ │ │ ├── blueprint.json │ │ │ ├── classes │ │ │ └── Theme.php │ │ │ ├── config │ │ │ └── theme.config.php │ │ │ └── views │ │ │ └── layout.php │ └── views │ │ ├── auth │ │ ├── sign_in.view.php │ │ └── sign_up.view.php │ │ └── welcome.php └── orbit │ ├── CleanRedirect │ ├── blueprint.json │ └── classes │ │ └── Ship.php │ ├── Dev │ ├── blueprint.json │ ├── classes │ │ └── Ship.php │ ├── controllers │ │ ├── CommonController.php │ │ ├── MailController.php │ │ └── sessionController.php │ └── views │ │ ├── mail.php │ │ └── session.php │ ├── Packtacular │ ├── blueprint.json │ ├── classes │ │ ├── CCAsset.php │ │ ├── Packtacular.php │ │ ├── Ship.php │ │ ├── Theme.php │ │ └── lib │ │ │ └── lessc.inc.php │ └── config │ │ └── packtacular.config.php │ └── orbit.json ├── LICENSE ├── README.md ├── boot ├── environment.php ├── paths.php └── phpunit.php ├── cli ├── composer.json ├── framework.php └── public ├── .htaccess ├── assets ├── Bootstrap │ ├── css │ │ ├── bootstrap.min.css │ │ └── style.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── js │ │ ├── application.js │ │ └── bootstrap.min.js │ └── less │ │ ├── mixins │ │ ├── background.less │ │ ├── css3.less │ │ ├── mixins.less │ │ └── transform.less │ │ └── style.less └── vendor │ └── jquery.js └── index.php /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "public/assets/vendor" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public/assets/packtacular/ 2 | CCF/app/config/migrator.json 3 | CCF/vendor/ 4 | storage/ 5 | .DS_Store 6 | Thumbs.db 7 | composer.phar 8 | composer.lock 9 | phpunit.xml 10 | phpunit.phar 11 | report/ 12 | run -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - hhvm 9 | 10 | env: 11 | - DB=mysql 12 | 13 | before_script: 14 | - mysql -e 'create database ccf2_phpunit_application' 15 | - mysql -e 'create database ccf2_phpunit_database' 16 | - composer self-update 17 | - composer install --prefer-source --no-interaction --dev 18 | 19 | script: 20 | - php cli phpunit::build 21 | - php cli doctor::security_key 22 | - phpunit --coverage-text 23 | 24 | matrix: 25 | allow_failures: 26 | - php: hhvm -------------------------------------------------------------------------------- /CCF/app/App.php: -------------------------------------------------------------------------------- 1 | send_app_wake_response ) 37 | * 38 | * @return void | CCResponse 39 | */ 40 | public static function wake() 41 | { 42 | /* 43 | * Start the session by adding the current uri 44 | */ 45 | CCSession::set( 'uri', CCServer::uri() ); 46 | 47 | /* 48 | * try to authenticate the user 49 | */ 50 | //static::$user =& CCAuth::handler()->user; 51 | 52 | /* 53 | * load the App configuration 54 | */ 55 | static::$config = CCConfig::create( 'app' ); 56 | } 57 | 58 | /** 59 | * Environment wake 60 | * This is an environment wake they get called if your running 61 | * the application in a special environment like: 62 | * wake_production 63 | * wake_phpunit 64 | * wake_test 65 | * 66 | * @return void | CCResponse 67 | */ 68 | public static function wake_development() 69 | { 70 | CCProfiler::check( 'App::development - Application finished wake events.' ); 71 | } 72 | } -------------------------------------------------------------------------------- /CCF/app/classes/User.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class User extends Auth\User 13 | { 14 | /** 15 | * The users table 16 | */ 17 | protected static $_table = 'auth_users'; 18 | 19 | /** 20 | * The user model defaults 21 | * 22 | * @var array 23 | */ 24 | protected static $_defaults = array( 25 | 'id' , 26 | 'active' => array( 'bool', true ), 27 | 'group_id' => 0, 28 | 'email' => null, 29 | 'password' => null, 30 | 'storage' => array( 'json', array() ), 31 | 'last_login' => array( 'timestamp', 0 ), 32 | 'created_at' => array( 'timestamp' ), 33 | 'modified_at' => array( 'timestamp' ), 34 | ); 35 | } -------------------------------------------------------------------------------- /CCF/app/config/app.config.php: -------------------------------------------------------------------------------- 1 | 'ClanCats Framework, because your time is precious. HMVC PHP framework.', 15 | ); -------------------------------------------------------------------------------- /CCF/app/config/auth.config.php: -------------------------------------------------------------------------------- 1 | array( 13 | 14 | // The User model class 15 | 'user_model' => "\\User", 16 | ), 17 | ); 18 | -------------------------------------------------------------------------------- /CCF/app/config/database.config.php: -------------------------------------------------------------------------------- 1 | array( 12 | // selected database 13 | 'db' => 'db_'.CCStr::clean_url( App::name(), '_' ), 14 | 15 | // driver 16 | 'driver' => 'mysql', 17 | 18 | // auth 19 | 'host' => '127.0.0.1', 20 | 'user' => 'root', 21 | 'pass' => '', 22 | 'charset' => 'utf8' 23 | ), 24 | ); 25 | -------------------------------------------------------------------------------- /CCF/app/config/main.config.php: -------------------------------------------------------------------------------- 1 | array( 16 | // if not in the root directory set the path offset. 17 | 'path' => '/', 18 | ), 19 | 20 | /* 21 | * Security 22 | */ 23 | 'security' => array( 24 | // it is really important that you choose your own one! 25 | 'salt' => '{{security salt here}}', 26 | ), 27 | ); -------------------------------------------------------------------------------- /CCF/app/config/router.config.php: -------------------------------------------------------------------------------- 1 | 'Root', // private route 19 | * 20 | * 'foo' => function() { }, // closure 21 | * 'bar' => 'Bar', // controller 22 | * 'detail' => 'Root@detail', // controller with action 23 | * 'route@alias' => 'controller?foo,bar', // alias, controller with parameters 24 | * 25 | * '@myalias' => 'to/my/url/' // alias only 26 | */ 27 | '#root' => 'Welcome', 28 | 29 | /* 30 | * Not Found and internal Server Error 31 | */ 32 | '#404' => 'Error@404', 33 | '#500' => 'Error@500', 34 | 35 | /* 36 | * The authentication module 37 | */ 38 | 'login' => 'Auth@sign_in', 39 | 'logout' => 'Auth@sign_out', 40 | 'join@auth.sign_up' => 'Auth@sign_up', 41 | 42 | '@auth.sign_in' => to( 'login/', array( ':back' ) ), 43 | '@auth.sign_out' => to( 'logout/', array( ':fingerprint' ) ), 44 | ); 45 | -------------------------------------------------------------------------------- /CCF/app/console/app.php: -------------------------------------------------------------------------------- 1 | 9 | * @version 2.0 10 | * @copyright 2010 - 2015 ClanCats GmbH 11 | * 12 | */ 13 | class app extends \CCConsoleController { 14 | 15 | /** 16 | * return an array with information about the script 17 | */ 18 | public function help() 19 | { 20 | return array( 21 | 'name' => 'App', 22 | 'desc' => 'stuff to maintain your application', 23 | 'actions' => array( 24 | 'info' => 'show information about this application.', 25 | ), 26 | ); 27 | } 28 | 29 | /** 30 | * print information about this application 31 | * 32 | * @param array $params 33 | */ 34 | public function action_info( $params ) 35 | { 36 | 37 | $app = \ClanCats::runtime(); 38 | 39 | // print the app name 40 | $this->line( \CCForge_Php::make( 'comment', 41 | $app::$name.PHP_EOL. 42 | "*".PHP_EOL. 43 | "Running on ClanCatsFramework ".\ClanCats::VERSION.PHP_EOL. 44 | "© 2010 - ".date('Y')." ClanCats GmbH".PHP_EOL 45 | ), 'cyan' ); 46 | 47 | // list printer 48 | $list = function( $array ) 49 | { 50 | foreach( $array as $key => $value ) 51 | { 52 | $this->line( $key.': '.CCCli::color( $value, 'green' ) ); 53 | } 54 | }; 55 | 56 | // print info 57 | $list( array( 58 | 'Runtime Class' => $app, 59 | 'CCF Version' => \ClanCats::version(), 60 | 'CCF Environment' => \ClanCats::environment(), 61 | 'Development env' => var_export( \ClanCats::in_development(), true ), 62 | 'File extention' => EXT, 63 | 'Core namespace' => CCCORE_NAMESPACE, 64 | )); 65 | 66 | // paths 67 | $this->line( PHP_EOL."Paths", 'cyan' ); 68 | $list( \ClanCats::paths() ); 69 | 70 | // paths 71 | $this->line( PHP_EOL."Directories", 'cyan' ); 72 | $list( \ClanCats::directories() ); 73 | 74 | // autoloader 75 | $this->line( PHP_EOL."Autoloader - namespaces", 'cyan' ); 76 | $list( \CCFinder::$namespaces ); 77 | } 78 | } -------------------------------------------------------------------------------- /CCF/app/controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | theme->topic = __( ':action.topic' ); 21 | 22 | // lets assign the view. Instead of getting the view directly 23 | // using CCView::create( 'path/to/view' ) we get the view from the 24 | // theme this allows us to have a diffrent sign_in for every theme. 25 | // If the view does not exist in the theme it will load the view from 26 | // the default view folder. 27 | $this->view = $this->theme->view( 'auth/sign_in.view' ); 28 | 29 | $this->view->last_identifier = CCIn::post( 'identifier' ); 30 | 31 | // By checking the HTTP method we figure out if this is a post request or not. 32 | if ( CCIn::method( 'post' ) ) 33 | { 34 | // Validate the data and get the user object. 35 | // We use the key "identifier" because you can configure on 36 | // what fields the user is able to login. You could add for example 37 | // the username or the customer number etc. 38 | if ( $user = CCAuth::validate( CCIn::post( 'identifier' ), CCIn::post( 'password' ) ) ) 39 | { 40 | // sign in the user with the current session. 41 | CCAuth::sign_in( $user ); 42 | 43 | // flash a success message to the user that he has been 44 | // logged in succesfully. 45 | UI\Alert::flash( 'success', __( ':action.message.success' ) ); 46 | 47 | // Redirect the user back to the url where he came from 48 | // this will only work when the next get parameter is set. 49 | return CCRedirect::next(); 50 | } 51 | 52 | // If we could not recive a user object the login data were clearly invalid. 53 | UI\Alert::add( 'danger', __( ':action.message.invalid' ) ); 54 | } 55 | } 56 | 57 | /** 58 | * Sign up action 59 | * 60 | * @return CCResponse 61 | */ 62 | public function action_sign_up() 63 | { 64 | // When the user is already authenticated we redirect him home. 65 | if ( CCAuth::valid() ) 66 | { 67 | return CCRedirect::to( '/' ); 68 | } 69 | 70 | $this->theme->topic = __( ':action.topic' ); 71 | $this->view = $this->theme->view( 'auth/sign_up.view' ); 72 | 73 | // create a new user object as data holder 74 | $user = new User; 75 | 76 | // bind the newly created user object to our view 77 | $this->view->bind( 'user', $user ); 78 | 79 | if ( CCIn::method( 'post' ) ) 80 | { 81 | // Lets assign the email and the password to our 82 | // user object using the stirct assign method wich 83 | // will ignore all other post values in the assing process. 84 | $user->strict_assign( array( 'email', 'password' ), CCIn::all( 'post' ) ); 85 | 86 | $validator = CCValidator::post(); 87 | 88 | // assign the labels to the validator this way we get 89 | // correct translated error messages. 90 | $validator->label( array( 91 | 'email' => __( 'model/user.label.email' ), 92 | 'password' => __( 'model/user.label.password' ), 93 | 'password_match' => __( 'model/user.label.password_match' ) 94 | )); 95 | 96 | // does the user already exist 97 | $validator->set( 'same_email', User::find( 'email', $user->email ) ); 98 | $validator->message( __(':action.message.email_in_use'), 'negative', 'same_email' ); 99 | 100 | // validate the other fields 101 | $validator->rules( 'email', 'required', 'email' ); 102 | $validator->rules( 'password', 'required', 'min:6' ); 103 | $validator->rules( 'password_match', 'required', 'match:password' ); 104 | 105 | // when the data passes the validation 106 | if ( $validator->success() ) 107 | { 108 | // because the user input is correct we can now save the 109 | // object to the database and sign the user in. 110 | $user->save(); 111 | 112 | CCAuth::sign_in( $user ); 113 | 114 | UI\Alert::flash( 'success', __( ':action.message.success' ) ); 115 | 116 | return CCRedirect::to( '/' ); 117 | } 118 | else 119 | { 120 | UI\Alert::add( 'danger', $validator->errors() ); 121 | } 122 | } 123 | } 124 | 125 | /** 126 | * Sign out action 127 | */ 128 | public function action_sign_out() 129 | { 130 | if ( !CCSession::valid_fingerprint() ) 131 | { 132 | return CCRedirect::to( '/' ); 133 | } 134 | 135 | CCAuth::sign_out(); return CCRedirect::to( '/' ); 136 | } 137 | } -------------------------------------------------------------------------------- /CCF/app/controllers/ErrorController.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class ErrorController extends \CCController 13 | { 14 | /** 15 | * Not found 404 16 | */ 17 | public function action_404() 18 | { 19 | return CCResponse::create( CCView::create( 'Core::CCF/404' )->render(), 404 ); 20 | } 21 | 22 | /** 23 | * Server error 500 24 | */ 25 | public function action_500() 26 | { 27 | return CCResponse::create( CCView::create( 'Core::CCF/500' )->render(), 500 ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /CCF/app/controllers/WelcomeController.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class WelcomeController extends CCViewController 13 | { 14 | /** 15 | * The default theme 16 | * if you wish you can render this controller with a special theme 17 | * 18 | * @var string 19 | */ 20 | protected $_theme = null; 21 | 22 | /** 23 | * the index function is just "function Index() {}" 24 | */ 25 | public function action_index() 26 | { 27 | $this->theme->topic = "Willkommen"; 28 | 29 | $this->view = $this->theme->view( 'welcome', array( 30 | 'runtime_name' => ClanCats::runtime( 'name' ), 31 | 'environment' => ClanCats::environment(), 32 | )); 33 | } 34 | } -------------------------------------------------------------------------------- /CCF/app/language/de-de/controller/auth.php: -------------------------------------------------------------------------------- 1 | 'Einloggen', 3 | 'sign_in.message.invalid' => 'Der Benutzername und das Passwort stimmen nicht überein.', 4 | 'sign_in.message.success' => 'Willkommen zurück!', 5 | 6 | 'sign_up.topic' => 'Registrieren', 7 | 'sign_up.submit' => 'Konto Erstellen', 8 | 'sign_up.message.email_in_use' => 'Diese E-Mail Adresse wird bereits verwendet.', 9 | 'sign_up.message.success' => 'Ihr Konto wurde erfolgreich erstellt.', 10 | ); -------------------------------------------------------------------------------- /CCF/app/language/de-de/model/user.php: -------------------------------------------------------------------------------- 1 | 'Name', 3 | 'label.email' => 'Email', 4 | 'label.password' => 'Passwort', 5 | 'label.password_match' => 'Wiederholen', 6 | 'label.retain' => 'Eingeloggt bleiben', 7 | ); -------------------------------------------------------------------------------- /CCF/app/language/en-us/controller/auth.php: -------------------------------------------------------------------------------- 1 | 'Sign In', 3 | 'sign_in.message.invalid' => 'Wrong email and password combination.', 4 | 'sign_in.message.success' => 'Welcome back!', 5 | 6 | 'sign_up.topic' => 'Sign Up', 7 | 'sign_up.submit' => 'Create my account', 8 | 'sign_up.message.email_in_use' => 'This Email address is already in use.', 9 | 'sign_up.message.success' => 'Your account has been successfully created.', 10 | ); -------------------------------------------------------------------------------- /CCF/app/language/en-us/model/user.php: -------------------------------------------------------------------------------- 1 | 'Name', 3 | 'label.email' => 'Email', 4 | 'label.password' => 'Password', 5 | 'label.password_match' => 'Repeat', 6 | 'label.retain' => 'Remember me', 7 | ); -------------------------------------------------------------------------------- /CCF/app/themes/Bootpack/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Twitter Bootstrap with packtacular", 3 | "version": "3.0.3", 4 | "description": "Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.", 5 | "homepage": "http://getbootstrap.com", 6 | "keywords": [ 7 | "Twitter", 8 | "Theme" 9 | ], 10 | "license": "MIT", 11 | "authors": [], 12 | 13 | "namespace": "Bootstrap", 14 | 15 | "wake": false, 16 | "install": false, 17 | "uninstall": false 18 | } -------------------------------------------------------------------------------- /CCF/app/themes/Bootpack/classes/Theme.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class Theme extends \Packtacular\Theme 13 | { 14 | /** 15 | * Returns the current view namespace 16 | * You need to implement this method in your theme subclass. 17 | * 18 | * @return string 19 | */ 20 | public static function view_namespace() 21 | { 22 | return __NAMESPACE__; 23 | } 24 | 25 | /** 26 | * This the current public namespace 27 | * By default its simply the PUBLICPATH/assets/ 28 | * You need to implement this method in your theme subclass. 29 | * 30 | * @return string 31 | */ 32 | public static function public_namespace() 33 | { 34 | return "assets/".__NAMESPACE__.'/'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /CCF/app/themes/Bootpack/config/theme.config.php: -------------------------------------------------------------------------------- 1 | array( 8 | 9 | /* 10 | * the topic gets added to the title 11 | */ 12 | 'topic' => 'no title', 13 | 14 | /* 15 | * the html title template 16 | */ 17 | 'title' => '%s | '.ClanCats::runtime( 'name' ), 18 | 19 | /* 20 | * the default html description 21 | */ 22 | 'description' => 'Change your default description under theme.config -> defatul.description.', 23 | 24 | /* 25 | * sidebar ( if false full container gets used ) 26 | */ 27 | 'sidebar' => false, 28 | 29 | /* 30 | * Footer appended scripts 31 | * When you have a view specifc script you can append them to the js var just like: 32 | * 33 | * $theme->capture_append( 'js', function() { 34 | * echo ""; 35 | * }); 36 | */ 37 | 'js' => '', 38 | ), 39 | 40 | /* 41 | * Assets configuration 42 | * 43 | * you can pack files to gether: 44 | * @ 45 | */ 46 | 'assets' => array( 47 | // load bootstrap core 48 | 'css/bootstrap.min.css' => 'theme@style', 49 | 'css/style.css' => 'theme@style', 50 | 51 | // add mixins 52 | 'less/mixins/mixins.less' => 'theme@style', 53 | 'less/mixins/background.less' => 'theme@style', 54 | 'less/mixins/css3.less' => 'theme@style', 55 | 'less/mixins/transform.less' => 'theme@style', 56 | 57 | // Main style 58 | 'less/style.less' => 'theme@style', 59 | 60 | // js core 61 | 'jquery.js' => 'vendor@lib', 62 | 'js/bootstrap.min.js' => 'theme@core', 63 | 'js/application.js' => 'theme@app', 64 | ) 65 | ); -------------------------------------------------------------------------------- /CCF/app/themes/Bootpack/views/layout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <?php echo $title; ?> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 69 | 70 |
71 | 72 |
73 | 74 |
75 |
76 | 77 |
78 |
79 | 80 |
81 |
82 | 83 | 84 | 85 |
86 |
87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /CCF/app/themes/Bootstrap/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Twitter Bootstrap", 3 | "version": "3.0.3", 4 | "description": "Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.", 5 | "homepage": "http://getbootstrap.com", 6 | "keywords": [ 7 | "Twitter", 8 | "Theme" 9 | ], 10 | "license": "MIT", 11 | "authors": [], 12 | 13 | "namespace": "Bootstrap", 14 | 15 | "wake": false, 16 | "install": false, 17 | "uninstall": false 18 | } -------------------------------------------------------------------------------- /CCF/app/themes/Bootstrap/classes/Theme.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class Theme extends \CCTheme 13 | { 14 | /** 15 | * the theme configuration 16 | * 17 | * @var CCConfig 18 | */ 19 | public static $config = null; 20 | 21 | /** 22 | * static theme init 23 | * 24 | * @return void 25 | */ 26 | public static function _init() 27 | { 28 | static::$config = \CCConfig::create( __NAMESPACE__.'::theme' ); 29 | } 30 | 31 | /** 32 | * Returns the current view namespace 33 | * You need to implement this method in your theme subclass. 34 | * 35 | * @return string 36 | */ 37 | public static function view_namespace() 38 | { 39 | return __NAMESPACE__; 40 | } 41 | 42 | /** 43 | * This the current public namespace 44 | * By default its simply the PUBLICPATH/assets/ 45 | * You need to implement this method in your theme subclass. 46 | * 47 | * @return string 48 | */ 49 | public static function public_namespace() 50 | { 51 | return "assets/".__NAMESPACE__.'/'; 52 | } 53 | 54 | /** 55 | * custom theme render stuff 56 | * 57 | * @param string $file 58 | * @return string 59 | */ 60 | public function render( $file = null ) 61 | { 62 | foreach( static::$config->default as $key => $value ) 63 | { 64 | $this->set( $key, $value ); 65 | } 66 | 67 | // assign the topic to the title 68 | if ( $this->has( 'topic' ) && $this->has( 'title' ) ) 69 | { 70 | $this->title = sprintf( $this->get( 'title' ), $this->get( 'topic' ) ); 71 | } 72 | 73 | // add default assets 74 | \CCAsset::add( 'js/jquery/jquery.js' ); 75 | \CCAsset::add( 'js/bootstrap.min.js', 'theme' ); 76 | \CCAsset::add( 'css/bootstrap.min.css', 'theme' ); 77 | \CCAsset::add( 'css/style.css', 'theme' ); 78 | 79 | return parent::render( $file ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /CCF/app/themes/Bootstrap/config/theme.config.php: -------------------------------------------------------------------------------- 1 | array( 8 | 9 | /* 10 | * the topic gets added to the title 11 | */ 12 | 'topic' => 'no title', 13 | 14 | /* 15 | * the html title template 16 | */ 17 | 'title' => '%s | '.ClanCats::runtime( 'name' ), 18 | 19 | /* 20 | * the default html description 21 | */ 22 | 'description' => 'Change your default description under theme.config -> defatul.description.', 23 | 24 | /* 25 | * sidebar ( if false full container gets used ) 26 | */ 27 | 'sidebar' => false, 28 | ), 29 | ); -------------------------------------------------------------------------------- /CCF/app/themes/Bootstrap/views/layout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <?php echo $title; ?> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 | 26 |
27 |
28 | 29 |
30 |
31 | 32 |
33 |
34 | 35 | 36 | 37 |
38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /CCF/app/views/auth/sign_in.view.php: -------------------------------------------------------------------------------- 1 | {% use UI\Form; %} 2 |
3 |
4 | 5 |
6 |
7 |

{{__( ':action.topic' )}}

8 |
9 |
10 | 11 | 12 | {{ Form::start( 'sign-in', array( 'method' => 'post', 'class' => 'form-horizontal' ) ) }} 13 | 14 | 15 |
16 | {{ Form::label( 'identifier', __( 'model/user.label.email' ) )->add_class( 'col-sm-2' ) }} 17 |
18 | {{ Form::input( 'identifier', $last_identifier ) 19 | ->placeholder( __( 'model/user.label.email' ) ) }} 20 |
21 |
22 | 23 | 24 |
25 | {{ Form::label( 'password', __( 'model/user.label.password' ) )->add_class( 'col-sm-2' ) }} 26 |
27 | {{ Form::input( 'password', null, 'password' ) 28 | ->placeholder( __( 'model/user.label.password' ) ) }} 29 |
30 |
31 | 32 | 33 |
34 |
35 | {{ Form::checkbox( 'retain', __( 'model/user.label.retain' ), true ) }} 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 |
44 |
45 | 46 | {{ Form::end(); }} 47 |
48 |
-------------------------------------------------------------------------------- /CCF/app/views/auth/sign_up.view.php: -------------------------------------------------------------------------------- 1 | {% use UI\Form; %} 2 |
3 |
4 | 5 |
6 |
7 |

{{__( ':action.topic' )}}

8 |
9 |
10 | 11 | 12 | {{ Form::start( 'sign-in', array( 'method' => 'post', 'class' => 'form-horizontal' ) ) }} 13 | 14 | 15 |
16 | {{ Form::label( 'email', __( 'model/user.label.email' ) )->add_class( 'col-sm-2' ); }} 17 |
18 | {{ Form::input( 'email', $user->email, 'email' ) 19 | ->placeholder( __( 'model/user.label.email' ) ); }} 20 |
21 |
22 | 23 | 24 |
25 | {{ Form::label( 'password', __( 'model/user.label.password' ) )->add_class( 'col-sm-2' ); }} 26 |
27 | {{ Form::input( 'password', null, 'password' ) 28 | ->placeholder( __( 'model/user.label.password' ) ); }} 29 |
30 |
31 | 32 | 33 |
34 | {{ Form::label( 'password_match', __( 'model/user.label.password_match' ) )->add_class( 'col-sm-2' ); }} 35 |
36 | {{ Form::input( 'password_match', null, 'password' ) 37 | ->placeholder( __( 'model/user.label.password_match' ) ); }} 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 |
46 |
47 | 48 | {{ Form::end() }} 49 |
50 |
-------------------------------------------------------------------------------- /CCF/app/views/welcome.php: -------------------------------------------------------------------------------- 1 |

Wilkommen bei CCF 2.0

2 | Running: 3 |
4 | Environment: 5 | 6 |
-------------------------------------------------------------------------------- /CCF/orbit/CleanRedirect/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CleanRedirect", 3 | "version": "1.0.0", 4 | "description": "This is a little example of an orbit ship.", 5 | "homepage": "http:\/\/clancats.com", 6 | "keywords": [ 7 | "clancats" 8 | ], 9 | "license": "MIT", 10 | "author": [ 11 | { 12 | "name": "Mario Döring", 13 | "email": "mario@clancats.com" 14 | } 15 | ], 16 | "namespace": "CleanRedirect" 17 | } -------------------------------------------------------------------------------- /CCF/orbit/CleanRedirect/classes/Ship.php: -------------------------------------------------------------------------------- 1 | 7 | * @version 1.0.0 8 | */ 9 | class Ship extends \CCOrbit_Ship 10 | { 11 | /** 12 | * initialize the ship 13 | */ 14 | public function wake() 15 | { 16 | $uri = \CCServer::server('REQUEST_URI', '/' ); 17 | 18 | // fix doubled slashes 19 | $uri_fixed = preg_replace( '/(\/+)/','/', $uri ); 20 | 21 | // redirect if not match 22 | if ( $uri != $uri_fixed ) 23 | { 24 | \CCRedirect::to( $uri_fixed )->send( true ); die; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /CCF/orbit/Dev/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Dev", 3 | "version": "2.0.0", 4 | "description": "For fast and reliable web applications with a twist!", 5 | "homepage": "http://clancats.com", 6 | "keywords": [ 7 | 8 | ], 9 | "license": "MIT", 10 | "authors": [ 11 | { 12 | "name": "Mario Döring", 13 | "email": "mario@clancats.com" 14 | } 15 | ], 16 | "namespace": "Dev" 17 | } -------------------------------------------------------------------------------- /CCF/orbit/Dev/classes/Ship.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class Ship extends \CCOrbit_Ship 13 | { 14 | /** 15 | * initialize the ship 16 | * 17 | * @return void 18 | */ 19 | public function wake() 20 | { 21 | if ( !\ClanCats::in_development() ) 22 | { 23 | return; 24 | } 25 | 26 | // get all controllers in the dev namespace 27 | foreach( \CCFile::ls( \CCPath::controllers( 'Dev::*Controller'.EXT ) ) as $path ) 28 | { 29 | $name = \CCStr::cut( basename( $path ), 'Controller'.EXT ); 30 | \CCRouter::on( 'dev/'.\CCStr::lower( $name ), 'Dev::'.$name ); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /CCF/orbit/Dev/controllers/CommonController.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class CommonController extends \CCViewController 13 | { 14 | 15 | /** 16 | * show php info 17 | */ 18 | public function action_phpinfo() { 19 | 20 | // set topic 21 | $this->theme->topic = "php info"; 22 | 23 | // get php info in a string 24 | ob_start(); phpinfo(); $pinfo = ob_get_contents(); ob_end_clean(); 25 | 26 | // get only the body 27 | $pinfo = preg_replace( '%^.*(.*).*$%ms','$1',$pinfo); 28 | 29 | // add table class 30 | $pinfo = str_replace( '' => '
' 35 | )); 36 | 37 | echo $pinfo; 38 | } 39 | 40 | /** 41 | * show stylesheet overview 42 | */ 43 | public function action_css() { 44 | 45 | // set topic 46 | $this->theme->topic = "CSS Overview"; 47 | 48 | // load the css overview 49 | $this->view = CCView::create( 'development/cssView' ); 50 | } 51 | } -------------------------------------------------------------------------------- /CCF/orbit/Dev/controllers/MailController.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | use \CCIn; 13 | use \CCConfig; 14 | use \CCMail; 15 | 16 | class MailController extends \CCViewController 17 | { 18 | /** 19 | * Mail index 20 | */ 21 | public function action_index() 22 | { 23 | // set our session view 24 | $this->view = \CCView::create( 'Dev::mail' ); 25 | 26 | list( $from_email, $from_name ) = CCConfig::create( 'mail' )->from; 27 | 28 | $this->view->from_email = $from_email; 29 | $this->view->from_name = $from_name; 30 | 31 | $this->view->config_dump = nl2br( str_replace( array( " ", "\t" ), array( ' ', '  ' ), print_r( CCConfig::create('mail')->raw(), true ) ) ); 32 | 33 | // title 34 | $this->theme->topic = 'Mail Sandbox'; 35 | 36 | // send a mail? 37 | if ( CCIn::method( 'post' ) ) 38 | { 39 | // send mails 40 | $mail = CCMail::create(); 41 | 42 | $mail->to( CCIn::post( 'to' ) ); 43 | $mail->from( CCIn::post( 'from' ), CCIn::post( 'from_name' ) ); 44 | 45 | $mail->subject( CCIn::post( 'subject' ) ); 46 | 47 | $mail->message( CCIn::post( 'message' ) ); 48 | 49 | foreach( explode( ',', CCIn::post( 'bcc' ) ) as $address ) 50 | { 51 | $mail->bcc( $address ); 52 | } 53 | 54 | $mail->is_plaintext( (bool) CCIn::post( 'plaintext', false ) ); 55 | 56 | // send 57 | $mail->send(); 58 | 59 | \UI\Alert::add( 'success', 'Mail has been send.' ); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /CCF/orbit/Dev/controllers/sessionController.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | namespace Dev; 13 | 14 | use CCIn; 15 | use CCSession; 16 | 17 | class SessionController extends \CCViewController 18 | { 19 | /** 20 | * The current session manager 21 | */ 22 | private $manager = null; 23 | 24 | /** 25 | * Get the session instance on controller wake 26 | */ 27 | public function wake() 28 | { 29 | $this->manager = \CCSession::manager( CCIn::get( 'manager' ) ); 30 | } 31 | 32 | /** 33 | * Session index 34 | */ 35 | public function action_index() 36 | { 37 | // Did we recive post values? 38 | if ( CCIn::method( 'post' ) ) 39 | { 40 | $this->manager->set( CCIn::post( 'key' ), CCIn::post( 'value' ) ); 41 | } 42 | 43 | // set our session view 44 | $this->view = \CCView::create( 'Dev::session' ); 45 | 46 | // title 47 | $this->theme->topic = 'Session Sandbox'; 48 | 49 | // set view data 50 | $this->view->data_dump = print_r( $this->manager->raw(), true ); 51 | $this->view->config_dump = print_r( $this->manager, true ); 52 | } 53 | 54 | /** 55 | * Switch the current session manager 56 | */ 57 | public function action_manager() 58 | { 59 | return \CCRedirect::action( 'index', array( 'manager' => CCIn::post( 'name' ) ) ); 60 | } 61 | 62 | /** 63 | * regenerate session 64 | */ 65 | public function action_regenerate( $instance_key ) 66 | { 67 | $this->manager->regenerate(); 68 | return \CCRedirect::action( 'index', array(), true ); 69 | } 70 | 71 | /** 72 | * destroy session 73 | */ 74 | public function action_destroy( $instance_key ) 75 | { 76 | $this->manager->destroy(); 77 | return \CCRedirect::action( 'index', array(), true ); 78 | } 79 | } -------------------------------------------------------------------------------- /CCF/orbit/Dev/views/mail.php: -------------------------------------------------------------------------------- 1 |

Mail Sandbox

2 | 3 |
4 | 5 |
6 |

Sending

7 |
8 |
9 | 10 | 11 |
12 |
13 | 14 | 15 | comma separated. 16 |
17 |
18 | 19 | 20 |
21 |
22 | 23 | 24 |
25 |
26 | 27 | 28 |
29 |
30 | 31 | 32 |
33 |
34 | 37 |
38 | 39 |
40 |
41 | 42 |
43 | 44 |

Environment

45 |
46 |
47 |
48 | -------------------------------------------------------------------------------- /CCF/orbit/Dev/views/session.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Functions

4 | Reload 5 | Regenerate 6 | Destroy 7 |
8 | 9 |

Set

10 |
11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 |
22 | 23 |

Switch manager

24 |
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 |
35 |

Data

36 |
37 | 38 |

Manager

39 |
40 |
41 |
42 | -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/blueprint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Packtacular", 3 | "version": "1.0.0", 4 | "description": "", 5 | "homepage": "http://clancats.com", 6 | "keywords": [ 7 | "clancats" 8 | ], 9 | "license": "MIT", 10 | "author": [ 11 | { 12 | "name": "Mario Döring", 13 | "email": "mario@clancats.com" 14 | } 15 | ], 16 | "namespace": "Packtacular", 17 | 18 | "install": false, 19 | "uninstall": false 20 | } -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/classes/CCAsset.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class CCAsset extends \Core\CCAsset 13 | { 14 | /** 15 | * Add something to the packer 16 | * This method allows you to add stylesheets, javascript files etc. 17 | * to one single file. 18 | * 19 | * exmaple: 20 | * CCAsset::pack( 'jquery.js', 'footer', 'core' ); 21 | * 22 | * @param string |array $item An single or an array of assets 23 | * @param string $name The holders name like header / theme / footer 24 | * @param string $pack The package like core lib etc. 25 | * @return void 26 | */ 27 | public static function pack( $item, $name = null, $pack = 'pack' ) 28 | { 29 | if ( !is_array( $item ) ) 30 | { 31 | $items = array( $item => $name ); 32 | } 33 | 34 | $path = PUBLICPATH.static::holder( $name )->path; 35 | 36 | foreach( $items as $file => $holder ) 37 | { 38 | static::holder( $name )->assets['_packtacular'][$pack][CCStr::extension( $item )][] = $path.$file; 39 | } 40 | } 41 | 42 | /** 43 | * Get assets code by type from an holder 44 | * 45 | * @param string $extension 46 | * @param string $name 47 | */ 48 | public static function code( $extension = null, $name = null ) 49 | { 50 | $assets = static::get( $extension, $name ); 51 | 52 | // let packtacular handle css and less files 53 | if ( $extension == 'css' ) 54 | { 55 | foreach( static::holder( $name )->get('_packtacular') as $key => $pack ) 56 | { 57 | if ( !array_key_exists( 'less', $pack ) ) 58 | { 59 | $pack['less'] = array(); 60 | } 61 | 62 | if ( !array_key_exists( 'css', $pack ) ) 63 | { 64 | $pack['css'] = array(); 65 | } 66 | 67 | $files = array_merge( $pack['css'], $pack['less'] ); 68 | 69 | if ( !empty( $files ) ) 70 | { 71 | CCArr::push( Packtacular::handle( $files, basename( static::holder( $name )->path ).'/'.$name.'/', $key.'_{time}.css' ), $assets ); 72 | } 73 | } 74 | } 75 | // let packtacular handle js files 76 | elseif ( $extension == 'js' ) 77 | { 78 | foreach( static::holder( $name )->get( '_packtacular' ) as $key => $pack ) 79 | { 80 | if ( !array_key_exists( 'js', $pack ) ) 81 | { 82 | $pack['js'] = array(); 83 | } 84 | 85 | if ( !empty( $pack['js'] ) ) 86 | { 87 | CCArr::push( Packtacular::handle( $pack['js'], basename( static::holder( $name )->path ).'/'.$name.'/', $key.'_{time}.js' ), $assets ); 88 | } 89 | } 90 | } 91 | 92 | $buffer = ""; 93 | 94 | foreach( $assets as $item ) 95 | { 96 | $buffer .= call_user_func( 'CCAsset::'.$extension, $item, $name ); 97 | } 98 | 99 | return $buffer; 100 | } 101 | 102 | /** 103 | * Get all stylesheets from an instance 104 | * 105 | * @param string $name 106 | * @return string 107 | */ 108 | public static function styles( $name = null ) 109 | { 110 | $assets = static::holder( $name )->assets['_packtacular']; 111 | 112 | foreach( $assets as $key => $pack ) 113 | { 114 | if ( !array_key_exists( 'less', $pack ) ) 115 | { 116 | $pack['less'] = array(); 117 | } 118 | 119 | if ( !array_key_exists( 'css', $pack ) ) 120 | { 121 | $pack['css'] = array(); 122 | } 123 | 124 | $files = array_merge( $pack['css'], $pack['less'] ); 125 | 126 | static::add( Packtacular::handle( $files, basename( static::holder( $name )->path ).'/'.$name.'/', $key.'_{time}.css' ), $name ); 127 | } 128 | 129 | return parent::styles( $name ); 130 | } 131 | 132 | /** 133 | * Get all scripts from an instance 134 | * 135 | * @param string $name 136 | * @return string 137 | */ 138 | public static function scripts( $name = null ) 139 | { 140 | $assets = static::holder( $name )->assets['_packtacular']; 141 | 142 | foreach( $assets as $key => $pack ) { 143 | 144 | if ( !array_key_exists( 'js', $pack ) ) 145 | { 146 | $pack['js'] = array(); 147 | } 148 | 149 | static::add( Packtacular::handle( $pack['js'], basename( static::holder( $name )->path ).'/'.$name.'/', $key.'_{time}.js' ), $name ); 150 | } 151 | 152 | return parent::scripts( $name ); 153 | } 154 | 155 | /* 156 | * Content 157 | */ 158 | public $assets = array( 159 | '_packtacular' => array(), 160 | ); 161 | } -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/classes/Packtacular.php: -------------------------------------------------------------------------------- 1 | 10 | * @version 0.7 11 | * @copyright 2010 - 2012 ClanCats GmbH 12 | * 13 | */ 14 | class Packtacular 15 | { 16 | /* 17 | * the cache path 18 | */ 19 | private static $path = ""; 20 | 21 | /** 22 | * static init 23 | * 24 | * @return void 25 | */ 26 | public static function _init() 27 | { 28 | if ( !$path = CCConfig::create( "Packtacular::packtacular" )->path ) { 29 | throw new CCException( "CCPacktacular - please set your packtacular path!" ); 30 | } 31 | 32 | // is there a cache dir? 33 | if ( !is_dir( PUBLICPATH.$path ) ) { 34 | if ( !mkdir( PUBLICPATH.$path, 0755, true ) ) { 35 | throw new CCException( "CCPacktacular - could not create Packtacular folder at: {$path}" ); 36 | } 37 | } 38 | 39 | static::$path = '/'.$path; 40 | } 41 | 42 | /** 43 | * handle some files 44 | * 45 | * @param array $files 46 | * @param string $dir 47 | * @param string $file 48 | */ 49 | public static function handle( $files, $dir, $file ) { 50 | 51 | if ( empty( $files ) ) 52 | { 53 | return null; 54 | } 55 | 56 | $last_change = static::last_change( $files ); 57 | $file = str_replace( "{time}", $last_change, $file); 58 | 59 | // the main needed paths 60 | $file = static::$path.$dir.$file; 61 | $dir = static::$path.$dir; 62 | 63 | // does the file already exist? 64 | if ( file_exists( PUBLICPATH.$file ) ) { 65 | return $file; 66 | } 67 | 68 | // is there a cache dir? 69 | if ( !is_dir( PUBLICPATH.$dir ) ) { 70 | if ( !mkdir( PUBLICPATH.$dir, 0755, true ) ) { 71 | throw new CCException( "CCPacktacular - could not create Packtacular folder at: {$dir}" ); 72 | } 73 | } 74 | 75 | // get the pack file extention 76 | $ext = CCStr::extension( $file ); 77 | 78 | // get all the content 79 | $content = ""; 80 | foreach( $files as $tmp_file ) { 81 | $content .= "\n\n/*\n * file: ".str_replace( PUBLICPATH, '', $tmp_file )."\n */\n\n"; 82 | $content .= file_get_contents( $tmp_file ); 83 | 84 | } 85 | 86 | // call the modifier 87 | if ( method_exists( get_class(), "handle_".$ext ) ) { 88 | $content = call_user_func_array( "static::handle_".$ext, array( $content ) ); 89 | } 90 | 91 | // save the file 92 | if ( !file_put_contents( PUBLICPATH.$file, $content ) ) { 93 | throw new CCException( "CCPacktacular - could not create packed file {$file}!" ); 94 | } 95 | 96 | // return the path 97 | return $file; 98 | } 99 | 100 | /** 101 | * get the last changed date of an array of files 102 | * 103 | * @param array $files 104 | * @return int 105 | */ 106 | protected static function last_change( $files ) { 107 | foreach( $files as $key => $file ) { 108 | $files[$key] = filemtime( $file ); 109 | } 110 | 111 | sort( $files ); $files = array_reverse( $files ); 112 | 113 | return $files[key($files)]; 114 | } 115 | 116 | /** 117 | * compile css files 118 | * 119 | * @param string $css 120 | * @return string 121 | */ 122 | protected static function handle_css( $css ) 123 | { 124 | $less = new \lessc(); 125 | $less->setFormatter("compressed"); 126 | //$less->setFormatter( 'compressed' ); 127 | $less = (string) $less->parse( $css ); 128 | // remove this random crappy ascii 160 char 129 | $less = utf8_encode( str_replace( chr(160), ' ', $less ) ); 130 | $less = str_replace( 'Â', "", $less ); 131 | return $less; 132 | // remove double whitespaces 133 | return preg_replace('/\s+/', ' ', $less ); 134 | } 135 | 136 | /** 137 | * compile css files 138 | * 139 | * @param string $css 140 | * @return string 141 | */ 142 | protected static function handle_js( $js ) { 143 | return $js; 144 | $url = 'http://closure-compiler.appspot.com/compile'; 145 | $data = array( 146 | 'compilation_level' => 'SIMPLE_OPTIMIZATIONS', 147 | 'output_format' => 'text', 148 | 'output_info' => 'compiled_code', 149 | 'language' => 'ECMASCRIPT5', 150 | 'js_code' => $js, 151 | ); 152 | $data = http_build_query($data); 153 | 154 | $options = array( 155 | 'http' => array( 156 | 'method' => 'POST', 157 | 'header' => "Connection: close\r\n". 158 | "Content-type: application/x-www-form-urlencoded\r\n". 159 | "Content-Length: ".strlen($data)."\r\n", 160 | 'content' => $data, 161 | ) 162 | ); 163 | $context = stream_context_create($options); 164 | $result = file_get_contents($url, false, $context); 165 | 166 | 167 | return $result; 168 | } 169 | } -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/classes/Ship.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class Ship extends \CCOrbit_Ship 13 | { 14 | /** 15 | * initialize the ship 16 | * 17 | * @return void 18 | */ 19 | public function wake() 20 | { 21 | // wrap the assets 22 | \CCFinder::alias( 'CCAsset', __DIR__.'/CCAsset'.EXT ); 23 | 24 | // map the other classes 25 | \CCFinder::package( __DIR__.'/', array( 26 | 'Packtacular' => 'Packtacular'.EXT, 27 | 'Packtacular\\Theme' => 'Theme'.EXT, 28 | 'lessc' => 'lib/lessc.inc'.EXT, 29 | )); 30 | 31 | // add writeable directory hook 32 | \CCEvent::mind( 'ccdoctor.permissions', function() { 33 | return PUBLICPATH.\CCConfig::create( "Packtacular::packtacular" )->path; 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/classes/Theme.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 2.0 9 | * @copyright 2010 - 2015 ClanCats GmbH 10 | * 11 | */ 12 | class Theme extends \CCTheme 13 | { 14 | /** 15 | * the theme configuration 16 | * 17 | * @var CCConfig 18 | */ 19 | public static $config = null; 20 | 21 | /** 22 | * static theme init 23 | * 24 | * @return void 25 | */ 26 | public static function _init() 27 | { 28 | static::$config = \CCConfig::create( static::view_namespace().'::theme' ); 29 | } 30 | 31 | /** 32 | * Returns the current view namespace 33 | * You need to implement this method in your theme subclass. 34 | * 35 | * @return string 36 | */ 37 | public static function view_namespace() 38 | { 39 | return __NAMESPACE__; 40 | } 41 | 42 | /** 43 | * This the current public namespace 44 | * By default its simply the PUBLICPATH/assets/ 45 | * You need to implement this method in your theme subclass. 46 | * 47 | * @return string 48 | */ 49 | public static function public_namespace() 50 | { 51 | return "assets/".__NAMESPACE__.'/'; 52 | } 53 | 54 | /** 55 | * custom theme render stuff 56 | * 57 | * @param string $file 58 | * @return string 59 | */ 60 | public function render( $file = null ) 61 | { 62 | foreach( static::$config->default as $key => $value ) 63 | { 64 | if ( !$this->has( $key ) ) 65 | { 66 | $this->set( $key, $value ); 67 | } 68 | } 69 | 70 | // assign the topic to the title 71 | if ( $this->has( 'topic' ) && $this->has( 'title' ) ) 72 | { 73 | $this->title = sprintf( $this->get( 'title' ), $this->get( 'topic' ) ); 74 | } 75 | 76 | // add assets from config 77 | foreach( static::$config->assets as $asset => $container ) 78 | { 79 | $container = explode( "@", $container ); 80 | 81 | if ( isset( $container[1] ) ) 82 | { 83 | \CCAsset::pack( $asset, $container[0], $container[1] ); 84 | } 85 | else 86 | { 87 | \CCAsset::add( $asset, $container[0] ); 88 | } 89 | } 90 | 91 | return parent::render( $file ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /CCF/orbit/Packtacular/config/packtacular.config.php: -------------------------------------------------------------------------------- 1 | 7 | * @version 0.5 8 | * @copyright 2010 - 2013 ClanCats GmbH 9 | * 10 | */ 11 | return array( 12 | 13 | /* 14 | * cache path 15 | */ 16 | 'path' => 'assets/packtacular/', 17 | 18 | /* 19 | * auto minify stylesheets? 20 | */ 21 | 'minify_css' => false, 22 | 23 | /* 24 | * wrap 25 | */ 26 | ); -------------------------------------------------------------------------------- /CCF/orbit/orbit.json: -------------------------------------------------------------------------------- 1 | { 2 | "repos": [ 3 | { 4 | "name": "ClanCats Orbit Repository", 5 | "url": "http://framework.clancats.com/orbit/repo", 6 | "website": "http://framework.clancats.com/orbit" 7 | } 8 | ], 9 | "installed": { 10 | "Packtacular": "CCF/orbit/Packtacular/", 11 | "Bootstrap": "CCF/app/themes/Bootpack/", 12 | "CleanRedirect": "CCF/orbit/CleanRedirect/", 13 | "Dev": "CCF/orbit/Dev/" 14 | } 15 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 ClanCats GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![ClanCats Framework 2.1](https://cloud.githubusercontent.com/assets/956212/5882224/c7e30646-a347-11e4-9af3-f05cb7fb829f.jpg) 2 | 3 | [![Build Status](https://travis-ci.org/ClanCats/Framework.svg?branch=master&style=flat)](https://travis-ci.org/ClanCats/Framework) 4 | [![License](http://img.shields.io/packagist/l/clancats/framework.svg?style=flat)](https://github.com/ClanCats/Framework) 5 | [![Downloads](http://img.shields.io/packagist/dt/clancats/core.svg?style=flat)](https://github.com/ClanCats/Framework) 6 | 7 | 8 | ClanCatsFramework, painless web development no overkill. HMVC PHP framework. 9 | 10 | * [Philosophy](#philosophy) 11 | * [History](#history) 12 | * [Installation](#installation) 13 | * [Requirements](#requirements) 14 | * [Permissions](#permissions) 15 | * [Structure](#structure) 16 | * [Configuration](#configuration) 17 | * [Routing](#routing) 18 | 19 | _This is the Application repository if you like to contribute take a look at the core repository:_ https://github.com/ClanCats/Core 20 | 21 | ## Philosophy 22 | 23 | There are a many brilliant frameworks out there and I don't want to reinvent the wheel. 24 | My vision of CCF is a: 25 | 26 | * modern 27 | * well-architected 28 | * high performance 29 | * **user friendly** 30 | 31 | full stack php framework. 32 | 33 | User friendly or developer friendly is the core philosophy. The trick should be to keep the balance between the simplest and the best solution for a problem. I've been working on a lot big applications using _Zend and Symfony2_ and there was always the point where I looked at the code and thought: 34 | > "wait so to generate a random string I need a class extending a container wich provides me the util service factory to create a new string util instance where i can execute the random string method on?". 35 | 36 | Often it's a complete overkill to reach a simple goal using these frameworks. So the goal of CCF is to make development comfortable instead of following 100% a convetion. 37 | 38 | ## History 39 | 40 | This PHP framework was originally build 2010 as the core of a social Plattform called "ClanCats". In 2012 I decided to split the core and the application apart, so CCF was born. After developing several application on CCF v1.0, the point has come to rethink the core structure and rewrite the entire thing to a new version that should go open source. 41 | 42 | ## Installation 43 | 44 | Setting up a new instance of CCF2 can be done simply with one command, or, in other words, with composer. 45 | 46 | Run the following command to create a new CCF project. 47 | 48 | ``` 49 | $ composer create-project clancats/framework --prefer-dist 50 | ``` 51 | 52 | _Composer not installed? Read the installation guide here: https://getcomposer.org/download/_ 53 | 54 | ## Requirements 55 | 56 | To run this framework please check the following requirements: 57 | 58 | * PHP >= 5.3.9 59 | * PHP JSON 60 | * PHP MCrypt 61 | * PHP Multibyte String 62 | * Apache with mod_rewrite or Nginx 63 | 64 | ## Permissions 65 | 66 | For some operations ( storage, packtacular etc. ) we may need to grant write permissions in the file system. 67 | 68 | **Storage:** `/CCF/storage/`
69 | **Packtacular:** `/public/assets/packtacular/` 70 | 71 | You can also set these using the `cli` doctor. 72 | 73 | ``` 74 | $ php cli doctor::permissions 75 | ``` 76 | 77 | If you get an error setting the permissions try to run the that command with `sudo`. 78 | 79 | --- 80 | 81 | ## Structure 82 | 83 | In the new CCF2 folder structure we split some things apart to make deployment much more efficient.
84 | 85 | 86 | ``` 87 | - CCF/ 88 | - app/ // Your Application 89 | - core/ // The CCF Core 90 | - orbit/ // Orbit ships ( plugins / modules ) 91 | - storage/ // Internal file storage for logs, cache etc. 92 | - vendor/ // Composer vendor 93 | 94 | - boot/ 95 | - environment.php // The Environment configuration 96 | - paths.php // Framework paths configuration 97 | 98 | - cli // Command line utility 99 | - composer.json 100 | - framework.php 101 | - phpunit.xml 102 | 103 | - public/ 104 | - index.php // Web Application public 105 | ``` 106 | 107 | --- 108 | 109 | ## Configuration 110 | 111 | There is usually no configuration _required_ to just run the framework (depending on your environment). We do, however, recommend to do some configuration before you start developing your awesome application. 112 | 113 | ### Boot 114 | 115 | The boot configuration allow you change the core behavior of the CCF. 116 | 117 | #### Environment 118 | 119 | Define how your application detects the environment.
120 | You can create an entirely new script of your own to return the runtime environment or you can make use of the env detector. 121 | 122 | ``` 123 | /boot/environment.php 124 | ``` 125 | 126 | > Check out the environment docs: [Environment](/docs/application/environment) 127 | 128 | #### Paths 129 | 130 | Plan on running multiple CCF installations on one machine? Using just a single core? This is no problem because you can modify the CCF paths. 131 | 132 | ``` 133 | /boot/paths.php 134 | ``` 135 | 136 | You are also free to add new paths. Adding a new element to the array will add the path to runtime and also create a path define: 137 | 138 | ``` 139 | = PATH 140 | test = TESTPATH 141 | ``` 142 | 143 | ### main config 144 | 145 | You will find an initial **main configuration** file under: 146 | 147 | ``` 148 | /CCF/app/config/main.config.php 149 | ``` 150 | 151 | #### Security Salt 152 | 153 | At several points CCF is going to encrypt certain things by employing salt. You should define your own salt to keep your application secure. 154 | 155 | You can generate a random salt using the following command: 156 | 157 | ``` 158 | $ php cli doctor::security_key 159 | ``` 160 | 161 | **When using composer to create a new project the salt is generated automatically.** 162 | 163 | Otherwise you will find the key under security in the main configuration: 164 | 165 | ```php 166 | 'security' => array( 167 | 'salt' => 'L~7(%(9=@9+8u.Oo4+ysT45fkA4,82', 168 | ), 169 | ``` 170 | 171 | #### Path offset 172 | 173 | Maybe you would like to run your application from somewhere other than the domain root, e.g. from a subfolder. 174 | *forums*. 175 | 176 | ```php 177 | // www.yourdomain.com/forums/ 178 | 'url' => array( 179 | 'path' => '/forums/', 180 | ), 181 | ``` 182 | 183 | > For everything else, check out the main configuration documents: [Configuration](/docs/application/main_configuration/) 184 | 185 | --- 186 | 187 | ## Routing 188 | 189 | Depending on your system you will need to set something up so that all public requests end on the `public/index.php` file. 190 | 191 | CCF ships with an `.htaccess` for apache systems with `mod_rewrite` enabled: 192 | 193 | ```ini 194 | RewriteEngine On 195 | # RewriteBase /subdir/ 196 | 197 | # Only Rewrite URL if file not exits 198 | RewriteCond %{REQUEST_FILENAME} !-f 199 | RewriteCond %{REQUEST_FILENAME} !-d 200 | 201 | # Default 202 | RewriteRule ^(.*)$ index.php?/$1 [QSA,L] 203 | ``` 204 | -------------------------------------------------------------------------------- /boot/environment.php: -------------------------------------------------------------------------------- 1 | 'development', 14 | * 'test.*' => 'staging', 15 | * ':all' => 'production', 16 | * 17 | * passing an string: 18 | * Will set the environment directly example: 19 | * return $_SERVER[ 'CCF_ENV' ] 20 | * 21 | */ 22 | return array( 23 | 24 | /* 25 | * probably an local environment for example: 26 | * localhost 27 | * local.example.com 28 | */ 29 | 'local*' => 'development', 30 | 31 | /* 32 | * probably an testing environment for example: 33 | * test.example.com 34 | */ 35 | 'test.*' => 'test', 36 | 37 | /* 38 | * everything else for example: 39 | * www.example.com 40 | * clancats.com 41 | */ 42 | ':all' => 'production', 43 | ); -------------------------------------------------------------------------------- /boot/paths.php: -------------------------------------------------------------------------------- 1 | CCROOT.'public/', 22 | 23 | /* 24 | *--------------------------------------------------------------- 25 | * CCF path = CCFPATH 26 | *--------------------------------------------------------------- 27 | * 28 | * The path to the framework directory. In the default use case 29 | * this conatins the app, core, orbit and vendor. But also 30 | * the storage uses this path to set his default store direcotry. 31 | */ 32 | 'ccf' => CCROOT.'CCF/', 33 | 34 | /* 35 | *--------------------------------------------------------------- 36 | * App path = APPPATH 37 | *--------------------------------------------------------------- 38 | * 39 | * The app directory contains the main application. This define 40 | * can be useful if you like to switch between apps. 41 | */ 42 | 'app' => CCROOT.'CCF/app/', 43 | 44 | /* 45 | *--------------------------------------------------------------- 46 | * Core path = COREPATH 47 | *--------------------------------------------------------------- 48 | * 49 | * The core directory contains of course the CCF core. 50 | * Changing this can be useful if you have multiple 51 | * installations that should use the same core. 52 | * 53 | * @todo: take this back to CCF/core/ when the composer installer 54 | * issue is fixed. 55 | */ 56 | 'core' => CCROOT.'CCF/vendor/clancats/core/src/', 57 | 58 | /* 59 | *--------------------------------------------------------------- 60 | * Orbit path = ORBITPATH 61 | *--------------------------------------------------------------- 62 | * 63 | * The orbit directory contains the most installed ships. 64 | * Changing this can be useful if you have multiple 65 | * installations that should use the same orbit packages. 66 | */ 67 | 'orbit' => CCROOT.'CCF/orbit/', 68 | 69 | /* 70 | *--------------------------------------------------------------- 71 | * Vendor path = VENDORPATH 72 | *--------------------------------------------------------------- 73 | * 74 | * The vendor directory contains the composer packages. 75 | */ 76 | 'vendor' => CCROOT.'CCF/vendor/', 77 | ); -------------------------------------------------------------------------------- /boot/phpunit.php: -------------------------------------------------------------------------------- 1 | _data = CCConfig::create( 'Core::phpunit/database' )->_data; 51 | 52 | // delete all database table 53 | DB\Migrator::hard_reset(); 54 | DB\Migrator::hard_reset( 'phpunit' ); 55 | 56 | // run the migrations 57 | DB\Migrator::migrate( true ); -------------------------------------------------------------------------------- /cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | ' ); 65 | 66 | // continue if no command given 67 | if ( empty( $_reply ) ) { 68 | continue; 69 | } 70 | 71 | // check for exit command 72 | if ( $_reply == 'bye' ) { 73 | die; 74 | } 75 | 76 | // last char 77 | $last_char = substr( $_reply, -1 ); 78 | 79 | // get first cmd 80 | $first_cmd = array_shift( array_values( explode( ' ', $_reply ) ) ); 81 | 82 | // check if we should execute an console controller 83 | if ( $first_cmd == 'run' ) { 84 | CCConsoleController::parse( substr( $_reply, 4 ) ); continue; 85 | } 86 | 87 | // add semicolon if missing 88 | if ( $last_char != ";" && $last_char != "}" ) { 89 | $_reply .= ";"; 90 | } 91 | 92 | /* 93 | * these commands cannot be used with a var assignment 94 | */ 95 | $no_return_cmds = array( 96 | 'throw', 97 | 'echo', 98 | ); 99 | 100 | // catch the return 101 | if ( !in_array( $first_cmd, $no_return_cmds ) ) { 102 | $_reply = '$_return_data = '.$_reply; 103 | } 104 | 105 | // output buffer 106 | ob_start(); 107 | // run the command 108 | $return = eval( $_reply ); 109 | echo $out = ob_get_clean(); 110 | 111 | // add break if something where outputet 112 | if ( strlen( $out ) > 0 ) { 113 | echo "\n"; 114 | } 115 | 116 | // dump the return 117 | if ( !in_array( $first_cmd, $no_return_cmds ) ) { 118 | var_dump( $_return_data ); 119 | } 120 | } -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "clancats/framework", 3 | "description": "ClanCats Framework, because your time is precious. HMVC PHP framework.", 4 | "homepage": "http://www.clancats.io", 5 | "keywords": ["ccf", "framework", "clancats"], 6 | "license": "MIT", 7 | "require": { 8 | "clancats/core": "2.0.*" 9 | }, 10 | "config": { 11 | "vendor-dir": "CCF/vendor" 12 | }, 13 | "scripts": { 14 | "post-install-cmd": [ 15 | "php cli phpunit::build" 16 | ], 17 | "post-update-cmd": [ 18 | "php cli phpunit::build" 19 | ], 20 | "post-create-project-cmd": [ 21 | "php cli doctor::security_key" 22 | ] 23 | }, 24 | "minimum-stability": "stable" 25 | } 26 | -------------------------------------------------------------------------------- /framework.php: -------------------------------------------------------------------------------- 1 | 13 | * @version 2.0 14 | * @copyright 2010 - 2015 ClanCats GmbH 15 | * 16 | * ### 17 | * 18 | *--------------------------------------------------------------- 19 | * Application root 20 | *--------------------------------------------------------------- 21 | * 22 | * The application root or CCROOT defines the absoulte path to 23 | * the framework. 24 | */ 25 | define( 'CCROOT', __DIR__.'/' ); 26 | 27 | /* 28 | *--------------------------------------------------------------- 29 | * file extension 30 | *--------------------------------------------------------------- 31 | * 32 | * This defines the global used file extention of the php files. 33 | */ 34 | define( 'EXT', '.php' ); 35 | 36 | /* 37 | *--------------------------------------------------------------- 38 | * get the boot paths 39 | *--------------------------------------------------------------- 40 | * 41 | * You can modify that file, its yours. Its especially useful 42 | * if you have multiple installations on one server and want 43 | * to use just one core or one orbit for them all. 44 | */ 45 | $paths = require CCROOT.'boot/paths'.EXT; 46 | 47 | /* 48 | *--------------------------------------------------------------- 49 | * the direcotries 50 | *--------------------------------------------------------------- 51 | * 52 | * Here are the module directories defined. 53 | * @ToDo: move them to the classes that use that direcotries. 54 | * that way the you could subclass a class and define 55 | * a custom direcotry. 56 | */ 57 | $directories = array( 58 | 'controller' => 'controllers/', 59 | 'language' => 'language/', 60 | 'class' => 'classes/', 61 | 'console' => 'console/', 62 | 'config' => 'config/', 63 | 'view' => 'views/', 64 | 'test' => 'tests/', 65 | ); 66 | 67 | /* 68 | *--------------------------------------------------------------- 69 | * wake CCF 70 | *--------------------------------------------------------------- 71 | * 72 | * Lets require the ClanCatsFramework resources 73 | */ 74 | require $paths['core'].'wake'.EXT; 75 | 76 | /* 77 | *--------------------------------------------------------------- 78 | * wake the application 79 | *--------------------------------------------------------------- 80 | * 81 | * Lets wake the main application. 82 | */ 83 | ClanCats::wake_app( 'App' ); 84 | 85 | // at this point the app has completet its own boot 86 | CCProfiler::check( "CCF - App completed." ); -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine On 2 | # RewriteBase /subdir/ 3 | 4 | # Only Rewrite URL if file not exits 5 | RewriteCond %{REQUEST_FILENAME} !-f 6 | RewriteCond %{REQUEST_FILENAME} !-d 7 | 8 | # Default 9 | RewriteRule ^(.*)$ index.php?/$1 [QSA,L] -------------------------------------------------------------------------------- /public/assets/Bootstrap/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px auto; 3 | width: 100%; 4 | top: 0px; 5 | left: 0px; 6 | bottom: 0px; 7 | position: relative; 8 | background-color: #f5f5f5; 9 | font-family: 'Source Sans Pro', sans-serif; 10 | font-size: 14px; 11 | color: #222; 12 | font-weight: 300; 13 | } 14 | 15 | strong, b { 16 | font-weight: 400; 17 | } 18 | 19 | a { 20 | text-decoration: none; 21 | } 22 | 23 | a:hover { 24 | text-decoration: none; 25 | } 26 | 27 | h1, h2, h3, h4 { 28 | font-family: 'Source Sans Pro', sans-serif; 29 | font-weight: 200; 30 | color: #535353; 31 | padding-bottom: 10px; 32 | padding-top: 20px; 33 | margin: 0; 34 | text-transform: uppercase; 35 | } 36 | 37 | pre, pre.prettyprint { 38 | -webkit-border-radius: 2px; 39 | border-radius: 2px; 40 | border: 0; 41 | background-color: #333; 42 | color: #fff; 43 | padding: 10px; 44 | padding-left: 30px; 45 | line-height: 18px !important; 46 | margin-bottom: 20px; 47 | } 48 | 49 | pre code, pre.prettyprint code { 50 | display: block; 51 | padding: 0.5em; 52 | font-size: 12px; 53 | font-family: Menlo, Consolas, Monaco, "Lucida Console", monospace; 54 | } 55 | 56 | code { 57 | background-color: #fff3d6; 58 | color: #333; 59 | -webkit-border-radius: 2px; 60 | border-radius: 2px; 61 | padding: 1px 2px; 62 | font-family: Consolas, Monaco, "Lucida Console", monospace; 63 | } 64 | 65 | em { 66 | color: #666; 67 | } 68 | 69 | .label { 70 | text-transform: uppercase; 71 | font-weight: 200; 72 | font-size: 10px; 73 | } 74 | 75 | .fcode { 76 | font-family: Menlo, Consolas, Monaco, "Lucida Console", monospace; 77 | } 78 | 79 | .font-sm { 80 | font-size: 11px; 81 | } 82 | 83 | .font-xs { 84 | font-size: 10px; 85 | } 86 | 87 | .box-shadow-light { 88 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); 89 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); 90 | } 91 | 92 | .pdn5 { 93 | padding: 5px; 94 | } 95 | 96 | .pdn10 { 97 | padding: 10px; 98 | } 99 | 100 | .pdn15 { 101 | padding: 15px; 102 | } 103 | 104 | .pdn20 { 105 | padding: 20px; 106 | } 107 | 108 | .pdn25 { 109 | padding: 25px; 110 | } 111 | 112 | .pdnh5 { 113 | padding: 5px 0; 114 | } 115 | 116 | .pdnh10 { 117 | padding: 10px 0; 118 | } 119 | 120 | .pdnh20 { 121 | padding: 20px 0; 122 | } 123 | 124 | .pdnh25 { 125 | padding: 25px 0; 126 | } 127 | 128 | .pdnv5 { 129 | padding: 0 5px; 130 | } 131 | 132 | .pdnv10 { 133 | padding: 0 10px; 134 | } 135 | 136 | .pdnv20 { 137 | padding: 0 20px; 138 | } 139 | 140 | .pdnv25 { 141 | padding: 0 25px; 142 | } 143 | 144 | .pdnt5 { 145 | padding-top: 5px; 146 | } 147 | 148 | .pdnt10 { 149 | padding-top: 10px; 150 | } 151 | 152 | .pdnt20 { 153 | padding-top: 20px; 154 | } 155 | 156 | .pdnt25 { 157 | padding-top: 25px; 158 | } 159 | 160 | .mr5 { 161 | margin: 5px; 162 | } 163 | 164 | .mr10 { 165 | margin: 10px; 166 | } 167 | 168 | .mr20 { 169 | margin: 20px; 170 | } 171 | 172 | .mr25 { 173 | margin: 25px; 174 | } 175 | 176 | .mr50 { 177 | margin: 50px; 178 | } 179 | 180 | .mrt5 { 181 | margin-top: 5px; 182 | } 183 | 184 | .mrt10 { 185 | margin-top: 10px; 186 | } 187 | 188 | .mrt20 { 189 | margin-top: 20px; 190 | } 191 | 192 | .mrt25 { 193 | margin-top: 25px; 194 | } 195 | 196 | .mrt50 { 197 | margin-top: 50px; 198 | } 199 | 200 | .mrr5 { 201 | margin-right: 5px; 202 | } 203 | 204 | .mrr10 { 205 | margin-right: 10px; 206 | } 207 | 208 | .mrr20 { 209 | margin-right: 20px; 210 | } 211 | 212 | .mrr25 { 213 | margin-right: 25px; 214 | } 215 | 216 | .mrl5 { 217 | margin-left: 5px; 218 | } 219 | 220 | .mrl10 { 221 | margin-left: 10px; 222 | } 223 | 224 | .mrl20 { 225 | margin-left: 20px; 226 | } 227 | 228 | .mrl25 { 229 | margin-left: 25px; 230 | } 231 | 232 | input[type="text"], input[type="email"], input[type="search"], 233 | input[type="password"] { 234 | -webkit-appearance: none; 235 | -moz-appearance: none; 236 | } 237 | 238 | .btn, .form-control { 239 | -webkit-border-radius: 0; 240 | border-radius: 0; 241 | -webkit-box-shadow: none; 242 | box-shadow: none; 243 | border: 0; 244 | font-weight: 300; 245 | } 246 | 247 | .control-label { 248 | font-weight: 300; 249 | padding-bottom: 10px; 250 | } 251 | 252 | .form-control { 253 | height: 39px; 254 | font-size: 15px; 255 | border-width: 2px; 256 | border-style: solid; 257 | border-color: #dbdbdb; 258 | } 259 | 260 | .form-control:focus { 261 | -webkit-box-shadow: none; 262 | box-shadow: none; 263 | } 264 | 265 | .btn { 266 | border: 2px solid; 267 | padding: 7px 11px; 268 | opacity: 0.8; 269 | } 270 | 271 | .btn:hover { 272 | opacity: 1; 273 | } 274 | 275 | .btn.btn-lg { 276 | padding: 7px 15px; 277 | font-size: 16px; 278 | } 279 | 280 | .btn.btn-sm { 281 | padding: 4px 9px; 282 | } 283 | 284 | .btn.btn-xs { 285 | padding: 0px 4px; 286 | } 287 | 288 | .btn.btn-primary { 289 | background-color: #3b92d4; 290 | border-color: #3b92d4; 291 | opacity: 1; 292 | } 293 | 294 | .btn.btn-primary:hover, .btn.btn-primary.active { 295 | background-color: transparent; 296 | color: #3b92d4; 297 | } 298 | 299 | .btn.btn-dark { 300 | background-color: #333; 301 | border-color: #333; 302 | color: #fff; 303 | } 304 | 305 | .btn.btn-dark:hover, .btn.btn-dark.active { 306 | background-color: transparent; 307 | color: #333; 308 | } 309 | 310 | .btn.btn-danger { 311 | background-color: #cc3d3d; 312 | border-color: #cc3d3d; 313 | } 314 | 315 | .btn.btn-danger:hover, .btn.btn-danger.active { 316 | background-color: transparent; 317 | color: #cc3d3d; 318 | } 319 | 320 | .btn.btn-info { 321 | background-color: #39b3d7; 322 | border-color: #39b3d7; 323 | } 324 | 325 | .btn.btn-info:hover, .btn.btn-info.active { 326 | background-color: transparent; 327 | color: #39b3d7; 328 | } 329 | 330 | .btn.btn-warning { 331 | background-color: #f0ad4e; 332 | border-color: #f0ad4e; 333 | } 334 | 335 | .btn.btn-warning:hover, .btn.btn-warning.active { 336 | background-color: transparent; 337 | color: #f0ad4e; 338 | } 339 | 340 | .btn.btn-default { 341 | background-color: transparent; 342 | border-color: #dbdbdb; 343 | color: #3e3e3e; 344 | } 345 | 346 | .btn.btn-default:hover, .btn.btn-default.active { 347 | background-color: #dbdbdb; 348 | color: #3e3e3e; 349 | } 350 | 351 | .btn.btn-transparent { 352 | background-color: transparent; 353 | border-color: #3b92d4; 354 | color: #3b92d4; 355 | } 356 | 357 | .btn.btn-transparent:hover, .btn.btn-transparent.active { 358 | background-color: #3b92d4; 359 | color: #fff; 360 | } 361 | 362 | .btn.btn-white { 363 | background-color: transparent; 364 | border-color: #fff; 365 | color: #fff; 366 | text-shadow: 0 0 7px #000; 367 | } 368 | 369 | .btn.btn-white:hover, .btn.btn-white.active { 370 | background-color: #fff; 371 | color: #3e3e3e; 372 | text-shadow: none; 373 | } 374 | 375 | .btn.btn-white-invert { 376 | background-color: #fff; 377 | color: #3e3e3e; 378 | text-shadow: none; 379 | border-color: #fff; 380 | } 381 | 382 | .btn.btn-white-invert:hover, .btn.btn-white-invert.active { 383 | background-color: transparent; 384 | border-color: #fff; 385 | color: #fff; 386 | text-shadow: 0 0 7px #000; 387 | } 388 | 389 | .form-group { 390 | margin-bottom: 10px; 391 | } 392 | 393 | .form-group.large { 394 | margin-top: 20px; 395 | } 396 | 397 | .dropdown-menu { 398 | margin: 0; 399 | -webkit-border-radius: 0; 400 | border-radius: 0; 401 | border: 0; 402 | font-size: 14px; 403 | font-weight: 300; 404 | } 405 | 406 | .dropdown-menu a { 407 | font-size: 14px; 408 | font-weight: 300; 409 | } 410 | 411 | .alert { 412 | -webkit-border-radius: 0; 413 | border-radius: 0; 414 | opacity: 0.8; 415 | } 416 | 417 | .navbar-inverse { 418 | background-color: #3e3e3e; 419 | } 420 | 421 | .navbar-inverse .navbar-brand { 422 | font-weight: 200; 423 | } 424 | 425 | .navbar-inverse ul.navbar-nav > li.active > a { 426 | border-top: 2px solid #3b92d4; 427 | -webkit-box-shadow: inset 0 10px 10px -10px rgba(53, 145, 215, 0.8) inset; 428 | box-shadow: inset 0 10px 10px -10px rgba(53, 145, 215, 0.8) inset; 429 | color: #fff; 430 | } 431 | 432 | .navbar-inverse ul.navbar-nav > li > a { 433 | color: #ccc; 434 | font-size: 11px; 435 | text-transform: uppercase; 436 | border-top: 2px solid transparent; 437 | } 438 | 439 | .navbar-inverse ul.navbar-nav > li > a:hover { 440 | color: #fff; 441 | text-decoration: none; 442 | } -------------------------------------------------------------------------------- /public/assets/Bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClanCats/Framework/f16504be0dd4f403bba7e766c3f6f426e68ef021/public/assets/Bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/assets/Bootstrap/fonts/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | -------------------------------------------------------------------------------- /public/assets/Bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClanCats/Framework/f16504be0dd4f403bba7e766c3f6f426e68ef021/public/assets/Bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/assets/Bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClanCats/Framework/f16504be0dd4f403bba7e766c3f6f426e68ef021/public/assets/Bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/assets/Bootstrap/js/application.js: -------------------------------------------------------------------------------- 1 | // do awesome stuff -------------------------------------------------------------------------------- /public/assets/Bootstrap/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.0.3 (http://getbootstrap.com) 3 | * Copyright 2013 Twitter, Inc. 4 | * Licensed under http://www.apache.org/licenses/LICENSE-2.0 5 | */ 6 | 7 | if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]'),b=!0;if(a.length){var c=this.$element.find("input");"radio"===c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?b=!1:a.find(".active").removeClass("active")),b&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}b&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); -------------------------------------------------------------------------------- /public/assets/Bootstrap/less/mixins/background.less: -------------------------------------------------------------------------------- 1 | /* These awesome gardients from: http://twitter.github.com/bootstrap */ 2 | #gradient { 3 | .horizontal (@startColor: #555, @endColor: #333) { 4 | background-color: @endColor; 5 | background-repeat: repeat-x; 6 | background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror 7 | background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ 8 | background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10 9 | background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ 10 | background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 11 | background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 12 | background-image: linear-gradient(left, @startColor, @endColor); // Le standard 13 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down 14 | } 15 | .vertical (@startColor: #555, @endColor: #333) { 16 | background-color: @endColor; 17 | background-repeat: repeat-x; 18 | background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror 19 | background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+ 20 | background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10 21 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ 22 | background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 23 | background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10 24 | background-image: linear-gradient(top, @startColor, @endColor); // The standard 25 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down 26 | } 27 | .directional (@startColor: #555, @endColor: #333, @deg: 45deg) { 28 | background-color: @endColor; 29 | background-repeat: repeat-x; 30 | background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ 31 | background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10 32 | background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ 33 | background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 34 | background-image: linear-gradient(@deg, @startColor, @endColor); // The standard 35 | } 36 | .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) { 37 | background-color: @endColor; 38 | background-repeat: no-repeat; 39 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); 40 | background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor); 41 | background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor); 42 | background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor); 43 | background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor); 44 | background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor); 45 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback 46 | } 47 | } -------------------------------------------------------------------------------- /public/assets/Bootstrap/less/mixins/css3.less: -------------------------------------------------------------------------------- 1 | /* 2 | * border radius 3 | */ 4 | .border-radius(@radius: 5px) { 5 | -webkit-border-radius: @radius; 6 | border-radius: @radius; 7 | } 8 | .border-radius-top-right(@radius: 5px) { 9 | -webkit-border-top-right-radius: @radius; 10 | border-top-right-radius: @radius; 11 | } 12 | .border-radius-top-left(@radius: 5px) { 13 | -webkit-border-top-left-radius: @radius; 14 | border-top-left-radius: @radius; 15 | } 16 | .border-radius-bottom-right(@radius: 5px) { 17 | -webkit-border-bottom-right-radius: @radius; 18 | border-bottom-right-radius: @radius; 19 | } 20 | .border-radius-bottom-left(@radius: 5px) { 21 | -webkit-border-bottom-left-radius: @radius; 22 | border-bottom-left-radius: @radius; 23 | } 24 | 25 | /* 26 | * Box shadows 27 | */ 28 | .box-shadow(@shadow: 0 1px 3px rgba(0,0,0,0.3)) { 29 | -webkit-box-shadow: @shadow; 30 | box-shadow: @shadow; 31 | } 32 | .box-shadow (@shadow1, @shadow2){ 33 | -webkit-box-shadow: @shadow1, @shadow2; 34 | box-shadow: @shadow1, @shadow2; 35 | } 36 | .box-shadow (@shadow1, @shadow2, @shadow3){ 37 | -webkit-box-shadow: @shadow1, @shadow2, @shadow3; 38 | box-shadow: @shadow1, @shadow2, @shadow3; 39 | } 40 | .inset-line(@y: 1px, @color: #FFF) { 41 | @val: 0 @y 0 @color inset; 42 | -webkit-box-shadow: @val; 43 | box-shadow: @val; 44 | } 45 | 46 | 47 | /* 48 | * transitions 49 | */ 50 | .transition(@transition: all 0.25s ease-in-out) { 51 | -webkit-transition: @transition; 52 | -moz-transition: @transition; 53 | -ms-transition: @transition; 54 | -o-transition: @transition; 55 | transition: @transition; 56 | } 57 | .transition (@transition1, @transition2) { 58 | -webkit-transition: @transition1, @transition2; 59 | -moz-transition: @transition1, @transition2; 60 | -ms-transition: @transition1, @transition2; 61 | -o-transition: @transition1, @transition2; 62 | transition: @transition1, @transition2; 63 | } -------------------------------------------------------------------------------- /public/assets/Bootstrap/less/mixins/mixins.less: -------------------------------------------------------------------------------- 1 | /* 2 | * ClanCats CSS Framework 3 | * Copyright 2012 by: Mario Döring 4 | * 5 | * some credit to Twitter's Bootstrap CSS for some awesome parts :) 6 | * powerd with: less.js 7 | */ 8 | 9 | .center-block() { 10 | margin: auto; 11 | display: block; 12 | } 13 | .size(@width,@height) { 14 | width: @width; 15 | height: @height; 16 | } 17 | .min-size(@width,@height) { 18 | min-width: @width; 19 | min-height: @height; 20 | } 21 | .max-size(@width,@height) { 22 | max-width: @width; 23 | max-height: @height; 24 | } 25 | .square(@size) { 26 | width: @size; 27 | height: @size; 28 | } 29 | 30 | /* 31 | * 3D Text 32 | * 33 | * @param color $color (Ideal range: 15% - 95% Brightness) 34 | * param float $depth (Ideal Range: 0.4x - 2.5x) 35 | */ 36 | .3D-Text(@color,@depth) { 37 | 38 | color:@color; 39 | text-shadow: 40 | 0 (@depth*0.01em) 0 lighten(@color,3.3%), 41 | 0 (@depth*0.02em) (@depth*0.01em) darken(@color,10%), 42 | 0 (@depth*0.03em) (@depth*0.02em) darken(@color,11%), 43 | 0 (@depth*0.04em) (@depth*0.02em) darken(@color,13%), 44 | 0 (@depth*0.06em) (@depth*0.01em) darken(@color,16%), 45 | 0 (@depth*0.06em) (@depth*0.03em) rgba(0,0,0,.5), 46 | 0 0 (@depth*0.05em) rgba(0,0,0,.2), 47 | 0 (@depth*0.02em) (@depth*0.08em) rgba(0,0,0,.3), 48 | 0 (@depth*0.1em) (@depth*0.12em) rgba(0,0,0,.25), 49 | 0 (@depth*0.2em) (@depth*0.20em) rgba(0,0,0,.15); 50 | } 51 | 52 | /* 53 | * clearfix 54 | */ 55 | .clearfix() { 56 | zoom: 1; 57 | &:before, 58 | &:after { 59 | display: table; 60 | content: ""; 61 | zoom: 1; 62 | *display: inline; 63 | } 64 | &:after { 65 | clear: both; 66 | } 67 | } -------------------------------------------------------------------------------- /public/assets/Bootstrap/less/mixins/transform.less: -------------------------------------------------------------------------------- 1 | .transform-origin (...) { 2 | -webkit-transform-origin: @arguments; 3 | -moz-transform-origin: @arguments; 4 | -ms-transform-origin: @arguments; 5 | -o-transform-origin: @arguments; 6 | transform-origin: @arguments; 7 | } 8 | .perspective (...) { 9 | -webkit-perspective: @arguments; 10 | -moz-perspective: @arguments; 11 | -o-perspective: @arguments; 12 | perspective: @arguments; 13 | } 14 | .transform (...) { 15 | -webkit-transform: @arguments; 16 | -moz-transform: @arguments; 17 | -ms-transform: @arguments; 18 | -o-transform: @arguments; 19 | transform: @arguments; 20 | } 21 | .transform3d (...) { 22 | -webkit-transform: @arguments; 23 | -webkit-transform-style: preserve-3d; 24 | -moz-transform: @arguments; 25 | -moz-transform-style: preserve-3d; 26 | -o-transform: @arguments; 27 | -o-transform-style: preserve-3d; 28 | transform: @arguments; 29 | transform-style: preserve-3d; 30 | } 31 | .rotate (@rotate) { 32 | -webkit-transform: rotate(@rotate); 33 | -moz-transform: rotate(@rotate); 34 | -ms-transform: rotate(@rotate); 35 | -o-transform: rotate(@rotate); 36 | transform: rotate(@rotate); 37 | } 38 | .rotate3d (@deg1, @deg2:0, @deg3:0){ 39 | -webkit-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); 40 | -webkit-transform-style: preserve-3d; 41 | -moz-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); 42 | -moz-transform-style: preserve-3d; 43 | -o-transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); 44 | -o-transform-style: preserve-3d; 45 | transform: rotateX(@deg1) rotateY(@deg2) rotateZ(@deg3); 46 | transform-style: preserve-3d; 47 | } 48 | .scale (@scale) { 49 | -webkit-transform: scale(@scale); 50 | -moz-transform: scale(@scale); 51 | -ms-transform: scale(@scale); 52 | -o-transform: scale(@scale); 53 | transform: scale(@scale); 54 | } 55 | .scale (@scale1,@scale2) { 56 | -webkit-transform: scale(@scale1,@scale2); 57 | -moz-transform: scale(@scale1,@scale2); 58 | -ms-transform: scale(@scale1,@scale2); 59 | -o-transform: scale(@scale1,@scale2); 60 | transform: scale(@scale1,@scale2); 61 | } 62 | .scaleX (@scale) { 63 | -webkit-transform: scaleX(@scale); 64 | -moz-transform: scaleX(@scale); 65 | -ms-transform: scaleX(@scale); 66 | -o-transform: scaleX(@scale); 67 | transform: scaleX(@scale); 68 | } 69 | .scaleY (@scale) { 70 | -webkit-transform: scaleY(@scale); 71 | -moz-transform: scaleY(@scale); 72 | -ms-transform: scaleY(@scale); 73 | -o-transform: scaleY(@scale); 74 | transform: scaleY(@scale); 75 | } 76 | .skew (@skew) { 77 | -webkit-transform: skew(@skew); 78 | -moz-transform: skew(@skew); 79 | -ms-transform: skew(@skew); 80 | -o-transform: skew(@skew); 81 | transform: skew(@skew); 82 | } 83 | .skew (@skew1, @skew2) { 84 | -webkit-transform: skew(@skew1, @skew2); 85 | -moz-transform: skew(@skew1, @skew2); 86 | -ms-transform: skew(@skew1, @skew2); 87 | -o-transform: skew(@skew1, @skew2); 88 | transform: skew(@skew1, @skew2); 89 | } 90 | .skewX (@skew) { 91 | -webkit-transform: skewX(@skew); 92 | -moz-transform: skewX(@skew); 93 | -ms-transform: skewX(@skew); 94 | -o-transform: skewX(@skew); 95 | transform: skewX(@skew); 96 | } 97 | .skewY (@skew) { 98 | -webkit-transform: skewY(@skew); 99 | -moz-transform: skewY(@skew); 100 | -ms-transform: skewY(@skew); 101 | -o-transform: skewY(@skew); 102 | transform: skewY(@skew); 103 | } 104 | .translate (@translate) { 105 | -webkit-transform: translate(@translate); 106 | -moz-transform: translate(@translate); 107 | -ms-transform: translate(@translate); 108 | -o-transform: translate(@translate); 109 | transform: translate(@translate); 110 | } 111 | .translate (@translate1, @translate2) { 112 | -webkit-transform: translate(@translate1, @translate2); 113 | -moz-transform: translate(@translate1, @translate2); 114 | -ms-transform: translate(@translate1, @translate2); 115 | -o-transform: translate(@translate1, @translate2); 116 | transform: translate(@translate1, @translate2); 117 | } 118 | .translateX (@translate) { 119 | -webkit-transform: translateX(@translate); 120 | -moz-transform: translateX(@translate); 121 | -ms-transform: translateX(@translate); 122 | -o-transform: translateX(@translate); 123 | transform: translateX(@translate); 124 | } 125 | .translateY (@translate) { 126 | -webkit-transform: translateY(@translate); 127 | -moz-transform: translateY(@translate); 128 | -ms-transform: translateY(@translate); 129 | -o-transform: translateY(@translate); 130 | transform: translateY(@translate); 131 | } 132 | .transform-transition ( @transition: ease-in-out 0.3s ) { 133 | -webkit-transition: -webkit-transform @transition; 134 | -moz-transition: -moz-transform @transition; 135 | -o-transition: -o-transform @transition; 136 | transition: transform @transition; 137 | } -------------------------------------------------------------------------------- /public/assets/Bootstrap/less/style.less: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ClanCats/Framework/f16504be0dd4f403bba7e766c3f6f426e68ef021/public/assets/Bootstrap/less/style.less -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | perform() 25 | ->response(); 26 | 27 | /* 28 | * "send" means actaully printing the response. 29 | * If the secound parameter is true the response will 30 | * also set headers 31 | */ 32 | $response->send( true ); --------------------------------------------------------------------------------