aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/templates/layout.html
blob: fe4e0f9f5e4f59f6342fa95b660e8089f4dc892a (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
{{define "layout"}}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>THOI Admin{{if .Page}} — {{.Page}}{{end}}</title>
<link rel="stylesheet" href="/static/admin.css">
<script src="/static/admin.js"></script>
<script src="/static/colorpicker.js"></script>
</head>
<body>
<nav class="nav">
  <a href="/" class="{{if eq .Page "map"}}active{{end}}">Map</a>
  <a href="/editor/objects" class="{{if eq .Page "objects"}}active{{end}}">Objects</a>
  <a href="/editor/items" class="{{if eq .Page "items"}}active{{end}}">Items</a>
  <a href="/editor/mobs" class="{{if eq .Page "mobs"}}active{{end}}">Mobs</a>
  <a href="/editor/drops" class="{{if eq .Page "drops"}}active{{end}}">Drops</a>
  <a href="/editor/hazards" class="{{if eq .Page "hazards"}}active{{end}}">Hazards</a>
  <a href="/editor/techs" class="{{if eq .Page "techs"}}active{{end}}">Techs</a>
  <a href="/editor/modules" class="{{if eq .Page "modules"}}active{{end}}">Modules</a>
  <a href="/editor/players" class="{{if eq .Page "players"}}active{{end}}">Players</a>
  <a href="/editor/dashboard" class="{{if eq .Page "dashboard"}}active{{end}}">Dashboard</a>
  <a href="/editor/files" class="{{if eq .Page "files"}}active{{end}}">Files</a>
  <a href="/editor/triggers" class="{{if eq .Page "triggers"}}active{{end}}">Triggers</a>
  <div class="undo-bar">
    <span class="undo-label"></span>
    <button class="undo-btn" onclick="doUndo()" title="">⟲ Undo</button>
    <button class="redo-btn" onclick="doRedo()" title="">⟳ Redo</button>
  </div>
  <span style="font-size:11px;color:#888">| {{.Account}}</span>
  <a href="/logout" style="font-size:11px">Logout</a>
</nav>
{{if eq .Page "map"}}{{template "body-map" .}}
{{else if eq .Page "objects"}}{{template "body-objects" .}}
{{else if eq .Page "items"}}{{template "body-items" .}}
{{else if eq .Page "mobs"}}{{template "body-mobs" .}}
{{else if eq .Page "drops"}}{{template "body-drops" .}}
{{else if eq .Page "hazards"}}{{template "body-hazards" .}}
{{else if eq .Page "techs"}}{{template "body-techs" .}}
{{else if eq .Page "modules"}}{{template "body-modules" .}}
{{else if eq .Page "players"}}{{template "body-players" .}}
{{else if eq .Page "dashboard"}}{{template "body-dashboard" .}}
{{else if eq .Page "files"}}{{template "body-files" .}}
{{else if eq .Page "triggers"}}{{template "body-triggers" .}}
{{else if eq .Page "duplicate-rooms"}}{{template "body-duplicate-rooms" .}}
{{else}}<p style="color:#888;text-align:center;margin-top:60px">Unknown page: {{.Page}}</p>{{end}}
</body>
</html>
{{end}}