blogpost_editor.html 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {{ define "blogpost_editor.html" }}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="stylesheet" href="/api/v1/style/bootstrap.min.css">
  8. <link rel="stylesheet" href="/api/v1/style/mdb/mdb.min.css">
  9. </head>
  10. <body style="background-color: rgb(56, 56, 56);">
  11. {{ template "navigation.html" .navigation }}
  12. <div class="container-fluid p-2 position-relative"
  13. style="width: 80vw; max-width: 80%; background-color: rgb(22, 22, 22);">
  14. <div class="container">
  15. <div class="row">
  16. <div class="col-sm"></div>
  17. <div class="container position-relative">
  18. <a style="color: white; height: fit-content; font-size:xx-large; font-weight: bold; font-family: monospace;">Editing Existing Post</a>
  19. <div class="col m-5">
  20. <form method="patch" hx-patch="/admin/posts" hx-ext="json-enc" hx-target="#response" hx-swap="outerHTML">
  21. <div class="row"
  22. style="background-color: rgb(22, 22, 22); color: white; height: fit-content; font-size: larger; font-family: monospace;">
  23. <a>Post ID:</a>
  24. <textarea name="identifier"
  25. style="background-color: rgb(73, 73, 73); color: white;">{{ .Ident }}</textarea>
  26. </div>
  27. <div class="row"
  28. style="background-color: rgb(22, 22, 22); color: white; height: fit-content; font-size: larger; font-family: monospace;">
  29. <a>Category:</a>
  30. <select name="category" class="form-select"
  31. style="background-color: rgb(73, 73, 73); color: white; height: fit-content; font-size: larger; font-family: monospace;">
  32. <option selected>{{ .DefaultTopic }}</option>
  33. {{ range .Topics }}
  34. <option value="{{ . }}">{{ . }}</option>
  35. {{ end }}
  36. </select>
  37. </div>
  38. <div class="row"
  39. style="background-color: rgb(22, 22, 22); color: white; height: fit-content; font-size: large; font-family: monospace;">
  40. <a>Time of creation:</a>
  41. <textarea name="created"
  42. style="background-color: rgb(73, 73, 73); color: white;">{{ .Created }}</textarea>
  43. </div>
  44. <div class="row"
  45. style="background-color: rgb(22, 22, 22); color: white; height: fit-content; font-size: larger; font-family: monospace;">
  46. <a>Post Body:</a>
  47. <textarea name="body" rows="30" wrap="soft"
  48. style="background-color: rgb(73, 73, 73); color: white;">{{ .Body }}</textarea>
  49. </div>
  50. <button type="submit">Send</button><div id="response"></div>
  51. </form>
  52. </div>
  53. </div>
  54. <div class="col-sm"></div>
  55. </div>
  56. </div>
  57. </div>
  58. <script type="text/javascript" src="/api/v1/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
  59. <script src="/api/v1/htmx/htmx.min.js"></script>
  60. <script src="/api/v1/htmx/json-enc.js"></script>
  61. </body>
  62. </html>
  63. {{ end }}