chrisblakley / Nebula

Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
https://nebula.gearside.com
GNU General Public License v2.0
141 stars 36 forks source link

Consider replacing the navigation with Bootstrap Navbar (or flexbox) #2138

Closed chrisblakley closed 3 years ago

chrisblakley commented 3 years ago

It doesn't need to look like the stock Bootstrap navbar, but this could help standardize it and reduce the Nebula CSS by leaning on Bootstrap here. It would also allow for customizing nuances within the navbar (such as the order and location of the primary navigation).

Screen Shot 2021-04-03 at 8 58 29 PM

We could still use it inside or above the hero. I want to consider this for both the primary and utility bars.

/inc/navigation.php

https://getbootstrap.com/docs/5.0/components/navbar/

Related #1990

chrisblakley commented 3 years ago

If we do this, it would require quite a bit of customization of the classes within the nav elements (ul, li).

We'd also want to figure out if we prefer the Bootstrap navbar "hamburger" menu accordion, or the offcanvas component.

chrisblakley commented 3 years ago

Also with the Bootstrap navbar, the dropdowns are a click-toggle, which I know has a recent movement behind using that (rather than the more common hover toggle), but I want to keep the hover at least for now.

I've been testing the markup a bit and I'm not yet convinced this will actually be easier/time saving over the current Nebula navigation...

Here is a starting point:

<nav class="navbar navbar-expand-lg navbar-light">
    <div class="container">
        <a class="navbar-brand" href="#">
            <img src="https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/phg/phg-logo.png" alt="Logo">
        </a>

        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link active" href="#">Home</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown">Dropdown</a>
                <ul class="dropdown-menu">
                    <li><a class="dropdown-item" href="#">Action</a></li>
                    <li><a class="dropdown-item" href="#">Another action</a></li>
                    <li><a class="dropdown-item" href="#">Something else here</a></li>
                </ul>
            </li>
        </ul>
    </div>
</nav>
chrisblakley commented 3 years ago

If we don't use the Bootstrap navbar, maybe use raw flexbox instead of columns– that would provide more flexibility and real estate for longer navigations and we could simply control where it appears in relation to the logo.

Maybe I'll do some real quick mockups.

chrisblakley commented 3 years ago

I've decided against this for the moment.