html-starter directory structureindex.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>
<!-- 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 -->
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">
To enable material styling you need to:
Set material-style class on the <html> element instead of light-style.
index.html
<html class="material-style">
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">
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>
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>
To enable dark styling you need to:
Set dark-style class on the <html> element instead of light-style.
index.html
<html class="dark-style">
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">
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">
You can configure the initial layout by setting control classes to the <html> element.
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. |
Optionally you can enable PACE.js progress bar:
Append pace.js script to the <head> section.
index.html
<script src="assets/vendor/js/pace.js"></script>
Append .page-loader element to the <body>.
index.html
<div class="page-loader"><div class="bg-primary"></div></div>
src directory structure
The starter project by default includes all third-party plugins.
Optionally you can remove unwanted plugins to reduce bundle size and compile time:
dependencies section in the src/package.json file.src/libs directory.@imports and @includes in the src/css/_theme/_libs.scss file.For example, if you want to exclude plyr plugin, you will need to:
plyr dependency in the src/package.json file.src/libs/plyr directory.@import "../../libs/plyr/mixins"; and @include plyr-theme($background, $color);
lines in the src/css/_theme/_libs.scss file.
cmd.exe as an administrator and run command npm install --add-python-to-path='true' --global --production windows-build-tools.src directory and run command npm install.sudo apt-get update && sudo apt-get upgrade.sudo apt-get install curl.src directory and run command npm install.src directory and run command npm install.
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;
...
Appwork's build system is a simple but powerful solution:
.scss and .js files to compile. To exclude a file from compilation
list just prepend a _ symbol to the filename.
build-config.js file.gulp-environment.environments section within package.json file.Let's assume that src directory have the next structure:
The output directory will have the next structure:
When you execute build task the next actions will be performed:
build-config.js.
The options can vary depending on the current environment.
clean task if cleanBuild option is enabled.
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
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.
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. |
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:
Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)
Remove the next files and directories:
libs/vegas/
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/
Copy with replace all SCSS files within css/ and css/rtl/ directories:
css/*.scss css/rtl/*.scss
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/
Update:
package.json. Diff
Remove node_modules directory and package-lock.json. Then execute npm install
npm run buildChanges 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:
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/
npm run buildIf you're using compiled assets:
Copy with replace dist/libs/flatpickr/flatpickr.css.
If you're using uncompiled sources:
Copy with replace the next file:
src/libs/flatpickr/flatpickr.scss
npm run buildIf 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:
Upgrade Node.js to the latest LTS release (https://nodejs.org/en/)
Note: Yarn package manager is not reqired anymore.
Remove the next files and directories:
css/migrate/
Copy new files and directories:
css/_custom-variables/_appwork-dark.scss css/_custom-variables/_features.scss
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/
Copy with replace all SCSS files within css/ and css/rtl/ directories:
css/*.scss css/rtl/*.scss
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/
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
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. |
Remove node_modules directory and then execute npm install
npm run buildtheme-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',
});
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:
(Optional) Upgrade Node.js to 10.16 LTS and Yarn.
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/
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/
Remove the next directories from your source directory:
libs/bootstrap-multiselect/ libs/bootstrap-sweetalert/
Update:
package.json. Diff
gulpfile.js. Diff
webpack.config.js. Diff
Execute yarn install --ignore-engines
npm run buildChanges 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.htmlAvailable 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:
Copy with replace the next directories:
libs/bootstrap-sortable/ libs/flot/ libs/idletimer/
Update:
package.json. Diff
Execute yarn install
npm run buildIf 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:
(Optional) Upgrade Node.js to 10.15 LTS and Yarn
Remove excluded libraries:
libs/bootstrap-tour/
Copy new files and directories:
css/migrate/ js/polyfills.es6 libs/flatpickr/ libs/shepherd/ libs/sweetalert2/
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/
Copy with replace all SCSS files within css/ and css/rtl/ directories:
css/*.scss css/rtl/*.scss
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
Update:
webpack.config.js. Diff
package.json. Diff
Execute yarn upgrade
npm run buildInclude 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">
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:
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
yarn installnpm run build