Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b7e5ed3b
Commit
b7e5ed3b
authored
Dec 17, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added option to make bootstrap navbar 100% with
fixes #1474
parent
454174a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
NavBar.php
extensions/yii/bootstrap/NavBar.php
+14
-3
No files found.
extensions/yii/bootstrap/NavBar.php
View file @
b7e5ed3b
...
...
@@ -50,8 +50,15 @@ class NavBar extends Widget
* @var array the HTML attributes of the brand link.
*/
public
$brandOptions
=
[];
/**
* @var string text to show for screen readers for the button to toggle the navbar.
*/
public
$screenReaderToggleText
=
'Toggle navigation'
;
/**
* @var bool whether the navbar content should be included in a `container` div which adds left and right padding.
* Set this to false for a 100% width navbar.
*/
public
$padded
=
true
;
/**
* Initializes the widget.
...
...
@@ -67,7 +74,9 @@ class NavBar extends Widget
}
echo
Html
::
beginTag
(
'nav'
,
$this
->
options
);
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'container'
]);
if
(
$this
->
padded
)
{
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'container'
]);
}
echo
Html
::
beginTag
(
'div'
,
[
'class'
=>
'navbar-header'
]);
echo
$this
->
renderToggleButton
();
...
...
@@ -86,7 +95,9 @@ class NavBar extends Widget
{
echo
Html
::
endTag
(
'div'
);
echo
Html
::
endTag
(
'div'
);
if
(
$this
->
padded
)
{
echo
Html
::
endTag
(
'div'
);
}
echo
Html
::
endTag
(
'nav'
);
BootstrapPluginAsset
::
register
(
$this
->
getView
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment