From 59724dee819ab9ebc286e5e39a40e3e5825e8775 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Fri, 29 Aug 2025 07:51:04 -0500 Subject: [PATCH] add monster panel to admin --- data/dk.db | Bin 98304 -> 98304 bytes internal/models/monsters/monsters.go | 9 ++ internal/routes/admin.go | 204 +++++++++++++++++++++++++++ templates/admin/monsters/edit.html | 52 +++++++ templates/admin/monsters/index.html | 66 +++++++++ 5 files changed, 331 insertions(+) create mode 100644 templates/admin/monsters/edit.html create mode 100644 templates/admin/monsters/index.html diff --git a/data/dk.db b/data/dk.db index fa290bb7001040c5484cdcbb0db929330a21de40..eda1cbca90feef7f934d3e91fde778a74e0f9a41 100644 GIT binary patch delta 17 ZcmZo@U~6b#+i>kY)BO9JZ@kx-002uh2{Zrz delta 17 ZcmZo@U~6b#+i>kY)7{if monster.ID}Edit Monster: {monster.Name}{else}Add New Monster{/if} + +
+ {csrf} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + + {if monster.ID} + + {/if} +
+
+{/block} \ No newline at end of file diff --git a/templates/admin/monsters/index.html b/templates/admin/monsters/index.html new file mode 100644 index 0000000..d42ec04 --- /dev/null +++ b/templates/admin/monsters/index.html @@ -0,0 +1,66 @@ +{include "admin/layout.html"} + +{block "content"} +

Monster Management

+ +
+ Add New Monster +
+ +

+ Total monsters: {#monsters} | Page {currentPage} of {totalPages} +

+ +{if #monsters > 0} + + + + + + + + + + + + + + + + + {for monster in monsters} + + + + + + + + + + + + + {/for} + +
IDNameLevelHPDamageArmorExpGoldImmunityActions
{monster.ID}{monster.Name}{monster.Level}{monster.MaxHP}{monster.MaxDmg}{monster.Armor}{monster.MaxExp}{monster.MaxGold}{monster.ImmunityName} + Edit +
+ +{if totalPages > 1} + +{/if} + +{else} +
+ No monsters found. +
+{/if} +{/block} \ No newline at end of file