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.

48 lines
1.5 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Administration</title>
  5. <link rel="stylesheet" href="/css/admin.css">
  6. <link rel="preconnect" href="https://fonts.gstatic.com">
  7. <link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'>
  8. </head>
  9. <body>
  10. <header>
  11. <h3><a href="/admin">Admin</a></h3>
  12. <div class="right-header">
  13. <a href="/admin/logout">Logout</a>
  14. </div>
  15. </header>
  16. <main>
  17. <h2>Admin</h2>
  18. <div class="list-header">
  19. <h3>Posts</h3>
  20. <a id="new-post" href="/admin/post/new"><button>New</button></a>
  21. </div>
  22. <div id="post-list">
  23. <!-- Table starts here -->
  24. <table class="post-table">
  25. <thead>
  26. <tr>
  27. <th>Title</th>
  28. <th>Created At</th>
  29. <th>Updated At</th>
  30. <th></th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. {{ range $post := .Posts }}
  35. <tr>
  36. <td data-title="Username">{{ $post.Title }}</td>
  37. <td data-title="Created At">{{ FormatTimestamp $post.CreatedAt }}</td>
  38. <td data-title="Updated At">{{ FormatTimestamp $post.UpdatedAt }}</td>
  39. <td data-title=""><a href="/admin/post/{{ $post.ID }}/edit"><button>Edit</button></a></td>
  40. </tr>
  41. {{ end }}
  42. </tbody>
  43. </table>
  44. </div>
  45. </main>
  46. </body>
  47. </html>