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.

25 lines
843 B

  1. const utils = require('../utils/utils.js');
  2. module.exports=
  3. {
  4. /** Method which renders the entire sidebar through calling
  5. * appropriate widget js files.
  6. *
  7. * @param res
  8. * @returns {*|Promise}
  9. */
  10. main: function()
  11. {
  12. return new Promise(function(resolve, reject)
  13. {
  14. Promise.all([utils.include("sidebar/projectSidebar.html"),
  15. require("../sidebar/recentPosts.js").main(),
  16. require("../sidebar/categoriesSideBar.js").main()]).then(function(content)
  17. {
  18. resolve("<div class=\"col-md-4\">" + content.join('') + "</div>");
  19. }).catch(function(error)
  20. {
  21. reject(error);
  22. });
  23. })
  24. }
  25. };