summaryrefslogtreecommitdiffstats
path: root/templates/admin/index.html
blob: decc138b7f97c0d55e52ad749572605997eb7f96 (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
34
35
36
{{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",
      "shared": "/assets/lib/shared.js"
    }
  }
  </script>
</head>

<body>
  <nav>
    <a href="/">forside</a>
    <a href="/admin">admin</a>
    <a href="/admin/new">nytt innlegg</a>
    <a href="/admin/settings">innstillinger</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}}
    {{if eq .ContentTemplate "settings-content"}}{{template "settings-content" .}}{{end}}
  </main>
</body>

</html>
{{end}}