diff --git a/app/css/site.css b/app/css/site.css new file mode 100644 index 0000000..890a953 --- /dev/null +++ b/app/css/site.css @@ -0,0 +1,78 @@ +body { + padding-top: 20px; + padding-bottom: 60px; +} + +/* Custom container */ +.container { + margin: 0 auto; + max-width: 1000px; +} + +.container > hr { + margin: 60px 0; +} + +/* Main marketing message and sign up button */ +.jumbotron { + margin: 80px 0; + text-align: center; +} + +.jumbotron h1 { + font-size: 100px; + line-height: 1; +} + +.jumbotron .lead { + font-size: 24px; + line-height: 1.25; +} + +.jumbotron .btn { + font-size: 21px; + padding: 14px 24px; +} + +/* Supporting marketing content */ +.marketing { + margin: 60px 0; +} + +.marketing p + h4 { + margin-top: 28px; +} + +/* Customize the navbar links to be fill the entire space of the .navbar */ +.navbar .navbar-inner { + padding: 0; +} + +.navbar .nav { + margin: 0; + display: table; + width: 100%; +} + +.navbar .nav li { + display: table-cell; + width: 1%; + float: none; +} + +.navbar .nav li a { + font-weight: bold; + text-align: center; + border-left: 1px solid rgba(255, 255, 255, .75); + border-right: 1px solid rgba(0, 0, 0, .1); +} + +.navbar .nav li:first-child a { + border-left: 0; + border-radius: 3px 0 0 3px; +} + +.navbar .nav li:last-child a { + border-right: 0; + border-radius: 0 3px 3px 0; +} diff --git a/app/protected/config/assets.php b/app/protected/config/assets.php new file mode 100644 index 0000000..6602a6e --- /dev/null +++ b/app/protected/config/assets.php @@ -0,0 +1,19 @@ + array( + 'basePath' => '@wwwroot', + 'baseUrl' => '@www', + 'css' => array( + 'css/bootstrap.min.css', + 'css/bootstrap-responsive.min.css', + 'css/site.css', + ), + 'js' => array( + + ), + 'depends' => array( + 'yii', + ), + ), +); \ No newline at end of file diff --git a/app/protected/config/main.php b/app/protected/config/main.php index e18ead8..7722331 100644 --- a/app/protected/config/main.php +++ b/app/protected/config/main.php @@ -10,6 +10,9 @@ return array( 'user' => array( 'class' => 'yii\web\User', 'identityClass' => 'app\models\User', - ) + ), + 'assetManager' => array( + 'bundles' => require(__DIR__ . '/assets.php'), + ), ), ); \ No newline at end of file diff --git a/app/protected/controllers/SiteController.php b/app/protected/controllers/SiteController.php index 39e9c1f..fb5e0ce 100644 --- a/app/protected/controllers/SiteController.php +++ b/app/protected/controllers/SiteController.php @@ -27,4 +27,14 @@ class SiteController extends Controller Yii::$app->getUser()->logout(); Yii::$app->getResponse()->redirect(array('site/index')); } + + public function actionContact() + { + echo $this->render('contact'); + } + + public function actionAbout() + { + echo $this->render('about'); + } } \ No newline at end of file diff --git a/app/protected/views/layouts/main.php b/app/protected/views/layouts/main.php index 89c141f..a09b610 100644 --- a/app/protected/views/layouts/main.php +++ b/app/protected/views/layouts/main.php @@ -4,23 +4,52 @@ * @var $content string */ use yii\helpers\Html; +$this->registerAssetBundle('app'); ?> beginPage(); ?> - + <?php echo Html::encode($this->title); ?> - 'screen')); ?> head(); ?> -
-

Welcome

- beginBody(); ?> - - endBody(); ?> +
+ beginBody(); ?> +
+

My Company

+ + +
+ + + + + endBody(); ?> +
endPage(); ?> \ No newline at end of file diff --git a/app/protected/views/site/about.php b/app/protected/views/site/about.php new file mode 100644 index 0000000..66c66dc --- /dev/null +++ b/app/protected/views/site/about.php @@ -0,0 +1,8 @@ +title = 'About'; +?> +

title); ?>

\ No newline at end of file diff --git a/app/protected/views/site/contact.php b/app/protected/views/site/contact.php new file mode 100644 index 0000000..c6109cb --- /dev/null +++ b/app/protected/views/site/contact.php @@ -0,0 +1,10 @@ +title = 'Contact'; +?> +

title); ?>

diff --git a/app/protected/views/site/index.php b/app/protected/views/site/index.php index 66e4dd1..4444fe3 100644 --- a/app/protected/views/site/index.php +++ b/app/protected/views/site/index.php @@ -1,17 +1,49 @@ title = 'Welcome'; +?> +
+

Marketing stuff!

-use yii\helpers\Html; +

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus + commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

+ Get started today +
-$this->title = 'Hello World'; +
-$user = Yii::$app->getUser(); -if ($user->isGuest) { - echo Html::a('login', array('login')); -} else { - echo "You are logged in as " . $user->identity->username . "
"; - echo Html::a('logout', array('logout')); -} -?> + +
+
+

Heading

+ +

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris + condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. + Donec sed odio dui.

+ +

View details »

+
+
+

Heading

+ +

Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris + condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. + Donec sed odio dui.

+ +

View details »

+
+
+

Heading

+ +

Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta + felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum + massa.

+ +

View details »

+
+
+
diff --git a/app/protected/views/site/login.php b/app/protected/views/site/login.php index e6da8ef..68272b4 100644 --- a/app/protected/views/site/login.php +++ b/app/protected/views/site/login.php @@ -5,8 +5,9 @@ use yii\helpers\Html; * @var yii\widgets\ActiveForm $form * @var app\models\LoginForm $model */ +$this->title = 'Login'; ?> -

Login

+

title); ?>

Please fill out the following fields to login: