2013-05-24 10:14:49 -04:00
|
|
|
<?php
|
2015-07-09 12:47:20 +03:00
|
|
|
|
2022-01-14 22:47:17 +03:00
|
|
|
/** @var yii\web\View $this */
|
|
|
|
/** @var string $content */
|
2015-07-09 12:47:20 +03:00
|
|
|
|
2013-11-13 18:17:05 +02:00
|
|
|
use app\assets\AppAsset;
|
2021-05-19 14:01:06 +02:00
|
|
|
use app\widgets\Alert;
|
2022-06-17 17:15:52 +01:00
|
|
|
use yii\bootstrap5\Breadcrumbs;
|
|
|
|
use yii\bootstrap5\Html;
|
|
|
|
use yii\bootstrap5\Nav;
|
|
|
|
use yii\bootstrap5\NavBar;
|
2013-05-24 10:14:49 -04:00
|
|
|
|
2013-11-12 06:24:07 +02:00
|
|
|
AppAsset::register($this);
|
2013-05-24 10:14:49 -04:00
|
|
|
?>
|
2013-11-28 01:19:43 +04:00
|
|
|
<?php $this->beginPage() ?>
|
2013-05-24 10:14:49 -04:00
|
|
|
<!DOCTYPE html>
|
2021-05-19 14:01:06 +02:00
|
|
|
<html lang="<?= Yii::$app->language ?>" class="h-100">
|
2013-05-24 10:14:49 -04:00
|
|
|
<head>
|
2015-01-24 20:45:04 +02:00
|
|
|
<meta charset="<?= Yii::$app->charset ?>">
|
2021-05-19 14:01:06 +02:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
2018-03-15 01:17:30 +03:00
|
|
|
<?php $this->registerCsrfMetaTags() ?>
|
2014-03-16 10:46:16 +06:00
|
|
|
<title><?= Html::encode($this->title) ?></title>
|
|
|
|
<?php $this->head() ?>
|
2013-05-24 10:14:49 -04:00
|
|
|
</head>
|
2021-05-19 14:01:06 +02:00
|
|
|
<body class="d-flex flex-column h-100">
|
2013-11-28 01:19:43 +04:00
|
|
|
<?php $this->beginBody() ?>
|
2015-07-09 12:47:20 +03:00
|
|
|
|
2021-05-19 14:01:06 +02:00
|
|
|
<header>
|
2015-07-09 12:47:20 +03:00
|
|
|
<?php
|
|
|
|
NavBar::begin([
|
2017-09-21 19:01:41 +03:00
|
|
|
'brandLabel' => Yii::$app->name,
|
2015-07-09 12:47:20 +03:00
|
|
|
'brandUrl' => Yii::$app->homeUrl,
|
|
|
|
'options' => [
|
2021-05-19 14:01:06 +02:00
|
|
|
'class' => 'navbar navbar-expand-md navbar-dark bg-dark fixed-top',
|
2015-07-09 12:47:20 +03:00
|
|
|
],
|
|
|
|
]);
|
|
|
|
echo Nav::widget([
|
2021-05-19 14:01:06 +02:00
|
|
|
'options' => ['class' => 'navbar-nav'],
|
2015-07-09 12:47:20 +03:00
|
|
|
'items' => [
|
|
|
|
['label' => 'Home', 'url' => ['/site/index']],
|
|
|
|
['label' => 'About', 'url' => ['/site/about']],
|
|
|
|
['label' => 'Contact', 'url' => ['/site/contact']],
|
2015-10-21 01:05:51 +03:00
|
|
|
Yii::$app->user->isGuest ? (
|
|
|
|
['label' => 'Login', 'url' => ['/site/login']]
|
|
|
|
) : (
|
|
|
|
'<li>'
|
2021-05-19 14:01:06 +02:00
|
|
|
. Html::beginForm(['/site/logout'], 'post', ['class' => 'form-inline'])
|
2015-10-21 01:05:51 +03:00
|
|
|
. Html::submitButton(
|
|
|
|
'Logout (' . Yii::$app->user->identity->username . ')',
|
2016-10-14 11:13:07 +13:00
|
|
|
['class' => 'btn btn-link logout']
|
2015-10-21 01:05:51 +03:00
|
|
|
)
|
|
|
|
. Html::endForm()
|
|
|
|
. '</li>'
|
|
|
|
)
|
2015-07-09 12:47:20 +03:00
|
|
|
],
|
|
|
|
]);
|
|
|
|
NavBar::end();
|
|
|
|
?>
|
2021-05-19 14:01:06 +02:00
|
|
|
</header>
|
2013-05-24 10:14:49 -04:00
|
|
|
|
2021-05-19 14:01:06 +02:00
|
|
|
<main role="main" class="flex-shrink-0">
|
2015-07-09 12:47:20 +03:00
|
|
|
<div class="container">
|
|
|
|
<?= Breadcrumbs::widget([
|
|
|
|
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
|
|
|
|
]) ?>
|
2017-08-08 13:02:19 +03:00
|
|
|
<?= Alert::widget() ?>
|
2015-07-09 12:47:20 +03:00
|
|
|
<?= $content ?>
|
2014-03-16 10:46:16 +06:00
|
|
|
</div>
|
2021-05-19 14:01:06 +02:00
|
|
|
</main>
|
2015-07-09 12:47:20 +03:00
|
|
|
|
2021-05-19 14:01:06 +02:00
|
|
|
<footer class="footer mt-auto py-3 text-muted">
|
2015-07-09 12:47:20 +03:00
|
|
|
<div class="container">
|
2021-05-19 14:01:06 +02:00
|
|
|
<p class="float-left">© My Company <?= date('Y') ?></p>
|
|
|
|
<p class="float-right"><?= Yii::powered() ?></p>
|
2015-07-09 12:47:20 +03:00
|
|
|
</div>
|
|
|
|
</footer>
|
2013-05-24 10:14:49 -04:00
|
|
|
|
2013-11-28 01:19:43 +04:00
|
|
|
<?php $this->endBody() ?>
|
2013-05-24 10:14:49 -04:00
|
|
|
</body>
|
|
|
|
</html>
|
2013-11-28 01:19:43 +04:00
|
|
|
<?php $this->endPage() ?>
|