diff --git a/app/assets/.gitignore b/apps/bootstrap/assets/.gitignore similarity index 100% rename from app/assets/.gitignore rename to apps/bootstrap/assets/.gitignore diff --git a/app/css/bootstrap-responsive.css b/apps/bootstrap/css/bootstrap-responsive.css similarity index 100% rename from app/css/bootstrap-responsive.css rename to apps/bootstrap/css/bootstrap-responsive.css diff --git a/app/css/bootstrap-responsive.min.css b/apps/bootstrap/css/bootstrap-responsive.min.css similarity index 100% rename from app/css/bootstrap-responsive.min.css rename to apps/bootstrap/css/bootstrap-responsive.min.css diff --git a/app/css/bootstrap.css b/apps/bootstrap/css/bootstrap.css similarity index 100% rename from app/css/bootstrap.css rename to apps/bootstrap/css/bootstrap.css diff --git a/app/css/bootstrap.min.css b/apps/bootstrap/css/bootstrap.min.css similarity index 100% rename from app/css/bootstrap.min.css rename to apps/bootstrap/css/bootstrap.min.css diff --git a/app/css/site.css b/apps/bootstrap/css/site.css similarity index 100% rename from app/css/site.css rename to apps/bootstrap/css/site.css diff --git a/app/img/glyphicons-halflings-white.png b/apps/bootstrap/img/glyphicons-halflings-white.png similarity index 100% rename from app/img/glyphicons-halflings-white.png rename to apps/bootstrap/img/glyphicons-halflings-white.png Binary files a/app/img/glyphicons-halflings-white.png and b/apps/bootstrap/img/glyphicons-halflings-white.png differ diff --git a/app/img/glyphicons-halflings.png b/apps/bootstrap/img/glyphicons-halflings.png similarity index 100% rename from app/img/glyphicons-halflings.png rename to apps/bootstrap/img/glyphicons-halflings.png Binary files a/app/img/glyphicons-halflings.png and b/apps/bootstrap/img/glyphicons-halflings.png differ diff --git a/app/index.php b/apps/bootstrap/index.php similarity index 100% rename from app/index.php rename to apps/bootstrap/index.php diff --git a/app/js/bootstrap.js b/apps/bootstrap/js/bootstrap.js similarity index 100% rename from app/js/bootstrap.js rename to apps/bootstrap/js/bootstrap.js diff --git a/app/js/bootstrap.min.js b/apps/bootstrap/js/bootstrap.min.js similarity index 100% rename from app/js/bootstrap.min.js rename to apps/bootstrap/js/bootstrap.min.js diff --git a/app/protected/.htaccess b/apps/bootstrap/protected/.htaccess similarity index 100% rename from app/protected/.htaccess rename to apps/bootstrap/protected/.htaccess diff --git a/app/protected/config/assets.php b/apps/bootstrap/protected/config/assets.php similarity index 100% rename from app/protected/config/assets.php rename to apps/bootstrap/protected/config/assets.php diff --git a/app/protected/config/main.php b/apps/bootstrap/protected/config/main.php similarity index 100% rename from app/protected/config/main.php rename to apps/bootstrap/protected/config/main.php diff --git a/app/protected/controllers/SiteController.php b/apps/bootstrap/protected/controllers/SiteController.php similarity index 100% rename from app/protected/controllers/SiteController.php rename to apps/bootstrap/protected/controllers/SiteController.php diff --git a/app/protected/models/ContactForm.php b/apps/bootstrap/protected/models/ContactForm.php similarity index 100% rename from app/protected/models/ContactForm.php rename to apps/bootstrap/protected/models/ContactForm.php diff --git a/app/protected/models/LoginForm.php b/apps/bootstrap/protected/models/LoginForm.php similarity index 100% rename from app/protected/models/LoginForm.php rename to apps/bootstrap/protected/models/LoginForm.php diff --git a/app/protected/models/User.php b/apps/bootstrap/protected/models/User.php similarity index 100% rename from app/protected/models/User.php rename to apps/bootstrap/protected/models/User.php diff --git a/app/protected/runtime/.gitignore b/apps/bootstrap/protected/runtime/.gitignore similarity index 100% rename from app/protected/runtime/.gitignore rename to apps/bootstrap/protected/runtime/.gitignore diff --git a/app/protected/views/layouts/main.php b/apps/bootstrap/protected/views/layouts/main.php similarity index 100% rename from app/protected/views/layouts/main.php rename to apps/bootstrap/protected/views/layouts/main.php diff --git a/app/protected/views/site/about.php b/apps/bootstrap/protected/views/site/about.php similarity index 100% rename from app/protected/views/site/about.php rename to apps/bootstrap/protected/views/site/about.php diff --git a/app/protected/views/site/contact.php b/apps/bootstrap/protected/views/site/contact.php similarity index 100% rename from app/protected/views/site/contact.php rename to apps/bootstrap/protected/views/site/contact.php diff --git a/app/protected/views/site/index.php b/apps/bootstrap/protected/views/site/index.php similarity index 100% rename from app/protected/views/site/index.php rename to apps/bootstrap/protected/views/site/index.php diff --git a/app/protected/views/site/login.php b/apps/bootstrap/protected/views/site/login.php similarity index 100% rename from app/protected/views/site/login.php rename to apps/bootstrap/protected/views/site/login.php diff --git a/framework/console/webapp/config.php b/framework/console/webapp/config.php deleted file mode 100644 index 47ddcc1..0000000 --- a/framework/console/webapp/config.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** @var $controller \yii\console\controllers\AppController */ -$controller = $this; - -return array( - 'default' => array( - 'index.php' => array( - 'handler' => function($source) use ($controller) { - return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii'); - }, - 'permissions' => 0777, - ), - 'protected/runtime' => array( - 'permissions' => 0755, - ), - ), -); diff --git a/framework/console/webapp/default/index.php b/framework/console/webapp/default/index.php deleted file mode 100644 index 2aa3580..0000000 --- a/framework/console/webapp/default/index.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -define('YII_DEBUG', true); - -require __DIR__.'/../framework/yii.php'; - -$config = require dirname(__DIR__).'/protected/config/main.php'; -$config['basePath'] = dirname(__DIR__).'/protected'; - -$app = new \yii\web\Application($config); -$app->run(); diff --git a/framework/console/webapp/default/protected/config/main.php b/framework/console/webapp/default/protected/config/main.php deleted file mode 100644 index 5817783..0000000 --- a/framework/console/webapp/default/protected/config/main.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -return array( - 'id' => 'webapp', - 'name' => 'My Web Application', - - 'components' => array( - // uncomment the following to use a MySQL database - /* - 'db' => array( - 'class' => 'yii\db\Connection', - 'dsn' => 'mysql:host=localhost;dbname=testdrive', - 'username' => 'root', - 'password' => '', - ), - */ - 'cache' => array( - 'class' => 'yii\caching\DummyCache', - ), - ), -); diff --git a/framework/console/webapp/default/protected/controllers/SiteController.php b/framework/console/webapp/default/protected/controllers/SiteController.php deleted file mode 100644 index ac8c1dd..0000000 --- a/framework/console/webapp/default/protected/controllers/SiteController.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -use \yii\web\Controller; - -/** - * SiteController - */ -class SiteController extends Controller -{ - public function actionIndex() - { - echo $this->render('index', array( - 'name' => 'Qiang', - )); - } -} diff --git a/framework/console/webapp/default/protected/views/layouts/main.php b/framework/console/webapp/default/protected/views/layouts/main.php deleted file mode 100644 index 9837038..0000000 --- a/framework/console/webapp/default/protected/views/layouts/main.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php use yii\helpers\Html as Html; ?> -<!doctype html> -<html lang="<?php \Yii::$app->language?>"> - <head> - <meta charset="utf-8" /> - <title><?php echo Html::encode($this->title)?></title> - </head> - <body> - <h1><?php echo Html::encode($this->title)?></h1> - <div class="content"> - <?php echo $content?> - </div> - <div class="footer"> - <?php echo \Yii::powered()?> - </div> - </body> -</html> diff --git a/framework/console/webapp/default/protected/views/site/index.php b/framework/console/webapp/default/protected/views/site/index.php deleted file mode 100644 index 08c5288..0000000 --- a/framework/console/webapp/default/protected/views/site/index.php +++ /dev/null @@ -1 +0,0 @@ -Hello, <?php echo $name?>! diff --git a/readme.md b/readme.md index 6293292..f395e95 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,8 @@ without prior notices. **Yii 2.0 is not ready for production use yet.** DIRECTORY STRUCTURE ------------------- - app/ a ready-to-use application built on Yii 2 + apps/ ready-to-use Web apps built on Yii 2 + bootstrap/ a simple app supporting user login and contact page build/ internally used build tools docs/ documentation framework/ framework source files