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.

45 lines
966 B

  1. const utils = require('../utils/utils.js');
  2. module.exports=
  3. {
  4. renderPost: function(res, post)
  5. {
  6. res.write("<div class=\"w3-card-4 w3-margin w3-white\">");
  7. //image
  8. res.write("<div class=\"w3-container\">");
  9. //title
  10. res.write("<h3><b>" + post.name + "</b></h3>");
  11. //date
  12. res.write("<h5><span class=\"w3-opacity\">" + post.date + "</span></h5>");
  13. res.write("</div>");
  14. res.write("<div class=\"w3-container\">");
  15. //include page content
  16. utils.include(res, "../entries/" + post.url);
  17. res.write("</div></div>")
  18. }
  19. };
  20. /*
  21. <div class="w3-card-4 w3-margin w3-white">
  22. <img src="/w3images/woods.jpg" alt="Nature" style="width:100%">
  23. <div class="w3-container">
  24. <h3><b>TITLE HEADING</b></h3>
  25. <h5>Title description, <span class="w3-opacity">Date</span></h5>
  26. </div>
  27. <div class="w3-container">
  28. content
  29. </div>
  30. </div>
  31. */