Footer Fixed




The footer fixed option has a fixed footer at the bottom side, You can check fixed footer on bottom of this page.

CSS Classes

This table contains all classes which can be used in fixed footer. You can combine them as per footer fixed template requirements.

All these options can be set via following classes:

Classes Description
.fixed-bottom To set footer fixed you need to add .fixed-bottom class in footer <footer> tag. Refer HTML markup line no 37.

Default fixed footer color is light, You can use .footer-dark & .footer-transparent with .fixed-bottom.

You can also use styling options i.e .footer-border & .footer-shadow with .fixed-bottom

HTML Markup

This section contains HTML Markup to create fixed footer. This markup define where to add css classes to make footer fixed.

  • Line no 37: Contain the .fixed-bottom class for adjusting footer fixed.
  • Line no 37: Also contain the .footer-light & .footer-shadow classes for adjusting footer color and shadow. Those are optional classes.
              <!DOCTYPE html>
              <html lang="en">
                <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-transparent navbar-shadow navbar-border">
                  <!-- BEGIN Navigation-->
                  <div class="main-menu menu-transparent menu-fixed menu-shadow">
                  <!-- END Navigation-->
                  <!-- BEGIN Content-->
                  <div class="content app-content">
                      <div class="content-wrapper">
                          <!-- content header-->
                          <div class="content-header row">
                          <!-- content header-->
                          <!-- content body-->
                          <div class="content-body">
                          <!-- content body-->
                  <!-- END Content-->
                  <!-- START FOOTER DARK-->
                  <footer class="navbar footer fixed-bottom footer-light footer-shadow content container-fluid">
                  <!-- START FOOTER DARK-->

PUG Configuration

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 footer.

Block Variable Datatype Value Description
footerConfig footerType string 'fixed-bottom' footerConfig block has a footerType variable, it contains footer specific classes in that you need to add 'fixed-bottom' class.
PUG Code

To generate footer fixed page or template, you need to use following PUG code.

  • Line no 20-22: Set footer fixed class to footerType variable value as 'fixed-bottom' in footerConfig block, it contains footer type specific classes.
  • Line no 20-22: You can use .footer-light,.footer-dark & .footer-transparent color options.
  • Line no 28-29: content block has content section html file included include ../contents/footer-fixed.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 footer footer-fixed.pug, however you can use it on template level but it will generate whole template footer fixed.

                  block pageVars
                    - var pageTitle    = "Footer Fixed"
                    - var pageSubTitle = "Fixed color footer"
                    - var description  = "The Fixed footer options used to make your footer set to be fixed at bottom."
                    - var activeMenu   = "footer-fixed"
                  extends template
                  append footerConfig
                    - var footerType = "fixed-bottom"
                    - var footerColor = "footer-dark"
                  append breadcrumbs
                    +breadcrumbs([{url:"index.html",name:"Home"},{url:"#",name:"Footer"}, {name:"Footer Fixed"}])
                  //- Include page content in page block
                  append content
                    include ../contents/footer-fixed.html
                  //- Vendor CSS
                  //- Add Vendor specific CSS
                  append vendorcss
                    link(rel='stylesheet', type='text/css', href='../../../app-assets/vendors/css/ui/prism.min.css')
                  //- Page CSS
                  //- Add custom page specific CSS
                  append pagecss
                  //- Vendor JS
                  //- Add vendor specific JS
                  append vendorjs
                    script(type='text/javascript' ,src='../../../app-assets/vendors/js/ui/prism.min.js')
                  //- Page JS
                  //- Add custom page specific JS
                  append pagejs