Increase logout button size (#89)

This commit is contained in:
Joel Waldock 2016-10-14 11:13:07 +13:00 committed by Carsten Brandt
parent 2ce52fbcd3
commit a43b2ff94f
2 changed files with 26 additions and 2 deletions

View File

@ -43,10 +43,10 @@ AppAsset::register($this);
['label' => 'Login', 'url' => ['/site/login']] ['label' => 'Login', 'url' => ['/site/login']]
) : ( ) : (
'<li>' '<li>'
. Html::beginForm(['/site/logout'], 'post', ['class' => 'navbar-form']) . Html::beginForm(['/site/logout'], 'post')
. Html::submitButton( . Html::submitButton(
'Logout (' . Yii::$app->user->identity->username . ')', 'Logout (' . Yii::$app->user->identity->username . ')',
['class' => 'btn btn-link'] ['class' => 'btn btn-link logout']
) )
. Html::endForm() . Html::endForm()
. '</li>' . '</li>'

View File

@ -89,3 +89,27 @@ a.desc:after {
padding: 10px 20px; padding: 10px 20px;
margin: 0 0 15px 0; margin: 0 0 15px 0;
} }
/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
padding: 15px;
border: none;
}
@media(max-width:767px) {
.nav li > form > button.logout {
display:block;
text-align: left;
width: 100%;
padding: 10px 15px;
}
}
.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
text-decoration: none;
}
.nav > li > form > button.logout:focus {
outline: none;
}