Skip to content

Commit a43b2ff

Browse files
jwaldockcebe
authored andcommitted
Increase logout button size (yiisoft#89)
1 parent 2ce52fb commit a43b2ff

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

views/layouts/main.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
['label' => 'Login', 'url' => ['/site/login']]
4444
) : (
4545
'<li>'
46-
. Html::beginForm(['/site/logout'], 'post', ['class' => 'navbar-form'])
46+
. Html::beginForm(['/site/logout'], 'post')
4747
. Html::submitButton(
4848
'Logout (' . Yii::$app->user->identity->username . ')',
49-
['class' => 'btn btn-link']
49+
['class' => 'btn btn-link logout']
5050
)
5151
. Html::endForm()
5252
. '</li>'

web/css/site.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,27 @@ a.desc:after {
8989
padding: 10px 20px;
9090
margin: 0 0 15px 0;
9191
}
92+
93+
/* align the logout "link" (button in form) of the navbar */
94+
.nav li > form > button.logout {
95+
padding: 15px;
96+
border: none;
97+
}
98+
99+
@media(max-width:767px) {
100+
.nav li > form > button.logout {
101+
display:block;
102+
text-align: left;
103+
width: 100%;
104+
padding: 10px 15px;
105+
}
106+
}
107+
108+
.nav > li > form > button.logout:focus,
109+
.nav > li > form > button.logout:hover {
110+
text-decoration: none;
111+
}
112+
113+
.nav > li > form > button.logout:focus {
114+
outline: none;
115+
}

0 commit comments

Comments
 (0)