mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-12-23 16:19:08 +03:00
22 lines
No EOL
906 B
JavaScript
22 lines
No EOL
906 B
JavaScript
const path = require('path');
|
|
module.exports = {
|
|
name: "default",
|
|
colors: ["black", "white"],
|
|
languages: ["en"],
|
|
getFilePath(page) {
|
|
return path.resolve(__dirname, page) ;// path of the file for ejs rendering
|
|
},
|
|
/**
|
|
* Renderer function for theme
|
|
* @param {String} file a page of forum
|
|
* @param {{ user: Object }} data informations about page
|
|
* @param {{ color: String, forum_name:String, description:String }} options Extra options
|
|
* @param {Object} render request object
|
|
*/
|
|
render(file, data, options, req) {
|
|
// const { color, language, forum_name, description } = options; // General informations, meta, forum name, user language and color
|
|
// const { user } = data; // specific informations about page, user (req.user || null), and more
|
|
|
|
return req.render(this.getFilePath(file), { ...options, ...data });
|
|
}
|
|
} |