Почистил лишнее
This commit is contained in:
+10
-41
@@ -23,58 +23,27 @@ $this->registerLinkTag(['rel' => 'icon', 'type' => 'image/x-icon', 'href' => Yii
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= Yii::$app->language ?>" class="h-100">
|
||||
<head>
|
||||
<title><?= Html::encode($this->title) ?></title>
|
||||
<?php $this->head() ?>
|
||||
<title><?= Html::encode($this->title) ?></title>
|
||||
<?php $this->head() ?>
|
||||
</head>
|
||||
<body class="d-flex flex-column h-100">
|
||||
<?php $this->beginBody() ?>
|
||||
|
||||
<header id="header">
|
||||
<?php
|
||||
NavBar::begin([
|
||||
'brandLabel' => Yii::$app->name,
|
||||
'brandUrl' => Yii::$app->homeUrl,
|
||||
'options' => ['class' => 'navbar-expand-md navbar-dark bg-dark fixed-top']
|
||||
]);
|
||||
echo Nav::widget([
|
||||
'options' => ['class' => 'navbar-nav'],
|
||||
'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']]
|
||||
: '<li class="nav-item">'
|
||||
. Html::beginForm(['/site/logout'])
|
||||
. Html::submitButton(
|
||||
'Logout (' . Yii::$app->user->identity->username . ')',
|
||||
['class' => 'nav-link btn btn-link logout']
|
||||
)
|
||||
. Html::endForm()
|
||||
. '</li>'
|
||||
]
|
||||
]);
|
||||
NavBar::end();
|
||||
?>
|
||||
</header>
|
||||
|
||||
<main id="main" class="flex-shrink-0" role="main">
|
||||
<div class="container">
|
||||
<?php if (!empty($this->params['breadcrumbs'])): ?>
|
||||
<?= Breadcrumbs::widget(['links' => $this->params['breadcrumbs']]) ?>
|
||||
<?php endif ?>
|
||||
<?= Alert::widget() ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
<div class="container">
|
||||
<?= Alert::widget() ?>
|
||||
<?= $content ?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer id="footer" class="mt-auto py-3 bg-light">
|
||||
<div class="container">
|
||||
<div class="row text-muted">
|
||||
<div class="col-md-6 text-center text-md-start">© My Company <?= date('Y') ?></div>
|
||||
<div class="col-md-6 text-center text-md-end"><?= Yii::powered() ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row text-muted">
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<?php $this->endBody() ?>
|
||||
|
||||
Reference in New Issue
Block a user