Docs v1.6.0  /  HTML5 Angular Vue.js React Laravel Laravel + Vue.js Rails Rails + Turbolinks ASP.NET Core ASP.NET Core MVC ASP.NET MVC ASP.NET MVC + Webpack Settings panel Layout helpers

Instructions can vary depending on whatever you use theme settings panel or not. Please select the appropriate version.

html-starter directory structure

html-starter
assets
js
Application javascripts
vendor
Appwork's assets
js
Javascripts
bootstrap.js
...
css
Stylesheets
pages
Pages styling
rtl
Stylesheets with RTL support
bootstrap.css
appwork.css
...
fonts
Iconic fonts
libs
Third-party libraries
animate-css
autosize
block-ui
...
index.html
...

Page structure

Instead of configuring the layout manually, you can use the Starter template generator. It will dramatically simplify the initial setup.

Main

index.html
<!DOCTYPE html>

<html lang="en" class="light-style">
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

  <title>TITLE</title>

  <!-- Main font -->
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900" rel="stylesheet">

  <!-- Icons. Uncomment required icon fonts -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/fontawesome.css"> -->
  <link rel="stylesheet" href="assets/vendor/fonts/ionicons.css">
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/linearicons.css"> -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/open-iconic.css"> -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/pe-icon-7-stroke.css"> -->

  <!-- Core stylesheets -->
  <link rel="stylesheet" href="assets/vendor/css/bootstrap.css">
  <link rel="stylesheet" href="assets/vendor/css/appwork.css">
  <link rel="stylesheet" href="assets/vendor/css/theme-corporate.css">
  <link rel="stylesheet" href="assets/vendor/css/colors.css">
  <link rel="stylesheet" href="assets/vendor/css/uikit.css">

  <!-- Load polyfills -->
  <script src="assets/vendor/js/polyfills.js"></script>
  <script>document['documentMode']===10&&document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>

  <!-- Layout helpers -->
  <script src="assets/vendor/js/layout-helpers.js"></script>

  <!-- Libs -->

  <!-- `perfect-scrollbar` library required by SideNav plugin -->
  <link rel="stylesheet" href="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css">

</head>
<body>

  CONTENT

  <!-- Core scripts -->

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="assets/vendor/libs/popper/popper.js"></script>
  <script src="assets/vendor/js/bootstrap.js"></script>
  <script src="assets/vendor/js/sidenav.js"></script>

  <!-- Libs -->

  <!-- `perfect-scrollbar` library required by SideNav plugin -->
  <script src="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.js"></script>

</body>
</html>
index.html
<!DOCTYPE html>

