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.

56 lines
2.0 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Administration</title>
  5. <link rel="stylesheet" href="/css/admin.css">
  6. <link rel="stylesheet" href="/css/admin-new-post.css">
  7. <link rel="preconnect" href="https://fonts.gstatic.com">
  8. <link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'>
  9. </head>
  10. <body>
  11. <header>
  12. <h3><a href="/admin">Admin</a></h3>
  13. <div class="right-header">
  14. <a href="/admin/logout">Logout</a>
  15. </div>
  16. </header>
  17. <main>
  18. <h2>Admin</h2>
  19. <div class="list-header">
  20. <h3>New Post</h3>
  21. </div>
  22. <div id="create-new-post">
  23. <form enctype="multipart/form-data" action="/admin/post/{{ .Post.ID }}/edit" method="POST">
  24. <fieldset>
  25. <legend>New Post</legend>
  26. <label for="title">Title</label>
  27. <input type="text" name="title" value="{{ .Post.Title }}">
  28. <label for="subject">Subject</label>
  29. <select name="subject">
  30. <option value="Programming"
  31. {{ if eq .Post.Subject "Programming" }}
  32. selected
  33. {{ end }}
  34. >Programming</option>
  35. <option value="Pentesting"
  36. {{ if eq .Post.Subject "Pentesting" }}
  37. selected
  38. {{ end }}
  39. >Pentesting</option>
  40. </select>
  41. <label for="intro">Intro</label>
  42. <textarea name="intro" rows="6">{{ .Post.Intro }}</textarea><br/><br/>
  43. <label for="body">Body: </label>
  44. <textarea name="body" rows="20">{{ .Post.Body }}</textarea><br/><br/>
  45. <label for="img">Main Image: </label>
  46. <input type="file" id="img" name="img" accept="image/*">
  47. <label for="files">More files:</label>
  48. <input type="file" id="files" name="files" multiple><br><br>
  49. <input type="submit" value="Submit">
  50. </fieldset>
  51. </form>
  52. </div>
  53. </main>
  54. </body>
  55. </html>