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.

103 lines
3.6 KiB

  1. <br><br><br><br><br>
  2. <div class="row">
  3. <div class="col-md-6">
  4. <div class="blogPost">
  5. <h1 class="text-center">Server Controls</h1>
  6. <div class="text-center">
  7. <form action="/admin" method="post">
  8. <input type="submit" name="clearCache" value="Clear Cache" class="btn btn-lg btn-secondary" />
  9. <input type="hidden" name="clear_cache" value="true">
  10. </form>
  11. <br>
  12. <form action="/admin" method="post">
  13. <input type="submit" name="gitPull" value="Pull from Git" class="btn btn-lg btn-secondary" />
  14. <input type="hidden" name="git_pull" value="true">
  15. </form>
  16. </div>
  17. </div>
  18. </div>
  19. <div class="col-md-6">
  20. <div class="blogPost">
  21. <h1 class="text-center">Add Category</h1>
  22. <form action="/admin" method ="post" class="p-2">
  23. <div class="form-group">
  24. <input class="form-control" type="text" name="add_category" required>
  25. <label>Category</label>
  26. </div>
  27. <div class="text-center">
  28. <input type="submit" name="submit" value="Add"
  29. class="btn btn-lg btn-secondary"/>
  30. </div>
  31. </form>
  32. </div>
  33. <br>
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="col-md-6">
  38. <div class="blogPost">
  39. <h1 class="text-center">New Post</h1>
  40. <form action="/admin" method ="post" class="p-2">
  41. <!-- Post category -->
  42. <div class="form-group">
  43. <input class="form-control" type="text" name="add_post_category" required>
  44. <label class="w3-label w3-validate">Category</label>
  45. </div>
  46. <!-- Post name -->
  47. <div class="form-group">
  48. <input class="form-control" type="text" name="add_post_name" required>
  49. <label class="w3-label w3-validate">Name</label>
  50. </div>
  51. <!-- Post header picture -->
  52. <div class="form-group">
  53. <input class="form-control" type="text" name="add_post_picture" value="n/a" required>
  54. <label class="w3-label w3-validate">Picture</label>
  55. </div>
  56. <!-- Post date -->
  57. <div class="form-group">
  58. <input class="w3-input" type="date" name="add_post_date" required>
  59. <label class="w3-label w3-validate">Date</label>
  60. </div>
  61. <div class="text-center">
  62. <input type="submit" name="submit" value="Add"
  63. class="btn btn-lg btn-secondary"/>
  64. </div>
  65. </form>
  66. </div>
  67. </div>
  68. <div class="col-md-6">
  69. <h1 class="text-center">Categories</h1>
  70. <div class="blogPost">
  71. <table class="table table-striped">
  72. <thead class="thead-dark">
  73. <tr>
  74. <td>Name</td>
  75. <td>URL</td>
  76. <td>Edit</td>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. {for cat in categories}
  81. <tr>
  82. <td>{cat.name}</td>
  83. <td>{cat.url}</td>
  84. <td>{cat.category_id}</td>
  85. </tr>
  86. {/for}
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>