Description
The dark layout has a dark color navbar, navigation menu and footer. In this page you can experience it. If you want to create a dark version template you can use this layout.
CSS Classes
This table contains all classes related to the dark layout. This is a custom layout classes for dark layout page requirements.
All these options can be set via following classes:
Classes | Description |
---|---|
.navbar-dark
|
To set navbar dark color you need to add .navbar-dark class in navbar <nav> tag. Refer HTML markup line no 7.
|
.menu-dark
|
To set the main navigation dark color on page .menu-dark class needs to add in navigation wrapper. Refer HTML markup line no 12.
|
.footer-dark
|
To set the main footer dark color on page .footer-dark class needs to add in footer wrapper. Refer HTML markup line no 37.
|
This section contains HTML Markup to create dark layout. This markup define where to add css classes to make navbar, navigation & footer dark.
-
Line no 7:Contain the
.navbar-dark
class for adjusting navbar color dark. -
Line no 12:Contain the
.menu-dark
class for adjusting main navigation color dark. -
Line no 37:Contain the
.footer-dark
class for adjusting footer color dark.
Stack has a ready to use starter kit, you can use this layout directly by using the starter kit pages from the stack-admin/starter-kit
folder.
<!DOCTYPE html> <html lang="en"> <head></head> <body data-menu="vertical-menu" class="vertical-layout vertical-menu 2-column menu-expanded"> <!-- fixed-top--> <nav role="navigation" class="header-navbar navbar-expand-sm navbar navbar-with-menu fixed-top navbar-dark navbar-shadow navbar-border"> ... </nav> <!-- BEGIN Navigation--> <div class="main-menu menu-dark menu-fixed menu-shadow"> ... </div> <!-- END Navigation--> <!-- BEGIN Content--> <div class="content app-content"> <div class="content-wrapper"> <!-- content header--> <div class="content-header row"> ... </div> <!-- content header--> <!-- content right--> <div class="content-right"> ... </div> <!-- content right--> </div> </div> <!-- END Content--> <!-- START FOOTER DARK--> <footer class="footer footer-dark footer-fixed"> ... </footer> <!-- START FOOTER DARK--> </body> </html>
Stack Admin use JADE as template engine to generate pages and whole template quickly using node js, for getting start with JADE usage & template generating process please refer template documentation.
JADE Variables
This table contains required JADE variables to generate dark layout.
Block | Variable | Datatype | Value | Description |
---|---|---|---|---|
pageConfig
|
logoType
|
string
|
'light'
|
pageConfig block has a logoType variable, it contains logo color classes in that you need to set value 'light' for light logo.
|
navbarConfig
|
navbarColor
|
string
|
'navbar-dark'
|
navbarConfig block has a navbarCustom variable, it contains navbar specific classes in that you need to set value navbar-dark for dark navbar.
|
verticalMenuConfig
|
menuColor
|
string
|
'menu-dark'
|
verticalMenuConfig block has a menuColor variable, it contains vertical layout navigation specific classes in that you need to set value 'menu-dark' for dark vertical navigation.
|
horizontalMenuConfig
|
menuColor
|
string
|
'navbar-dark'
|
horizontalMenuConfig block has a menuColor variable, it contains horizontal layout navigation specific classes in that you need to set value 'navbar-dark' for dark horizontal navigation.
|
footerConfig
|
footerCustom
|
string
|
'footer-dark'
|
footerConfig block has a footerCustom variable, it contains footer specific classes in that you need to set value footer-dark for dark footer.
|
JADE Code
To generate dark layout page or template, you need to use following JADE code.
-
Line no 19-20:Set light version on logo
logoType
variable value as'light'
inpageConfig
block. -
Line no 22-23:You need add navbar dark class to
navbarColor
variable value as'navbar-dark'
innavbarConfig
block. -
Line no 25-26:Set vertical layout navigation dark class to
menuColor
variable value as'menu-dark'
inverticalMenuConfig
block. -
Line no 28-29:Set horizontal layout navigation dark class to
menuColor
variable value as'navbar-dark'
inhorizontalMenuConfig
block. -
Line no 31-32:You need add footer dark class to
footerCustom
variable value as'footer-dark'
infooterConfig
block. -
Line no 37-39:
content
block has content section html file includedinclude ../contents/layout-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 jade file for dark layout layout-dark.jade
, however you can use it on template level but it will generate whole template as a dark layout.
block pageVars - var pageTitle = "Dark Layout" - var pageSubTitle = "Dark template layout" - var description = "The dark layout has dark version navbar, navigation & footer." - var activeMenu = "layout-dark" extends template append pageConfig - var logoType = "light" append navbarConfig - var navbarColor = "navbar-dark" append verticalMenuConfig - var menuColor = "menu-dark" append horizontalMenuConfig - var menuColor = "navbar-dark" append footerConfig - var footerColor = "footer-dark" append breadcrumbs +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Page Layouts"}, {name:"Dark Layout"}]) //- Include page content in page block append content include ../contents/layout-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