Description

Semi dark color navbar with custom dark & light color options. If you want to create a semi dark color navbar use the following customization options.

Examples

CSS Classes

This table contains all classes which can be used in semi dark navbar. You can combine them as per navbar semi dark template requirements.

All these options can be set via following classes:

Classes Description
.navbar-semi-dark To set navbar semi dark color you need to add .navbar-semi-dark class in navbar <nav> tag. Refer HTML markup line no 2.
.bg-[color]

To set the semi dark navbar background color use .bg-[color] class where [color] is the value of your selected color from modern color palette. So for teal color background class will be .bg-teal. Refer HTML markup line no 2. Background color class is a optional if you don't it will take white background default.

.bg-darken-[*]

To set the selected background color darken use .bg-darken-[*] class where [*] is the value between '1-5' of your selected darken color from modern color palette. So for color darken 4 background class will be .bg-lighten-2. Refer HTML markup line no 2. Background darken color class is a optional if you don't it will take white background default.

.bg-darken-[*] class will work only if you have used .bg-[color].

.border-[color]

To set the semi dark navbar border color use .border-[color] class where [color] is the value of your selected color from modern color palette. So for teal color border class will be .bg-teal. Refer HTML markup line no 2. Border color class is a optional.

.border-darken-[color]

To set the selected border color darken use .border-darken-[*] class where [*] is the value between '1-5' of your selected darken color from modern color palette. So for color darken 4 border class will be .border-lighten-2. Refer HTML markup line no 2. Border darken color class is a optional.

.border-darken-[*] class will work only if you have used .border-[color].

HTML Markup

This section contains HTML Markup to create semi dark navbar. This markup define where to add css classes to make navbar semi dark.

  • Line no 1: Contain the .navbar-semi-dark class for adjusting navbar color semi dark. It has also .bg-grey & bg-lighten-5 to set darken background color and border-grey & border-lighten-2 to set darken border.
          
                <!-- fixed-top-->
                <nav  class="header-navbar navbar-expand-sm navbar navbar-with-menu navbar-semi-dark bg-grey bg-lighten-5 border-grey border-lighten-2">
                    <div class="navbar-wrapper">
                        <div class="navbar-header">
                            <ul class="nav navbar-nav mr-auto">
                                <li class="nav-item mobile-menu d-md-none float-left">
                                    <button class="nav-link menu-toggle hamburger hamburger--arrow js-hamburger is-active"><span class="hamburger-box"></span><span class="hamburger-inner"></span></button>
                                </li>
                                <li class="nav-item">
                                    <a href="index.html" class="navbar-brand nav-link"><img src="../../../app-assets/images/logo/logo.png"></a>
                                </li>
                                <li class="nav-item d-md-none float-right"><a data-toggle="collapse" data-target="#navbar-mobile" class="nav-link open-navbar-container collapsed" aria-expanded="false"><i class="la la-ellipsis-h pe-2x icon-rotate-right"></i></a></li>
                            </ul>
                        </div>
                        <div class="navbar-container content">
                            <div id="navbar-mobile" class="collapse navbar-collapse">
                                <ul class="nav navbar-nav mr-auto">
                                    <li class="nav-item"><a class="nav-link active" href="#">Active</a></li>
                                </ul>
                                <ul class="nav navbar-nav">
                                    <li class="nav-item"><a class="nav-link" href="#">Link</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </nav>
                <!--/ fixed-top-->
          
          

PUG Configuration

Modern Admin use PUG as template engine to generate pages and whole template quickly using node js, for getting start with PUG usage & template generating process please refer template documentation.

PUG Variables

This table contains required PUG variables to generate semi dark layout.

Block Variable Datatype Value Description
pageConfig logoType string 'light' pageConfig block has a logoType variable, it contains logo version specific classes in that you need to add 'light'.
navbarConfig navbarColor string 'navbar-semi-dark' navbarConfig block has a navbarColor variable, it contains navbar specific classes in that you need to add 'navbar-semi-dark'.
navbarConfig navbarBrandCenter boolean false navbarConfig block has a navbarBrandCenter variable, it contains navbar brand center specific settings in that you need to add false.
PUG Code

To generate navbar semi dark page or template, you need to use following PUG code.

  • Line no 21-22: Set logo version light class to logoType variable value as 'light' in pageConfig block as navbar color is semi-dark.
  • Line no 23-25: You need set navbar dark class to navbarColor variable value as 'navbar-semi-dark' in navbarConfig block, it contains navbar color specific classes.
  • Line no 25: Set center navbar class to navbarBrandCenter variable value as false in navbarConfig block, as its not supported in semi-dark navbar.
  • Line no 31-32: content block has content section html file included include ../contents/navbar-dark.html, which can be customizable on page level.

If you want to use this layout on page level you need to define it on page it self. This template has one example pug file for dark navbar navbar-semi-dark.pug, however you can use it on template level but it will generate whole template navbar semi dark.

                
                    block pageVars
                        - var pageTitle    = "Navbar Semi Dark"
                        - var pageSubTitle = "Semi dark color navbar"
                        - var description  = "The semi dark color navbar with custom dark and light color options & other styling options."
                        - var activeMenu   = "navbar-semi-dark"

                    extends template

                    append pageConfig
                        - var logoType = 'light'

                    append navbarConfig
                        - var navbarColor = "navbar-semi-dark"
                        - var navbarBrandCenter = false

                    append breadcrumbs
                        +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Navbars"}, {name:"Navbar Semi Dark"}])

                    //- Include page content in page block
                    append content
                        include ../contents/navbar-semi-dark.html

                    //- Vendor CSS
                    //------------------------------
                    //- Add Vendor specific CSS
                    append vendorcss

                    //- Page CSS
                    //------------------------------

                    //- Add custom page specific CSS
                    append pagecss

                    //- Vendor JS
                    //------------------------------
                    //- Add vendor specific JS
                    append vendorjs

                    //- Page JS
                    //------------------------------
                    //- Add custom page specific JS
                    append pagejs