CSS Classes
This table contains all classes related to the fixed navigation layout. This is a custom layout classes for fixed navigation layout page requirements.
All these options can be set via following classes:
Classes | Description |
---|---|
.menu-fixed |
To set navigation fixed you need to add .menu-fixed class in menu wrapper. Refer HTML markup line no 12. |
This section contains HTML Markup to create fixed navigation layout. This markup define where to add css classes to make navigation fixed.
- Line no 12: Contain the
.menu-fixed
class for adjusting navigation fixed on top.
Modern has a ready to use starter kit, you can use this layout directly by using the fixed-navigation.html
<!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 navbar-with-menu 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 modern-content container-fluid">
<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>
<!-- 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.
PUG Variables
This table contains required PUG variables to generate fixed navigation layout.
Variable | Value | Description |
---|---|---|
menuCustom |
'menu-fixed' |
In menuConfig , use menuCustom variable value as 'menu-fixed' to fix the navigation menu. menuConfig block. |
PUG Code
To generate fixed navigation layout page or template, you need to use following PUG code.
- Line no 20-21:
menuConfig
block has amenuCustom
variable, it contains navigation specific classes in that you need to add'menu-fixed'
- Line no 36-37:
content
block has content section html file includedinclude ../contents/fixed-navigation.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 fixed fixed-navigation.pug
, however you can use it on template level but it will generate whole template as a fixed navigation layout.
block pageVars
- var pageTitle = "Fixed Navigation"
- var pageSubTitle = "Fixed navigation with fixed navigation"
- var description = "The fixed navigation page structure have fixed navigation, static navbar and footer."
- var activeMenu = "layout-fixed-navigation"
extends template
append horizontalMenuConfig
- var horizontalMenuType = 'navbar-fixed'
append verticalMenuConfig
- var menuType = 'menu-fixed'
append breadcrumbs
+breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Page Layouts"}, {name:"Fixed Navigation"}])
//- Include page content in page block
append content
include ../contents/layout-fixed-navigation.html
//- Vendor CSS
append vendorcss
link(rel='stylesheet', type='text/css', href='../app-assets/vendors/css/ui/prism.min.css')
//- Vendor JS
append vendorjs
script(src='../app-assets/vendors/js/ui/prism.min.js', type='text/javascript')
Refer following links for detailed documentation, configuration options, methods and examples:
Type | URL |
---|---|
Fixed Navigation | https://pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-menu-template/layout-fixed-navigation.html |