Two different icons for open/hide the sidebar

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
cunda81
Posts: 10
Joined: 06 Feb 2013, 10:22

03 Jan 2017, 15:10

Hello,

I would like to replace the icon in the topbar with two different icons.

For opening the sidebar a 'fa-arrow-right'.
To hide the sidebar a 'fa-arrow-left'.

How can I solve it most elegantly?

Thanks in advance.
Primefaces 6.0, Primefaces-Extensions 6.0.0, MyFacesImpl 2.2.9,

cunda81
Posts: 10
Joined: 06 Feb 2013, 10:22

03 Jan 2017, 16:27

i can change the color, if is active or not

.wrapper .topbar #omega-menu-button {
color: yellow;
}

.wrapper .topbar #omega-menu-button.active {
color: red;
}

but i want change the icon too...
Primefaces 6.0, Primefaces-Extensions 6.0.0, MyFacesImpl 2.2.9,

cunda81
Posts: 10
Joined: 06 Feb 2013, 10:22

03 Jan 2017, 16:44

my solution (actually, works):

topbar.xhtml

Code: Select all

        <a id="omega-menu-button" href="#">
            <span class="fa fa-arrow-right"></span>
            <span class="fa fa-arrow-left"></span>
        </a>
css:

Code: Select all

.wrapper .topbar #omega-menu-button.active .fa-arrow-right {
     display: inline;
}

.wrapper .topbar #omega-menu-button .fa-arrow-right {
     display: none;
}

.wrapper .topbar #omega-menu-button.active .fa-arrow-left {
     display: none;
}

.wrapper .topbar #omega-menu-button .fa-arrow-left {
     display: inline;
}
Primefaces 6.0, Primefaces-Extensions 6.0.0, MyFacesImpl 2.2.9,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

06 Jan 2017, 14:40

Good solution! +1 Thanks for the update!

Post Reply

Return to “Omega - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests