Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
836 B

const utils = require('../utils/utils.js');
module.exports=
{
/** Method which renders the entire sidebar through calling
* appropriate widget js files.
*
* @param res
* @returns {*|Promise}
*/
main: function()
{
return new Promise(function(resolve, reject)
{
Promise.all([utils.include("sidebar/sidebar.html"),
require("../sidebar/recentPosts.js").main(),
require("../sidebar/categoriesSideBar.js").main()]).then(function(content)
{
resolve("<div class=\"col-md-4\">" + content.join('') + "</div>");
}).catch(function(error)
{
reject(error);
});
})
}
};