Generating alternative smartadmin module

From MiRTA PBX documentation
Revision as of 06:48, 13 December 2020 by Admin (talk | contribs)
Jump to navigation Jump to search

If you plan to apply substantial changes to the SmartAdmin theme module, it can be worth getting one developer license and compile your own smartadmin theme module. If not used to nodejs, npm and gulp, it can appear troublesome to compile all the data. Hidden in the SmartAdmin documentation there is a Youtube video but the relevant steps are the following:

Install nvm to be able to select the nodejs version of choice. The documentation states to use version 6.9.2, but that doesn't work, so I used version 10.16.0

 curl -sL -o
 chmod a+x

Check the available versions

 nvm -ls-remote

Install the version of your choice

 nvm install 10.16.0
 npm install express

Go in the smartadmin-html-full and run the commands:

 npm install gulp
 npm install
 gulp build

If you just want to change the colors, the relevant change to apply is in ./src/scss/_modules/variables.scss

These are the colors used by default:

 $color-primary: #2198F3;
 $color-success: #52bf11;
 $color-info: #BB1BF4;
 $color-warning: #FF9A13;
 $color-danger: #FC1349;

Don't forget to enable some "speedups" in build.json

               "compile": {
                       "jsUglify": true,
                       "cssMinify": true,
                       "jsSourcemaps": true,
                       "cssSourcemaps": true,
                       "autoprefixer": true,
                       "seedOnly": false,
                       "rtl": false