From 069d3c1c81d71042706372df153254487a765dfc Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 29 Jun 2026 22:31:11 -0400 Subject: feat: wip web admin for mapping and crud --- internal/admin/templates/courses.html | 14 ++++++ internal/admin/templates/dashboard.html | 22 +++++++++ internal/admin/templates/drops.html | 18 ++++++++ internal/admin/templates/files.html | 81 +++++++++++++++++++++++++++++++++ internal/admin/templates/hazards.html | 14 ++++++ internal/admin/templates/items.html | 45 ++++++++++++++++++ internal/admin/templates/layout.html | 48 +++++++++++++++++++ internal/admin/templates/login.html | 28 ++++++++++++ internal/admin/templates/map.html | 21 +++++++++ internal/admin/templates/mobs.html | 52 +++++++++++++++++++++ internal/admin/templates/modules.html | 14 ++++++ internal/admin/templates/objects.html | 29 ++++++++++++ internal/admin/templates/players.html | 33 ++++++++++++++ internal/admin/templates/techs.html | 14 ++++++ 14 files changed, 433 insertions(+) create mode 100644 internal/admin/templates/courses.html create mode 100644 internal/admin/templates/dashboard.html create mode 100644 internal/admin/templates/drops.html create mode 100644 internal/admin/templates/files.html create mode 100644 internal/admin/templates/hazards.html create mode 100644 internal/admin/templates/items.html create mode 100644 internal/admin/templates/layout.html create mode 100644 internal/admin/templates/login.html create mode 100644 internal/admin/templates/map.html create mode 100644 internal/admin/templates/mobs.html create mode 100644 internal/admin/templates/modules.html create mode 100644 internal/admin/templates/objects.html create mode 100644 internal/admin/templates/players.html create mode 100644 internal/admin/templates/techs.html (limited to 'internal/admin/templates') diff --git a/internal/admin/templates/courses.html b/internal/admin/templates/courses.html new file mode 100644 index 0000000..60e07f8 --- /dev/null +++ b/internal/admin/templates/courses.html @@ -0,0 +1,14 @@ +{{define "body-courses"}} +
+
+ +
+ +
+
+

Select a course to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/dashboard.html b/internal/admin/templates/dashboard.html new file mode 100644 index 0000000..198746d --- /dev/null +++ b/internal/admin/templates/dashboard.html @@ -0,0 +1,22 @@ +{{define "body-dashboard"}} +
+

Dashboard

+
+
+ +{{end}} diff --git a/internal/admin/templates/drops.html b/internal/admin/templates/drops.html new file mode 100644 index 0000000..c040ef2 --- /dev/null +++ b/internal/admin/templates/drops.html @@ -0,0 +1,18 @@ +{{define "body-drops"}} +
+
+ +
+ +
+
+

Select a drop table to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/files.html b/internal/admin/templates/files.html new file mode 100644 index 0000000..b89a142 --- /dev/null +++ b/internal/admin/templates/files.html @@ -0,0 +1,81 @@ +{{define "body-files"}} +
+
+ +
+
+
+

Select a file to edit

+
+
+ +{{end}} diff --git a/internal/admin/templates/hazards.html b/internal/admin/templates/hazards.html new file mode 100644 index 0000000..0d60df6 --- /dev/null +++ b/internal/admin/templates/hazards.html @@ -0,0 +1,14 @@ +{{define "body-hazards"}} +
+
+ +
+ +
+
+

Select a hazard to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/items.html b/internal/admin/templates/items.html new file mode 100644 index 0000000..f8f3b66 --- /dev/null +++ b/internal/admin/templates/items.html @@ -0,0 +1,45 @@ +{{define "body-items"}} +
+
+ +
+ +
+
+

Select an item to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/layout.html b/internal/admin/templates/layout.html new file mode 100644 index 0000000..99c1f0d --- /dev/null +++ b/internal/admin/templates/layout.html @@ -0,0 +1,48 @@ +{{define "layout"}} + + + + +THOI Admin{{if .Page}} — {{.Page}}{{end}} + + + + + + +{{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 "courses"}}{{template "body-courses" .}} +{{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}}

Unknown page: {{.Page}}

{{end}} + + +{{end}} diff --git a/internal/admin/templates/login.html b/internal/admin/templates/login.html new file mode 100644 index 0000000..ffc59c6 --- /dev/null +++ b/internal/admin/templates/login.html @@ -0,0 +1,28 @@ + + + + + +THOI Admin — Login + + + +
+

THOI Admin Portal

+ {{if .Error}}

{{.Error}}

{{end}} +
+
+ + +
+
+ + +
+
+ +
+
+
+ + diff --git a/internal/admin/templates/map.html b/internal/admin/templates/map.html new file mode 100644 index 0000000..7f8d5a1 --- /dev/null +++ b/internal/admin/templates/map.html @@ -0,0 +1,21 @@ +{{define "body-map"}} +
+
+
+ + Z=0 + + + +
+ + +
+
+
+

Click a room to view details

+
+
+
+ +{{end}} diff --git a/internal/admin/templates/mobs.html b/internal/admin/templates/mobs.html new file mode 100644 index 0000000..d6191fa --- /dev/null +++ b/internal/admin/templates/mobs.html @@ -0,0 +1,52 @@ +{{define "body-mobs"}} +
+
+ +
+ +
+
+

Select a mob to edit

+
+
+ + + +{{end}} diff --git a/internal/admin/templates/modules.html b/internal/admin/templates/modules.html new file mode 100644 index 0000000..0f8ca7c --- /dev/null +++ b/internal/admin/templates/modules.html @@ -0,0 +1,14 @@ +{{define "body-modules"}} +
+
+ +
+ +
+
+

Select a module to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/objects.html b/internal/admin/templates/objects.html new file mode 100644 index 0000000..91aca09 --- /dev/null +++ b/internal/admin/templates/objects.html @@ -0,0 +1,29 @@ +{{define "body-objects"}} +
+
+ +
+ +
+
+

Select an object to edit

+
+
+ + +{{end}} diff --git a/internal/admin/templates/players.html b/internal/admin/templates/players.html new file mode 100644 index 0000000..43627d8 --- /dev/null +++ b/internal/admin/templates/players.html @@ -0,0 +1,33 @@ +{{define "body-players"}} +
+

Players

+ + + + +
NameLevelRoomAccount
+
+ +{{end}} diff --git a/internal/admin/templates/techs.html b/internal/admin/templates/techs.html new file mode 100644 index 0000000..084d564 --- /dev/null +++ b/internal/admin/templates/techs.html @@ -0,0 +1,14 @@ +{{define "body-techs"}} +
+
+ +
+ +
+
+

Select a tech to edit

+
+
+ + +{{end}} -- cgit v1.2.3