Merge pull request #1912 from johonunu/1822-sticky-futter

Added sticky futter. Fixes #1822
This commit is contained in:
Alexander Makarov 2014-01-11 07:46:55 -08:00
commit 1deeb17006
2 changed files with 48 additions and 33 deletions

View File

@ -21,36 +21,39 @@ AppAsset::register($this);
<?php $this->head() ?> <?php $this->head() ?>
</head> </head>
<body> <body>
<?php $this->beginBody() ?>
<?php
NavBar::begin([
'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar-inverse navbar-fixed-top',
],
]);
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => [
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
Yii::$app->user->isGuest ?
['label' => 'Login', 'url' => ['/site/login']] :
['label' => 'Logout (' . Yii::$app->user->identity->username . ')' ,
'url' => ['/site/logout'],
'linkOptions' => ['data-method' => 'post']],
],
]);
NavBar::end();
?>
<div class="container"> <?php $this->beginBody() ?>
<?= Breadcrumbs::widget([ <div class="wrap">
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], <?php
]) ?> NavBar::begin([
<?= $content ?> 'brandLabel' => 'My Company',
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar-inverse navbar-fixed-top',
],
]);
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => [
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
Yii::$app->user->isGuest ?
['label' => 'Login', 'url' => ['/site/login']] :
['label' => 'Logout (' . Yii::$app->user->identity->username . ')' ,
'url' => ['/site/logout'],
'linkOptions' => ['data-method' => 'post']],
],
]);
NavBar::end();
?>
<div class="container">
<?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
<?= $content ?>
</div>
</div> </div>
<footer class="footer"> <footer class="footer">

View File

@ -1,12 +1,24 @@
html,
body { body {
padding-top: 70px; height: 100%;
}
.wrap {
min-height: 100%;
height: auto;
margin: 0 auto -60px;
padding: 0 0 60px;
}
.wrap > .container {
padding: 70px 15px 20px;
} }
.footer { .footer {
height: 60px;
background-color: #f5f5f5;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
margin-top: 30px; padding-top: 20px;
padding-top: 15px;
padding-bottom: 30px;
} }
.jumbotron { .jumbotron {