Detached Left Sidebar

Description

Content layout with detached left sidebar provides more navigations options on page level. For the larger screen this layout provides best usability. This layout use the third column as a sidebar section.

CSS Classes

This table contains all classes related to the content detached left sidebar layout. This is a custom layout classes for content detached left sidebar layout page requirements.

All these options can be set via following classes:

Classes Description
.content-detached-left-sidebar You can create 3 column detached left layout by adding .content-detached-left-sidebarclass in <body>tag.
.content-detached In this layout content section is detached from left sidebar, for that .content-detachedclass needs to add in content wrapper. Refer HTML markup line no 27.
.content-right In this layout content should be float in right side, so .content-rightclass needs to add in content wrapper. Refer HTML markup line no 27.
.sidebar-detached In this layout left sidebar section is detached from content, for that .sidebar-detachedclass needs to add in sidebar wrapper. Refer HTML markup line no 33.
.sidebar-left In this layout sidebar should be float in left side, so .sidebar-rightclass needs to add in sidebar wrapper. Refer HTML markup line no 33.

HTML Markup

This section contains HTML Markup to create 3 column detached left sidebar layout. You need to add the .content-detached-left-sidebar class in the <body>tag as show in below markup on line no 4. This layout has a navigation, content and left detached sidebar sections with common header & footer.

Line no 27:Contain the .content-detached and .content-rightclasses for adjusting detached content section in right side.

Line no 33:Contain the .sidebar-detached and .sidebar-leftclasses for adjusting detached sidebar section in left side.

Stack has a ready to use starter kit for this layout, you can use this layout directly by using the layout-content-detached-left-sidebar.html

            <!DOCTYPE html>              <html lang="en">                <head></head>                <body data-menu="vertical-menu" class="vertical-layout vertical-menu content-detached-left-sidebar 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 detached right-->                          <div class="content-detached content-right">                              ...                          </div>                          <!-- content detached right-->                                                    <!-- sidebar detached left-->                          <div class="sidebar-detached sidebar-left">                              <div class="sidebar">                                  ...                              </div>                          </div>                          <!-- sidebar detached left-->                                                </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 3 column detached left sidebar layout.

Block Variable Datatype Value Description
pageConfig contentLayout string 'content-detached-left-sidebar' pageConfigblock has a page configuration variables, for detached left sidebar layout need to define variable - var contentLayout = 'content-detached-left-sidebar'.
JADE Code

To generate content detached left sidebar layout page or template, you need to use following JADE code.

Line no 20-21: You need to set contentLayoutvariable value as 'content-detached-left-sidebar'in pageConfig block.

Line no 27-28:contentblock has content section html file included include ../contents/layout-content-detached-left-sidebar.html, which can be customizable on page level.

Line no 30-31:sidebarblock has sidebar section html file included include ../contents/sidebar-common.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 content detached left sidebar layout-content-detached-left-sidebar.jade, however you can use it on template level but it will generate whole template as a content detached left sidebar.

                block pageVars                        - var pageTitle    = "Detached Left Sidebar"                    - var pageSubTitle = "Content detached left sidebar"                    - var description  = "The content detached left sidebar layout with navigation, content area and detched left sidebar."                 - var activeMenu   = "layout-content-detached-left-sidebar"                                extends template                                append pageConfig                    - var contentLayout = 'content-detached-left-sidebar'                                append breadcrumbs                 +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Page Layouts"}, {name:"Content detached left sidebar"}])                                //- Include page content                append content                      include ../contents/layout-content-detached-left-sidebar.html                //- Include page sidebar                append sidebar                     include ../contents/sidebar-common.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