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.

102 lines
3.6 KiB

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