Module templates

Themes

Themes is a directory of the following structure:

/static/css     директория стилей
/static/js      директория скриптов
/templates      директория шаблонов ejs

Themes can be located:

  • In the view directory of modules and platform - the system themes
  • In the applications directory of application as a platform - the projects themes
  • In the themes directory application - the project themes

Setting the current theme:

  1. For a platform
    • Setting theme in the config.json of the platform
    • Setting globals.theme in the deploy.json of the application
  2. For a module
    • Setting theme in the config.json of the module
    • Setting Module name.globals.theme in the deploy.json of the application

The default system theme is default (in the platform and modules “registry”, “geomap”, “report”).

Set the path to the theme directory in the theme field according to the following rules:

  1. The absolute path is taken as it is.
  2. A relative path is taken relative to the system paths in the following order:
    • Relative to the view directory of module and platform
    • Relative to the applications directory of the platform
    • Relative to the platform directory

Example in dnt

"geomap": {
      "globals": {
        "theme": "develop-and-test/themes/geomap",