Static Layout

Description

Staic layout is useful for those platform having less menu options and content sections where user required to scroll less.

CSS Classes

Default this template has a static layout elements, so there is no any specific classes need to add to create this layout.

To create this layout just need to confirm .fixed-top, .menu-fixedand .footer-fixednot applied to their respective element, in short do not use fixed layout classes.

HTML Markup

This section contains HTML Markup to create static layout. No need to add any specific classes just do not use fixed layout classes. This layout has a navigation, content and left sidebar sections with common header & footer.

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 content-left-sidebar menu-expanded">                          <!-- fixed-top-->                          <nav role="navigation" class="header-navbar navbar-expand-sm navbar navbar-with-menu navbar-dark navbar-shadow navbar-border">                              ...                          </nav>                          <!-- BEGIN Navigation-->                          <div class="main-menu menu-dark 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 body-->                                  <div class="content-body">                                      ...                                  </div>                                  <!-- content body-->                              </div>                          </div>                          <!-- END Content-->                          <!-- START FOOTER DARK-->                          <footer class="footer footer-dark">                              ...                          </footer>                          <!-- START FOOTER DARK-->                        </body>                      </html>

JADE Configuration

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 static layout.

Block Variable Datatype Value Description
pageConfig navbarFixed boolean false pageConfigblock has a navbarFixed variable, it contains navbar position specific setting in that you need to set falsefor fixed navbar.
navbarConfig navbarPosition string 'navbar-static-top' navbarConfigblock has a navbarPosition variable, it contains navbar position type specific classes in that you need to set 'navbar-static-top' for static navbar.
verticalMenuConfig menuType string 'menu-static' verticalMenuConfigblock has a menuType variable, it contains navigation type specific classes in that you need to set 'menu-static'for static vertical navigation.
horizontalMenuConfig menuType string 'navbar-static' verticalMenuConfigblock has a menuType variable, it contains navigation type specific classes in that you need to set 'navbar-static'for static horizontal navigation.
footerConfig footerType string 'footer-static' footerConfigblock has a footerType variable, it contains footer type specific classes in that you need to set 'footer-static'for static footer.
JADE Code

To generate boxed layout page or template, you need to use following JADE code.

  • Line no 20-21:Set navbarFixedvariable value as falsein pageConfigblock, as our layout is not fixed.
  • Line no 23-24:Set navbarPositionvariable value as 'navbar-static-top'in navbarConfig block for static navbar.
  • Line no 26-27:Set menuTypevariable value as 'menu-static'in verticalMenuConfig block for static navigation in vertical layout.
  • Line no 29-30:Set menuTypevariable value as 'navbar-static'in horizontalMenuConfig block for static navigation in vertical layout.
  • Line no 32-33:Set footerTypevariable value as 'footer-static'in footerConfig block for static footer.
  • Line no 39-40:contentblock has content section html file included include ../contents/layout-static.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 static layout-static.jade, however you can use it on template level but it will generate whole template as a static.

                  block pageVars                    - var pageTitle    = "Static Layout"                    - var pageSubTitle = "Static layout with navigation"                    - var description  = "The static layout page structure have fixed navbar, navigation and footer."                    - var activeMenu   = "layout-static"                  extends template                  append pageConfig                    - var navbarFixed = false                  append navbarConfig                    - var navbarPosition = "navbar-static-top"                  append verticalMenuConfig                    - var menuType = 'menu-static'                  append horizontalMenuConfig                    - var menuType = 'navbar-static'                  append footerConfig                    - var footerType = "footer-static"                  append breadcrumbs                    +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Page Layouts"}, {name:"Static Layout"}])                  //- Include page content in page block                  append content                    include ../contents/layout-static.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