Constructor
new CourseThemeModule()
- Source:
Extends
Members
content :ContentModule
- Description:
- Cached module instance for easy access
- Source:
Cached module instance for easy access
Type:
Methods
(async) applyHandler(req, res, next)
- Description:
- Handles applying theme settings
- Source:
Parameters:
| Name |
Type |
Description |
req |
ClientRequest
|
|
res |
ServerResponse
|
|
next |
function
|
|
(async) init()
- Source:
(async) processFileVariables(data)
- Description:
- Copies uploaded font files into the build
- Source:
Parameters:
| Name |
Type |
Description |
data |
object
|
The data to process |
(async) removeHandler(req, res, next)
- Description:
- Handles removing theme settings
- Source:
Parameters:
| Name |
Type |
Description |
req |
ClientRequest
|
|
res |
ServerResponse
|
|
next |
function
|
|
(async) setValues()
- Source:
(async) writeCustomLess(fwBuild)
- Description:
- Writes the customStyle and themeVariables attributes to LESS files. themeVariables are reduced into a string of variables, in the format `@key: value;`
- Source:
Parameters:
| Name |
Type |
Description |
fwBuild |
AdaptFrameworkBuild
|
Reference to the current build |
(async) writeFile(fwBuild, filename, fileContents) → {Promise}
- Description:
- Writes a file to the theme folder
- Source:
Parameters:
| Name |
Type |
Description |
fwBuild |
Object
|
Build data |
filename |
String
|
Name of output file |
fileContents |
String
|
Contents to be written |
Returns:
-
Type
-
Promise