<html lang="en" class="light-style">
<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

  <title>TITLE</title>

  <!-- Main font -->
  <link href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900" rel="stylesheet">

  <!-- Icons. Uncomment required icon fonts -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/fontawesome.css"> -->
  <link rel="stylesheet" href="assets/vendor/fonts/ionicons.css">
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/linearicons.css"> -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/open-iconic.css"> -->
  <!-- <link rel="stylesheet" href="assets/vendor/fonts/pe-icon-7-stroke.css"> -->

  <!-- Core stylesheets -->
  <link rel="stylesheet" href="assets/vendor/css/bootstrap.css" class="theme-settings-bootstrap-css">
  <link rel="stylesheet" href="assets/vendor/css/appwork.css" class="theme-settings-appwork-css">
  <link rel="stylesheet" href="assets/vendor/css/theme-corporate.css" class="theme-settings-theme-css">
  <link rel="stylesheet" href="assets/vendor/css/colors.css" class="theme-settings-colors-css">
  <link rel="stylesheet" href="assets/vendor/css/uikit.css">

  <!-- Load polyfills -->
  <script src="assets/vendor/js/polyfills.js"></script>
  <script>document['documentMode']===10&&document.write('<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>

  <!-- Layout helpers -->
  <script src="assets/vendor/js/layout-helpers.js"></script>

  <!-- Theme settings -->
  <script src="assets/vendor/js/theme-settings.js"></script>
  <script>
    window.themeSettings = new ThemeSettings({
      cssPath: 'assets/vendor/css/',
      themesPath: 'assets/vendor/css/'
    });
  </script>

  <!-- Libs -->

  <!-- `perfect-scrollbar` library required by SideNav plugin -->
  <link rel="stylesheet" href="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css">

</head>
<body>

  CONTENT

  <!-- Core scripts -->

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="assets/vendor/libs/popper/popper.js"></script>
  <script src="assets/vendor/js/bootstrap.js"></script>
  <script src="assets/vendor/js/sidenav.js"></script>

  <!-- Libs -->

  <!-- `perfect-scrollbar` library required by SideNav plugin -->
  <script src="assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.js"></script>

</body>
</html>

Layouts

<!-- Layout wrapper -->
<div class="layout-wrapper layout-1">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout navbar -->
    <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
      NAVBAR CONTENT
    </nav>
    <!-- / Layout navbar -->

    <div class="layout-container">

      <!-- Layout sidenav -->
      <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
        SIDENAV CONTENT
      </div>
      <!-- / Layout sidenav -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 container-p-y">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-1">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout navbar -->
    <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
      NAVBAR CONTENT
    </nav>
    <!-- / Layout navbar -->

    <div class="layout-container">

      <!-- Layout sidenav -->
      <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
        SIDENAV CONTENT
      </div>
      <!-- / Layout sidenav -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 d-flex align-items-stretch p-0">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-2">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout sidenav -->
    <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
      SIDENAV CONTENT
    </div>
    <!-- / Layout sidenav -->

    <div class="layout-container">

      <!-- Layout navbar -->
      <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
        NAVBAR CONTENT
      </nav>
      <!-- / Layout navbar -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 container-p-y">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-2">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout sidenav -->
    <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
      SIDENAV CONTENT
    </div>
    <!-- / Layout sidenav -->

    <div class="layout-container">

      <!-- Layout navbar -->
      <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
        NAVBAR CONTENT
      </nav>
      <!-- / Layout navbar -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 d-flex align-items-stretch p-0">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-1">
  <!-- Layout inner -->
  <div class="layout-inner">

    <div class="layout-container">

      <!-- Layout sidenav -->
      <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
        SIDENAV CONTENT
      </div>
      <!-- / Layout sidenav -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 container-p-y">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-1">
  <!-- Layout inner -->
  <div class="layout-inner">

    <div class="layout-container">

      <!-- Layout sidenav -->
      <div id="layout-sidenav" class="layout-sidenav sidenav sidenav-vertical bg-sidenav-theme">
        SIDENAV CONTENT
      </div>
      <!-- / Layout sidenav -->

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 d-flex align-items-stretch p-0">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->

  <div class="layout-overlay layout-sidenav-toggle"></div>
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-1 layout-without-sidenav">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout navbar -->
    <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
      NAVBAR CONTENT
    </nav>
    <!-- / Layout navbar -->

    <div class="layout-container">

      <div class="layout-content">

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 container-p-y">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->
</div>
<!-- / Layout wrapper -->
<!-- Layout wrapper -->
<div class="layout-wrapper layout-1 layout-without-sidenav">
  <!-- Layout inner -->
  <div class="layout-inner">

    <!-- Layout navbar -->
    <nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-navbar-theme container-p-x" id="layout-navbar">
      NAVBAR CONTENT
    </nav>
    <!-- / Layout navbar -->

    <div class="layout-container">

      <div class="layout-content">

        <!-- Layout sidenav -->
        <div id="layout-sidenav" class="layout-sidenav-horizontal sidenav sidenav-horizontal bg-sidenav-theme container-p-x flex-grow-0">
          SIDENAV CONTENT
        </div>
        <!-- / Layout sidenav -->

        <!-- Page content -->
        <div class="container-fluid flex-grow-1 container-p-y">
          PAGE CONTENT
        </div>
        <!-- / Page content -->

        <!-- Layout footer -->
        <nav class="layout-footer footer bg-footer-theme">
          FOOTER CONTENT
        </nav>
        <!-- / Layout footer -->

      </div>
    </div>

  </div>
  <!-- Layout inner -->
</div>
<!-- / Layout wrapper -->

Theming

To enable theme just include the required theme stylesheet from the vendor/css/ path.

index.html
<link rel="stylesheet" href="assets/vendor/css/theme-air.css">
<link rel="stylesheet" href="assets/vendor/css/theme-air.css" class="theme-settings-theme-css">

Material styling

To enable material styling you need to:

  1. Set material-style class on the <html> element instead of light-style.

    index.html
    <html class="material-style">
  2. Add -material suffix to bootstrap.css, appwork.css, theme-*.css and colors.css stylesheets.

    index.html
    <link rel="stylesheet" href="assets/vendor/css/bootstrap-material.css">
    <link rel="stylesheet" href="assets/vendor/css/appwork-material.css">
    <link rel="stylesheet" href="assets/vendor/css/theme-corporate-material.css">
    <link rel="stylesheet" href="assets/vendor/css/colors-material.css">
    <link rel="stylesheet" href="assets/vendor/css/bootstrap-material.css" class="theme-settings-bootstrap-css">
    <link rel="stylesheet" href="assets/vendor/css/appwork-material.css" class="theme-settings-appwork-css">
    <link rel="stylesheet" href="assets/vendor/css/theme-corporate-material.css" class="theme-settings-theme-css">
    <link rel="stylesheet" href="assets/vendor/css/colors-material.css" class="theme-settings-colors-css">
  3. Optionally you can enable material ripple. Just append material-ripple.js script to the <head> section and call attachMaterialRippleOnLoad() function.

    index.html
    <script src="assets/vendor/js/material-ripple.js"></script>
    <script>
      window.attachMaterialRippleOnLoad();
    </script>
  4. Optionally you can enable material ripple. Just append material-ripple.js script to the <head> section.

    index.html
    <script src="assets/vendor/js/material-ripple.js"></script>

Dark styling

To enable dark styling you need to:

  1. Set dark-style class on the <html> element instead of light-style.

    index.html
    <html class="dark-style">
  2. Add -dark suffix to bootstrap.css, appwork.css, theme-*.css and colors.css stylesheets.

    index.html
    <link rel="stylesheet" href="assets/vendor/css/bootstrap-dark.css">
    <link rel="stylesheet" href="assets/vendor/css/appwork-dark.css">
    <link rel="stylesheet" href="assets/vendor/css/theme-corporate-dark.css">
    <link rel="stylesheet" href="assets/vendor/css/colors-dark.css">
    <link rel="stylesheet" href="assets/vendor/css/bootstrap-dark.css" class="theme-settings-bootstrap-css">
    <link rel="stylesheet" href="assets/vendor/css/appwork-dark.css" class="theme-settings-appwork-css">
    <link rel="stylesheet" href="assets/vendor/css/theme-corporate-dark.css" class="theme-settings-theme-css">
    <link rel="stylesheet" href="assets/vendor/css/colors-dark.css" class="theme-settings-colors-css">

RTL support

To enable RTL direction support just load Appwork's stylesheets from the vendor/css/rtl/ path instead of vendor/css/.

index.html
<link rel="stylesheet" href="assets/vendor/css/rtl/bootstrap.css">
<link rel="stylesheet" href="assets/vendor/css/rtl/appwork.css">
<link rel="stylesheet" href="assets/vendor/css/rtl/theme-corporate.css">
<link rel="stylesheet" href="assets/vendor/css/rtl/colors.css">
<link rel="stylesheet" href="assets/vendor/css/rtl/uikit.css">
<link rel="stylesheet" href="assets/vendor/css/rtl/bootstrap.css" class="theme-settings-bootstrap-css">
<link rel="stylesheet" href="assets/vendor/css/rtl/appwork.css" class="theme-settings-appwork-css">
<link rel="stylesheet" href="assets/vendor/css/rtl/theme-corporate.css" class="theme-settings-theme-css">
<link rel="stylesheet" href="assets/vendor/css/rtl/colors.css" class="theme-settings-colors-css">
<link rel="stylesheet" href="assets/vendor/css/rtl/uikit.css">

To enable RTL direction, add dir="rtl" attribute to the <html> element.

index.html
<html dir="rtl">

Layout options

You can configure the initial layout by setting control classes to the <html> element.

After the initial layout setup the recommended way to control layout options is layout helpers, because the helpers do some extra work, such as: setting container paddings (when navbar is fixed), performing layout animations, setting correct sidenav state classes depending on screen size etc.
index.html
<html class="layout-fixed layout-collapsed">
Control class Description
.layout-reversed Reverse layout direction without markup change.
.layout-expanded Expand layout sidenav on small screens (< 992px).
.layout-collapsed Collapse layout sidenav on large screens (>= 992px).
.layout-offcanvas Make layout sidenav offcanvas.
.layout-fixed Set layout position to fixed.
.layout-fixed-offcanvas Set layout position to fixed with offcanvas sidenav.
.layout-navbar-fixed Set layout navbar position to fixed.
.layout-footer-fixed Set layout footer position to fixed.

PACE.js progress

Optionally you can enable PACE.js progress bar:

  1. Append pace.js script to the <head> section.

    index.html
    <script src="assets/vendor/js/pace.js"></script>
  2. Append .page-loader element to the <body>.

    index.html
    <div class="page-loader"><div class="bg-primary"></div></div>

Sources

src directory structure

src
css
CSS sources
_appwork
Appwork includes
_custom-variables
Custom variables
_theme
Theme includes
_uikit
UIKit includes
pages
Page styles
rtl
Styles with RTL support enabled
appwork.scss
appwork-material.scss
appwork-dark.scss
...
fonts
Iconic fonts
fontawesome.scss
ionicons.scss
...
js
Javascript sources
bootstrap.js
dropdown-hover.js
...
libs
Third-party libraries
animate-css
autosize
block-ui
...
build-config.js
Build config
gulpfile.js
Gulp tasks
webpack.config.js
Webpack config
...

Third-party plugins

The starter project by default includes all third-party plugins.
Optionally you can remove unwanted plugins to reduce bundle size and compile time:

  1. Remove unwanted packages from the dependencies section in the src/package.json file.
  2. Remove related directories within the src/libs directory.
  3. Remove related @imports and @includes in the src/css/_theme/_libs.scss file.

For example, if you want to exclude plyr plugin, you will need to:

  1. Remove plyr dependency in the src/package.json file.
  2. Remove the src/libs/plyr directory.
  3. Remove @import "../../libs/plyr/mixins"; and @include plyr-theme($background, $color); lines in the src/css/_theme/_libs.scss file.

Installation

Windows
  1. Download and install latest Node.js LTS: https://nodejs.org/en/.
  2. Download and install Git: https://git-scm.com/downloads.
  3. Logout from the system and login again.
  4. Launch cmd.exe as an administrator and run command npm install --add-python-to-path='true' --global --production windows-build-tools.
  5. Logout from the system and login again.
  6. Go to the src directory and run command npm install.
Ubuntu
  1. Update system: sudo apt-get update && sudo apt-get upgrade.
  2. Install curl: sudo apt-get install curl.
  3. Install latest Node.js LTS and build tools: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages.
  4. Install Git: https://git-scm.com/download/linux.
  5. Go to the src directory and run command npm install.
Mac OS X
  1. Install Xcode from App Store. After installing, launch the Xcode, accept the license agreement and wait while components installed.
  2. Download and install latest Node.js LTS: https://nodejs.org/en/.
  3. Download and install Git: https://git-scm.com/downloads.
  4. Go to the src directory and run command npm install.

Features

By default, stylesheets within src/css/pages/, src/css/_uikit/ and src/libs/ directories include all available features, such as rtl support; light, material and dark styles. If you don't need to use all of this, it's highly recommended to disable unwanted features. It will let you to decrease the size of compiled stylesheets.

Just set appropriate variables to false in the src/css/_custom-variables/_features.scss, recompile sources and copy resulting stylesheets from the dist/ directory into your assets directory.

For example, if you don't need to include rtl support and material style, the src/css/_custom-variables/_features.scss file will look like this:

src/css/_custom-variables/_features.scss
$enable-rtl-support: false;
$enable-light-style: true;
$enable-material-style: false;
$enable-dark-style: true;

...

Build

Appwork's build system is a simple but powerful solution:

  • Uses Webpack + Babel for compilation. So you can use all Webpack features (such as requiring scripts) and write your code using the ES6 specification.
  • Simple SCSS compilation without any wrappers.
  • The output directory structure will repeat the source directory structure.
  • Automatically discovers .scss and .js files to compile. To exclude a file from compilation list just prepend a _ symbol to the filename.
  • Automatically copies images and font files.
  • Easy to configure - just edit build-config.js file.
  • Development and production environments. To add environment edit gulp-environment.environments section within package.json file.
  • Easy to extend the build system by adding new Gulp/Webpack tasks.

Example

Let's assume that src directory have the next structure:

src
stylesheets
components
dropdown.scss
includes
components
_dropdown-item.scss
_mixins.scss
_common.scss
_variables.scss
main.scss
javascripts
components
_dropdown-item.js
dropdown.js
utils
html
_elements.js
_selectors.js
http
_ajax.js
_serializer.js
utils.js
_config.js
common.js
images
logo.png
site.scss
site.js

The output directory will have the next structure:

dist
stylesheets
components
dropdown.css
main.css
javascripts
components
dropdown.js
utils
utils.js
common.js
images
logo.png
site.css
site.js

When you execute build task the next actions will be performed:

  1. Read build config options from build-config.js. The options can vary depending on the current environment.
  2. Run clean task if cleanBuild option is enabled.
  3. Run the next gulp tasks in parallel:
    • build:css - Runs SCSS compiltion for each file which filename is not starting with a _ symbol.
    • build:js - Collects all .js files which filename is not starting with a _ symbol. Then performs compilation via Webpack and Babel. All files are processed as separate entries.
    • build:fonts - Copies font files(that defined in the gulpfile) from node_modules.
    • build:copy - Copies images and other font files

Generator

Use starter template generator to simplify the initial setup. Just replace a content of appropriate files with the generated code within the html-starter directory.

Available tasks

Open console/terminal, go to the src directory and run npm run task_name. To run a task with specified environment just execute the task with --env=environment option, e.g. npm run build --env=production.

Task Description
build Compile sources and copy assets.
build:js Compile javascript sources.
build:css Compile SCSS sources.
build:fonts Copy fonts that defined in the gulpfile.
build:copy Copy images and other font files.
build:prod Run build task in production environment.
build:prod:js Run build:js task in production environment.
build:prod:css Run build:css task in production environment.
build:prod:fonts Run build:fonts task in production environment.
build:prod:copy Run build:copy task in production environment.
watch Watch files for changes and automatically recompile it when changed.

Migration guide

Do not forget to commit changes or clone the project before performing migration steps.
  • If you're using compiled assets:

    Copy with replace css, fonts, js and libs directories from the dist directory to your assets/vendor directory.

  • If you're using uncompiled sources:

    1. Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)

    2. Remove the next files and directories:

      libs/vegas/
    3. Since some extensions were removed from the bootstrap-table package, remove libs/bootstrap-table/ directory and copy new appwork-v1_6_0/src/libs/bootstrap-table/

    4. Copy with replace all SCSS files within css/ and css/rtl/ directories:

      css/*.scss
      css/rtl/*.scss
    5. Copy with replace changed files and directories:

      css/_appwork/
      css/_uikit/
      libs/blueimp-gallery/
      libs/bootstrap-slider/
      libs/dropzone/
      libs/fullcalendar/
      libs/nouislider/
      libs/minicolors/
      libs/photoswipe/
      libs/plyr/
      libs/select2/
      libs/smartwizard/
      libs/sortablejs/
      libs/swiper/
      libs/timepicker/
      libs/typeahead-js/
    6. Update:

      package.json. Diff

    7. Remove node_modules directory and package-lock.json. Then execute npm install

    8. Execute npm run build

Changes in third-party components:

  • vegas plugin was excluded from the package.

  • fullcalendar changed its API and configuration object:

    Before
    var eventList = [{
      ...
      className: 'fc-event-warning'
    }, {
      ...
      rendering: 'background'
    }];
    
    new Calendar($('#id')[0], {
      ...
      defaultDate: ...,
      eventLimit: ...,
      defaultView: '...',
      dir: 'rtl',
      header: {
        ...
        left: '...',
        right: '...'
      },
      views: {
        dayGrid: {
          eventLimit: ...
        }
      },
    });
    After
    var eventList = [{
      ...
      classNames: 'fc-event-warning'
    }, {
      ...
      display: 'background'
    }];
    
    new Calendar($('#id')[0], {
      ...
      initialDate: ...,
      dayMaxEventRows: ...,
      initialView: '...',
      direction: 'rtl',
      headerToolbar: {
        ...
        start: '...',
        end: '...'
      },
      views: {
        dayGrid: {
          dayMaxEventRows: ...
        }
      },
    });

    For more info see https://fullcalendar.io/docs/upgrading-from-v4

  • dropzone configuration is changed.

    Before
    $('#id').dropzone();
    After
    var previewTemplate =
      '<div class="dz-preview dz-file-preview">' +
      '  <div class="dz-details">' +
      '    <div class="dz-thumbnail">' +
      '      <img data-dz-thumbnail>' +
      '      <span class="dz-nopreview">No preview</span>' +
      '      <div class="dz-success-mark"></div>' +
      '      <div class="dz-error-mark"></div>' +
      '      <div class="dz-error-message"><span data-dz-errormessage></span></div>' +
      '      <div class="progress"><div class="progress-bar progress-bar-primary" role="progressbar" aria-valuemin="0" aria-valuemax="100" data-dz-uploadprogress></div></div>' +
      '    </div>' +
      '    <div class="dz-filename" data-dz-name></div>' +
      '    <div class="dz-size" data-dz-size></div>' +
      '  </div>' +
      '</div>';
                
    $('#id').dropzone({
      previewTemplate: previewTemplate
    });
  • smartwizard markup and API are changed.

    Before
    <ul>
      <li><a href="#" class="mb-3">...</a></li>
      ...
    </ul>
    
    <div class="mb-3">
      <div id="smartwizard-1-step-1" class="card animated fadeIn">
        ...
      </div>
    </div>
    After
    <ul class="nav">
      <li><a href="#" class="nav-link mb-3">...</a></li>
      ...
    </ul>
    
    <div class="tab-content mb-3">
      <div id="#" class="tab-pane card" role="tabpanel">
        ...
      </div>
    </div>
    Before
    $el.smartWizard({
      useURLhash: false,
      showStepURLhash: false,
      ...
    })
    .on('leaveStep', function(e, anchorObject, stepNumber, stepDirection) {
      if (stepDirection === 'forward'){ return $el.valid(); }
      return true;
    })
    .on('showStep', function(e, anchorObject, stepNumber, stepDirection) {
      var $btn = $el.find('.btn-finish');
    
      if (stepNumber === 3) {
        $btn.removeClass('hidden');
      } else {
        $btn.addClass('hidden');
      }
    });
    After
    $el.smartWizard({
      enableURLhash: false,
      ...
    })
    .on('leaveStep', function(e, anchorObject, currentStepIndex, nextStepIndex, stepDirection) {
      var $finishBtn = $el.find('.btn-finish');
    
      if (stepDirection === 'forward'){
        var isValid = $el.valid();
    
        if (!isValid) {
          anchorObject.addClass('danger');
        } else {
          anchorObject.removeClass('danger');
    
          if (nextStepIndex === 3) {
            $finishBtn.removeClass('d-none');
          }
        }
    
        return isValid;
      } else {
        $finishBtn.addClass('d-none');
      }
    
      return true;
    })
    .find('> .toolbar .btn:not(.btn-primary)').addClass('btn-secondary');

    For more info see http://techlaboratory.net/jquery-smartwizard

  • If you're using compiled assets:

    Copy with replace dist/libs/select2/select2.css.

  • If you're using uncompiled sources:

    1. Copy with replace the next files and directories:

      src/css/_appwork/_functions.scss
      src/libs/bootstrap-datepicker/
      src/libs/bootstrap-daterangepicker/
      src/libs/bootstrap-material-datetimepicker/
      src/libs/bootstrap-select/
      src/libs/flatpickr/
      src/libs/growl/
      src/libs/plyr/
      src/libs/select2/
      src/libs/sweetalert2/
      src/libs/timepicker/
      src/libs/typeahead-js/
    2. Execute npm run build
  • If you're using compiled assets:

    Copy with replace dist/libs/flatpickr/flatpickr.css.

  • If you're using uncompiled sources:

    1. Copy with replace the next file:

      src/libs/flatpickr/flatpickr.scss
    2. Execute npm run build
  • If you're using compiled assets:

    Copy with replace css, fonts, js and libs directories from the dist directory to your assets/vendor directory.

  • If you're using uncompiled sources:

    1. Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)

      Note: Yarn package manager is not reqired anymore.

    2. Remove the next files and directories:

      css/migrate/
    3. Copy new files and directories:

      css/_custom-variables/_appwork-dark.scss
      css/_custom-variables/_features.scss
    4. Since some extensions were removed from the bootstrap-table package, remove libs/bootstrap-table/ directory and copy new appwork-v1_5_0/src/libs/bootstrap-table/

    5. Copy with replace all SCSS files within css/ and css/rtl/ directories:

      css/*.scss
      css/rtl/*.scss
    6. Copy with replace changed files and directories:

      js/bootstrap.js
      js/layout-helpers.js
      js/polyfills.js
      js/sidenav.js
      js/theme-settings.js
      js/_theme-settings/
      css/_appwork/
      css/_theme/
      css/_uikit/
      css/pages/
      libs/autosize/
      libs/block-ui/
      libs/blueimp-gallery/
      libs/bootbox/
      libs/bootstrap-datepicker/
      libs/bootstrap-daterangepicker/
      libs/bootstrap-duallistbox/
      libs/bootstrap-markdown/
      libs/bootstrap-material-datetimepicker/
      libs/bootstrap-maxlength/
      libs/bootstrap-menu/
      libs/bootstrap-select/
      libs/bootstrap-slider/
      libs/bootstrap-sortable/
      libs/bootstrap-tagsinput/
      libs/c3/
      libs/chartist/
      libs/chartjs/
      libs/clipboard/
      libs/cropper/
      libs/d3/
      libs/datatables/
      libs/dragula/
      libs/dropzone/
      libs/eve/
      libs/flatpickr/
      libs/flot/
      libs/flow-js/
      libs/fullcalendar/
      libs/gmaps/
      libs/growl/
      libs/jstree/
      libs/knob/
      libs/ladda/
      libs/mapael/
      libs/markdown/
      libs/masonry/
      libs/minicolors/
      libs/moment/
      libs/morris/
      libs/nestable/
      libs/nouislider/
      libs/numeral/
      libs/perfect-scrollbar/
      libs/photoswipe/
      libs/plyr/
      libs/popper/
      libs/pwstrength-bootstrap/
      libs/quill/
      libs/raphael/
      libs/select2/
      libs/shepherd/
      libs/smartwizard/
      libs/sortablejs/
      libs/sparkline/
      libs/spin/
      libs/spinkit/
      libs/sweetalert2/
      libs/swiper/
      libs/tableexport/
      libs/timepicker/
      libs/toastr/
      libs/typeahead-js/
      libs/validate/
      libs/vanilla-text-mask/
      libs/vegas/
    7. Update:

      gulpfile.js. Diff

      package.json. Diff

      webpack.config.js. Diff

      css/_custom-variables/_libs.scss. Diff

      css/_custom-variables/_pages.scss. Diff

      css/_custom-variables/_uikit.scss. Diff

    8. Edit variables in the css/_custom-variables/_features.scss file according your setup.

      Variable Feature
      $enable-rtl-support Set to true to enable RTL mode support, otherwise set to false.
      $enable-light-style Set to true to enable light (previously default) style support, otherwise set to false.
      $enable-material-style Set to true to enable material style support, otherwise set to false.
      $enable-dark-style Set to true to enable dark style support, otherwise set to false.
    9. Remove node_modules directory and then execute npm install

    10. Execute npm run build

  • theme-default class is renamed to theme-light.

    Before
    <html lang="en" class="default-style">
    After
    <html lang="en" class="light-style">
  • ThemeSettings plugin settings are changed. Use Settings Panel Generator to get updated settings.

  • ThemeSettings.setMaterial() method is removed.
    Added ThemeSettings.setStyle(), ThemeSettings.isLightStyle(), ThemeSettings.isMaterialStyle(), ThemeSettings.isDarkStyle() methods.
    See Settings panel docs.

  • New style-dependent utility classes, which change its color depending on the current active style:

    • .theme-text-white - White (light or material style) / dark (dark style) text.
    • .theme-text-dark - Dark (light or material style) / white (dark style) text.
    • .theme-bg-white - White (light or material style) / dark (dark style) background.
    • .theme-bg-dark - Dark (light or material style) / white (dark style) background.
    • .theme-border-white - White (light or material style) / dark (dark style) border.
    • .theme-border-dark - Dark (light or material style) / white (dark style) border.

Changes in third-party components:

  • plyr changed its initialization method:

    Before
    plyr.setup('#selector', options);
    After
    new Plyr('#selector', options);
  • spinkit classes are changed. See https://github.com/tobiasahlin/SpinKit

  • SweetAlert's type option is renamed to icon.

    Before
    Swal.fire({
      ...,
      type: 'warning',
    });
    After
    Swal.fire({
      ...,
      icon: 'warning',
    });
  1. Update assets.

    • If you're using compiled assets:

      Copy with replace the next files and directories from the dist directory to your assets/vendor:

      css/
      js/
      libs/
      fonts/fontawesome/
      fonts/fontawesome.css
      fonts/ionicons/
      fonts/ionicons.css
      fonts/linearicons/
      fonts/pe-icon-7-stroke/
    • If you're using uncompiled sources:

      1. (Optional) Upgrade Node.js to 10.16 LTS and Yarn.

      2. Webpack config was modified to compile .js files, support of .es6 extension is deprecated and will be removed in the next update. Resulting this changes, you need to rename your *.es6 files to *.js. Also, remove the next directories from your source directory and copy the corresponding ones from the release:

        js/
        libs/bootstrap-material-datetimepicker/
        libs/bootstrap-sortable/
        libs/bootstrap-table/
        libs/bootstrap-tagsinput/
        libs/dropzone/
        libs/perfect-scrollbar/
        libs/photoswipe/
        libs/popper/
        libs/quill/
        libs/sparkline/
        libs/typeahead-js/
        libs/vegas/
      3. Copy with replace changed files and directories:

        css/_appwork/_custom-forms.scss
        css/_appwork/_dropdown.scss
        css/_appwork/_forms.scss
        css/_appwork/_layout.scss
        css/_appwork/_mixins.scss
        css/_appwork/_nav.scss
        css/_appwork/_sidenav.scss
        css/_appwork/_tables.scss
        css/_appwork/_utilities.scss
        libs/autosize/
        libs/block-ui/
        libs/blueimp-gallery/
        libs/bootbox/
        libs/bootstrap-datepicker/
        libs/bootstrap-daterangepicker/
        libs/bootstrap-duallistbox/
        libs/bootstrap-markdown/
        libs/bootstrap-maxlength/
        libs/bootstrap-menu/
        libs/bootstrap-select/
        libs/bootstrap-slider/
        libs/c3/
        libs/chartist/
        libs/chartjs/
        libs/clipboard/
        libs/cropper/
        libs/d3/
        libs/datatables/
        libs/dragula/
        libs/eve/
        libs/flatpickr/
        libs/flot/
        libs/flow-js/
        libs/fullcalendar/
        libs/gmaps/
        libs/growl/
        libs/jstree/
        libs/knob/
        libs/ladda/
        libs/mapael/
        libs/markdown/
        libs/masonry/
        libs/minicolors/
        libs/moment/
        libs/morris/
        libs/nestable/
        libs/nouislider/
        libs/numeral/
        libs/plyr/
        libs/pwstrength-bootstrap/
        libs/raphael/
        libs/select2/
        libs/shepherd/
        libs/smartwizard/
        libs/sortablejs/
        libs/spin/
        libs/sweetalert2/
        libs/swiper/
        libs/tableexport/
        libs/timepicker/
        libs/toastr/
        libs/validate/
        libs/vanilla-text-mask/
      4. Remove the next directories from your source directory:

        libs/bootstrap-multiselect/
        libs/bootstrap-sweetalert/
      5. Update:

        package.json. Diff

        gulpfile.js. Diff

        webpack.config.js. Diff

      6. Execute yarn install --ignore-engines

      7. Execute npm run build

Changes in third-party libraries:

  • bootstrap-multiselect plugin was removed.
  • bootstrap-sweetalert replaced with original sweetalert2 plugin. API isn't changed.
  • Shepherd.js changed its API. See html-demo/assets/js/ui_tour.js for example. https://shepherdjs.dev/docs/tutorial-02-usage.html
  • Available extensions list of bootstrap-table package is changed (see vendor/libs/bootstrap-table/extensions):

    Added extensions/cell-input
    Removed extensions/group-by
    Removed extensions/multi-column-toggle
    Removed extensions/multiple-search
    Removed extensions/multiple-selection-row
    Removed extensions/select2-filter
    Removed extensions/tree-column
  • If you're using compiled assets:

    Copy with replace the next directories from the dist directory to your assets/vendor:

    libs/bootstrap-sortable/
    libs/flot/
    libs/idletimer/
  • If you're using uncompiled sources:

    1. Copy with replace the next directories:

      libs/bootstrap-sortable/
      libs/flot/
      libs/idletimer/
    2. Update:

      package.json. Diff

    3. Execute yarn install

    4. Execute npm run build
  • If you're using compiled assets:

    Copy with replace css, fonts, js and libs directories from the dist directory to your assets/vendor directory.

  • If you're using uncompiled sources:

    1. (Optional) Upgrade Node.js to 10.15 LTS and Yarn

    2. Remove excluded libraries:

      libs/bootstrap-tour/
    3. Copy new files and directories:

      css/migrate/
      js/polyfills.es6
      libs/flatpickr/
      libs/shepherd/
      libs/sweetalert2/
    4. Since some extensions were removed from the bootstrap-table package, remove libs/bootstrap-table/ directory and copy new appwork-v1_3_0/src/libs/bootstrap-table/

    5. Copy with replace all SCSS files within css/ and css/rtl/ directories:

      css/*.scss
      css/rtl/*.scss
    6. Copy with replace changed files and directories:

      css/_appwork/
      css/_theme/
      css/_uikit/_social.scss
      css/pages/clients.scss
      css/pages/messages.scss
      js/_theme-settings/
      js/theme-settings.es6
      js/bootstrap.es6
      js/material-ripple.es6
      libs/bootbox/
      libs/bootstrap-daterangepicker/
      libs/bootstrap-markdown/
      libs/bootstrap-select/
      libs/bootstrap-slider/
      libs/bootstrap-sweetalert/
      libs/bootstrap-table/
      libs/bootstrap-tagsinput/
      libs/flot/
      libs/fullcalendar/
      libs/minicolors/
      libs/nouislider/
      libs/plyr/
      libs/quill/
      libs/select2/
      libs/swiper/
      gulpfile.js
    7. Update:

      webpack.config.js. Diff

      package.json. Diff

    8. Execute yarn upgrade

    9. Execute npm run build

  • Include polyfills in the <head> block after core stylesheets (see html5-starter-generator for example):

    <!-- Load polyfills -->
    <script src="assets/vendor/js/polyfills.js"></script>
    <script>document['documentMode']===10&&document.write('<script src="//polyfill.io/v3/polyfill.min.js?features=Intl.~locale.en"><\/script>')</script>
  • Bootstrap CSS:

    Include migration CSS file to the end of the <head> block:

    <link rel="stylesheet" href="assets/vendor/css/migrate/appwork-130.css">

    Remove this import after you correct all changed CSS classes in your HTML code.

    Changed classes:

    .font-weight-thin → .font-weight-lighter
    .text-dark → .text-body
    .bg-none → .bg-transparent
    .font-sans-serif → .text-sans-serif
    .font-serif → .text-serif
    .font-monospace → .text-monospace
    .box-shadow-none → .shadow-none
    .container-m--x → .container-m-nx
    .container-m--y → .container-m-ny
    .btn-round → .rounded-pill
    
    Negative horizontal margins:
    .m{sides}--{size} → .m{sides}-n{size}
    .m{sides}-{breakpoint}--{size} → .m{sides}-{breakpoint}-n{size}
  • Bootstrap JS:

    All dropdown links must have href="#" attribute. Dropdown links with href="javascript:void(0)" will throw an error

  • Plugin API changed:

    Flot.js - See https://github.com/flot/flot/blob/master/CHANGELOG.md

    bootstrap-table - see demo examples

    Fullcalendar - See https://fullcalendar.io/docs

    bootstrap-sweetalert is deprecated, use Sweetalert2 instead. See - https://sweetalert2.github.io/

    bootstrap-tour library was removed, use "shepherd" tour library instead. See - https://shipshapecode.github.io/shepherd/


Note: Validation icons are disabled by default. To enable it, add the next variable in the css/_custom-variables/_appwork.scss and css/_custom-variables/_appwork-material.scss:

$enable-validation-icons: true;
  • If you're using compiled assets:

    Copy with replace css, fonts, js and libs directories from the dist directory to your assets/vendor directory.

  • If you're using uncompiled sources:

    1. Copy with replace changed files:

      css/_appwork/_accordion.scss
      css/_appwork/_breadcrumb.scss
      css/_appwork/_buttons.scss
      css/_appwork/_close.scss
      css/_appwork/_custom-forms.scss
      css/_appwork/_mixins.scss
      css/_appwork/_switcher.scss
      css/_appwork/_variables-material.scss
      css/_appwork/_variables.scss
      css/colors-material.scss
      fonts/fontawesome.scss
      gulpfile.js
      libs/blueimp-gallery/gallery.scss
      libs/dropzone/dropzone.scss
      libs/minicolors/minicolors.scss
      libs/spinkit/spinkit.scss
      libs/toastr/toastr.scss
      libs/typeahead-js/typeahead.scss
      package.json
      webpack.config.js
    2. Execute yarn install
    3. Execute npm run build