Generating alternative smartadmin module

From MiRTA PBX documentation
Revision as of 15:40, 20 March 2021 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
 gulp build-rtlcss

Depending on the system you may need to install gulp using:

 npm install --global gulp-cli

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