beginPage() ?>
registerCsrfMetaTags() ?>
= Html::encode($this->title) ?>
head() ?>
beginBody() ?>
Yii::$app->name,
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar navbar-expand-md navbar-dark bg-dark fixed-top',
],
]);
$menuItems = [
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
];
if (Yii::$app->user->isGuest) {
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
}
echo Nav::widget([
'options' => ['class' => 'navbar-nav me-auto mb-2 mb-md-0'],
'items' => $menuItems,
]);
if (Yii::$app->user->isGuest) {
echo Html::tag('div',Html::a('Login',['/site/login'],['class' => ['btn btn-link login text-decoration-none']]),['class' => ['d-flex']]);
} else {
echo Html::beginForm(['/site/logout'], 'post', ['class' => 'd-flex'])
. Html::submitButton(
'Logout (' . Yii::$app->user->identity->username . ')',
['class' => 'btn btn-link logout text-decoration-none']
)
. Html::endForm();
}
NavBar::end();
?>
= Breadcrumbs::widget([
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
= Alert::widget() ?>
= $content ?>
endBody() ?>
endPage();