Commit 98e9f307 by Nikola Trifunovic

Added futter. Fixes #1822

parent 11fb738c
...@@ -22,34 +22,36 @@ AppAsset::register($this); ...@@ -22,34 +22,36 @@ AppAsset::register($this);
</head> </head>
<body> <body>
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?php <div class="wrap">
NavBar::begin([ <?php
'brandLabel' => 'My Company', NavBar::begin([
'brandUrl' => Yii::$app->homeUrl, 'brandLabel' => 'My Company',
'options' => [ 'brandUrl' => Yii::$app->homeUrl,
'class' => 'navbar-inverse navbar-fixed-top', 'options' => [
], 'class' => 'navbar-inverse navbar-fixed-top',
]); ],
$menuItems = [ ]);
['label' => 'Home', 'url' => ['/site/index']], $menuItems = [
]; ['label' => 'Home', 'url' => ['/site/index']],
if (Yii::$app->user->isGuest) { ];
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; if (Yii::$app->user->isGuest) {
} else { $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
$menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => ['/site/logout']]; } else {
} $menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => ['/site/logout']];
echo Nav::widget([ }
'options' => ['class' => 'navbar-nav navbar-right'], echo Nav::widget([
'items' => $menuItems, 'options' => ['class' => 'navbar-nav navbar-right'],
]); 'items' => $menuItems,
NavBar::end(); ]);
?> NavBar::end();
?>
<div class="container"> <div class="container">
<?= Breadcrumbs::widget([ <?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?> ]) ?>
<?= $content ?> <?= $content ?>
</div>
</div> </div>
<footer class="footer"> <footer class="footer">
......
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 {
......
...@@ -23,40 +23,42 @@ AppAsset::register($this); ...@@ -23,40 +23,42 @@ AppAsset::register($this);
</head> </head>
<body> <body>
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?php <div class="wrap">
NavBar::begin([ <?php
'brandLabel' => 'My Company', NavBar::begin([
'brandUrl' => Yii::$app->homeUrl, 'brandLabel' => 'My Company',
'options' => [ 'brandUrl' => Yii::$app->homeUrl,
'class' => 'navbar-inverse navbar-fixed-top', 'options' => [
], 'class' => 'navbar-inverse navbar-fixed-top',
]); ],
$menuItems = [ ]);
['label' => 'Home', 'url' => ['/site/index']], $menuItems = [
['label' => 'About', 'url' => ['/site/about']], ['label' => 'Home', 'url' => ['/site/index']],
['label' => 'Contact', 'url' => ['/site/contact']], ['label' => 'About', 'url' => ['/site/about']],
]; ['label' => 'Contact', 'url' => ['/site/contact']],
if (Yii::$app->user->isGuest) { ];
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]; if (Yii::$app->user->isGuest) {
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
} else { $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
$menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => ['/site/logout']]; } else {
} $menuItems[] = ['label' => 'Logout (' . Yii::$app->user->identity->username .')' , 'url' => ['/site/logout']];
echo Nav::widget([ }
'options' => ['class' => 'navbar-nav navbar-right'], echo Nav::widget([
'items' => $menuItems, 'options' => ['class' => 'navbar-nav navbar-right'],
]); 'items' => $menuItems,
NavBar::end(); ]);
?> NavBar::end();
?>
<div class="container"> <div class="container">
<?= Breadcrumbs::widget([ <?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?> ]) ?>
<?= Alert::widget() ?> <?= Alert::widget() ?>
<?= $content ?> <?= $content ?>
</div>
</div> </div>
<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<p class="pull-left">&copy; My Company <?= date('Y') ?></p> <p class="pull-left">&copy; My Company <?= date('Y') ?></p>
......
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 {
......
...@@ -21,36 +21,39 @@ AppAsset::register($this); ...@@ -21,36 +21,39 @@ AppAsset::register($this);
<?php $this->head() ?> <?php $this->head() ?>
</head> </head>
<body> <body>
<?php $this->beginBody() ?> <?php $this->beginBody() ?>
<?php <div class="wrap">
NavBar::begin([ <?php
'brandLabel' => 'My Company', NavBar::begin([
'brandUrl' => Yii::$app->homeUrl, 'brandLabel' => 'My Company',
'options' => [ 'brandUrl' => Yii::$app->homeUrl,
'class' => 'navbar-inverse navbar-fixed-top', 'options' => [
], 'class' => 'navbar-inverse navbar-fixed-top',
]); ],
echo Nav::widget([ ]);
'options' => ['class' => 'navbar-nav navbar-right'], echo Nav::widget([
'items' => [ 'options' => ['class' => 'navbar-nav navbar-right'],
['label' => 'Home', 'url' => ['/site/index']], 'items' => [
['label' => 'About', 'url' => ['/site/about']], ['label' => 'Home', 'url' => ['/site/index']],
['label' => 'Contact', 'url' => ['/site/contact']], ['label' => 'About', 'url' => ['/site/about']],
Yii::$app->user->isGuest ? ['label' => 'Contact', 'url' => ['/site/contact']],
['label' => 'Login', 'url' => ['/site/login']] : Yii::$app->user->isGuest ?
['label' => 'Logout (' . Yii::$app->user->identity->username . ')' , ['label' => 'Login', 'url' => ['/site/login']] :
'url' => ['/site/logout'], ['label' => 'Logout (' . Yii::$app->user->identity->username . ')' ,
'linkOptions' => ['data-method' => 'post']], 'url' => ['/site/logout'],
], 'linkOptions' => ['data-method' => 'post']],
]); ],
NavBar::end(); ]);
?> NavBar::end();
?>
<div class="container"> <div class="container">
<?= Breadcrumbs::widget([ <?= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?> ]) ?>
<?= $content ?> <?= $content ?>
</div>
</div> </div>
<footer class="footer"> <footer class="footer">
......
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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment