summaryrefslogtreecommitdiffstats
path: root/internal/admin/templates/base.html
blob: 083d04b401f1faa9dbb9bff14b864298e1654604 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{{define "base"}}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Admin — {{.Title}}</title>
  <link rel="stylesheet" href="/assets/styles/admin.css">
  <script type="importmap">
  {
    "imports": {
      "editorjs-bundle": "/assets/admin/lib/dist/build.js"
    }
  }
  </script>
</head>

<body>
  <nav>
    <span class="brand">Admin</span>
    <a href="/admin/">Posts</a>
    <a href="/admin/new">New Post</a>
  </nav>
  <main>
    {{if eq .ContentTemplate "list-content"}}{{template "list-content" .}}{{end}}
    {{if eq .ContentTemplate "form-content"}}{{template "form-content" .}}{{end}}
    {{if eq .ContentTemplate "error-content"}}{{template "error-content" .}}{{end}}
  </main>
</body>

</html>
{{end}}