TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

Add option to customize Navbar toggle button icon #936

Closed shafinmahmud closed 6 years ago

shafinmahmud commented 6 years ago

I was looking for a way to customize the navbar toggle button icon. By default, the navBar tag generates the following code

<button type="button" class="navbar-toggle" data-toggle="collapse" 
        data-target="#nav-header_inner">

       <span class="sr-only">Toggle navigation</span>
       <span class="icon-bar"></span>
       <span class="icon-bar"></span>
       <span class="icon-bar"></span>
</button>

I want to have some option that is to replace those icon-bar spans with some icons or anything. Like for my case, I am looking for generated code be like

<button type="button" class="navbar-toggle" data-toggle="collapse" 
        data-target="#nav-header_inner">

        <span class="glyphicon glyphicon-menu-hamburger"></span>
</button>
stephanrauh commented 6 years ago

I've added the feature for BootsFaces 1.2.1:

      <b:navBar brand="Brand" brandHref="#" fluid="true">
        <f:facet name="kebab">
            <span class="fa fa-chevron-right"></span>
        </f:facet>
        <b:navbarLinks>
          <b:navLink value="Link" href="#"></b:navLink>
          <b:navLink value="Link" href="#"></b:navLink>
        </b:navbarLinks>
      </b:navBar>
stephanrauh commented 6 years ago

I've uploaded a developer snapshot to Maven Central. #369 describes how to get it.

shafinmahmud commented 6 years ago

Thanks for your update. Hope we will find this helpful.