The dark layout has a semi dark color navbar, dark navigation menu and light footer. In this page you can experience it. If you want to create a semi dark version template you can use this layout. For admin panels this layout provide elegant UI.
This table contains all classes related to the semi dark layout. This is a custom layout classes for semi dark layout page 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 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-light |
To set the main footer light color on page .footer-light class needs to add in footer wrapper. Refer HTML markup line no 37. |
This section contains HTML Markup to create semi dark layout. This markup define where to add css classes to make semi dark navbar, dark navigation & light footer.
.navbar-semi-dark
class for adjusting navbar color semi dark..menu-dark
class for adjusting main navigation color dark..footer-light
class for adjusting footer color light.Modern has a ready to use starter kit, you can use this layout directly by using the starter kit pages from the modern-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-semi-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>
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.
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 type specific classes in that you need to add 'light' for semi-dark layout. |
navbarConfig |
navbarColor |
string |
'navbar-semi-dark' |
navbarConfig block has a navbarColor variable, it contains navbar color specific classes in that you need to add 'navbar-semi-dark' for semi-dark navbar. |
navbarConfig |
navbarBrandCenter |
boolean |
false |
navbarConfig block has a navbarBrandCenter variable, it contains navbar center specific settings in that you need to add false as semi-dark layout doesn't support center alight navbar. |
verticalMenuCustom |
menuColor |
string |
'menu-dark' |
verticalMenuConfig block has a menuColor variable, it contains navigation color specific classes in that you need to add 'menu-dark' for dark navigation. |
To generate semi dark layout page or template, you need to use following PUG code.
logoType
variable value as 'light'
in pageConfig
block.navbarColor
variable value as 'navbar-semi-dark'
in navbarConfig
block for semi-dark navbar.navbarBrandCenter
variable value as false
in navbarConfig
block as center navbar doesn't support by semi-dark layout.verticalMenuCustom
variable value as 'menu-dark'
in verticalMenuConfig
block for dark navigation.content
block has content section html file included include ../contents/layout-semi-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 semi dark layout layout-semi-dark.pug
, however you can use it on template level but it will generate whole template as a semi dark layout.
block pageVars
- var pageTitle = "Semi Dark Layout"
- var pageSubTitle = "Semi dark template layout"
- var description = "The semi dark layout has semi dark version navbar, dark navigation & dark footer."
- var activeMenu = "layout-semi-dark"
extends template
append pageConfig
- var logoType = 'light'
append navbarConfig
- var navbarColor = "navbar-semi-dark"
- var navbarBrandCenter = false
append verticalMenuConfig
- var menuColor = "menu-dark"
append breadcrumbs
+breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Page Layouts"}, {name:"Semi Dark Layout"}])
//- Include page content in page block
append content
include ../contents/layout-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