From 37f69a52d786844962defa921bc1b31a4f2104ae Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 8 Aug 2013 21:56:58 -0400 Subject: [PATCH] Fixed the basic app template. --- controllers/SiteController.php | 1 - views/layouts/main.php | 53 ++++++++++++------------ views/site/index.php | 33 +++++++-------- web/css/site.css | 75 +--------------------------------- 4 files changed, 47 insertions(+), 115 deletions(-) diff --git a/controllers/SiteController.php b/controllers/SiteController.php index 4b9ac97..04da8b3 100644 --- a/controllers/SiteController.php +++ b/controllers/SiteController.php @@ -21,7 +21,6 @@ class SiteController extends Controller public function actionIndex() { - Yii::warning('test'); return $this->render('index'); } diff --git a/views/layouts/main.php b/views/layouts/main.php index 2b32d5b..1f8611c 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -19,36 +19,39 @@ app\config\AppAsset::register($this); beginBody(); ?> -
-
-

My Company

+ - array('class' => 'nav navbar-nav nav-justified'), - 'items' => array( - array('label' => 'Home', 'url' => array('/site/index')), - array('label' => 'About', 'url' => array('/site/about')), - array('label' => 'Contact', 'url' => array('/site/contact')), - Yii::$app->user->isGuest ? - array('label' => 'Login', 'url' => array('/site/login')) : - array('label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => array('/site/logout')), - ), +
+ isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(), )); ?> +
- isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : array(), - )); ?> - +
+
+

© My Company

+

+
+
- -
endBody(); ?> diff --git a/views/site/index.php b/views/site/index.php index 2ebafc1..7e86eb6 100644 --- a/views/site/index.php +++ b/views/site/index.php @@ -5,44 +5,45 @@ $this->title = 'Welcome'; ?>
-

Welcome!

+

Congratulations!

-

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.

+

You have successfully created your Yii-powered application.

Get started with Yii

-

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.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

-

View details »

+

Yii Documentation »

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.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

-

View details »

+

Yii Forum »

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.

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur.

-

View details »

+

Yii Extensions »

diff --git a/web/css/site.css b/web/css/site.css index 7b01db2..e6db73c 100644 --- a/web/css/site.css +++ b/web/css/site.css @@ -1,32 +1,14 @@ body { - padding-top: 20px; -} - -/* Everything but the jumbotron gets side spacing for mobile-first views */ -.masthead, -.body-content, -.footer { - padding-left: 15px; - padding-right: 15px; -} - -.masthead:before, -.masthead:after { - display: table; - content: " "; -} -.masthead:after { - clear: both; + padding-top: 70px; } .footer { border-top: 1px solid #ddd; margin-top: 30px; - padding-top: 29px; + padding-top: 15px; padding-bottom: 30px; } -/* Main marketing message and sign up button */ .jumbotron { text-align: center; background-color: transparent; @@ -35,56 +17,3 @@ body { font-size: 21px; padding: 14px 24px; } - -/* Customize the nav-justified links to be fill the entire space of the .navbar */ -.nav-justified { - max-height: 50px; - background-color: #eee; - border-radius: 5px; - border: 1px solid #ccc; -} -.nav-justified > li > a { - padding-top: 15px; - padding-bottom: 15px; - color: #777; - font-weight: bold; - text-align: center; - border-left: 1px solid rgba(255,255,255,.75); - border-right: 1px solid rgba(0,0,0,.1); - background-color: #e5e5e5; /* Old browsers */ - background-repeat: repeat-x; /* Repeat the gradient */ - background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e5e5e5 100%); /* FF3.6+ */ - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */ - background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Chrome 10+,Safari 5.1+ */ - background-image: -ms-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* IE10+ */ - background-image: -o-linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* Opera 11.10+ */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */ - background-image: linear-gradient(top, #f5f5f5 0%,#e5e5e5 100%); /* W3C */ -} -.nav-justified > .active > a { - background-color: #ddd; - background-image: none; - box-shadow: inset 0 3px 7px rgba(0,0,0,.15); -} -.nav-justified > li:first-child > a { - border-left: 0; - border-top-left-radius: 5px; - border-bottom-left-radius: 5px; -} -.nav-justified > li:last-child > a { - border-right: 0; - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} - - -/* Responsive: Portrait tablets and up */ -@media screen and (min-width: 768px) { - /* Remove the padding we set earlier */ - .masthead, - .marketing, - .footer { - padding-left: 0; - padding-right: 0; - } -}