aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/templates
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-15 05:10:40 -0400
committerhistoria <[not public]>2026-07-15 05:10:40 -0400
commit84dd8c7557d8b9d92cd8d339afc28a0fd9a3a896 (patch)
tree60c47059d6776e7b91fb516ebdb04a0932c9aa59 /internal/admin/templates
parentbeb188ce050fb76cdddc0bbeedee7ec608e47995 (diff)
downloadthehouseoficarus-84dd8c7557d8b9d92cd8d339afc28a0fd9a3a896.tar.gz
feat(admin): color scheme test page added
Diffstat (limited to 'internal/admin/templates')
-rw-r--r--internal/admin/templates/colors.html37
-rw-r--r--internal/admin/templates/layout.html2
2 files changed, 39 insertions, 0 deletions
diff --git a/internal/admin/templates/colors.html b/internal/admin/templates/colors.html
new file mode 100644
index 0000000..a559dc3
--- /dev/null
+++ b/internal/admin/templates/colors.html
@@ -0,0 +1,37 @@
+{{define "body-colors"}}
+<div class="color-themer">
+ <div class="editor-list color-list" id="colorList">
+ <div class="search-bar"><input type="search" id="colorFilter" placeholder="Filter categories..." oninput="filterColorRows(this.value)"></div>
+ <div id="colorRows"></div>
+ <div class="color-list-actions">
+ <button class="btn btn-sm" id="colorExportBtn" onclick="colorExport()">Export JSON</button>
+ <button class="btn btn-sm" id="colorImportBtn" onclick="colorImportPrompt()">Import JSON</button>
+ <button class="btn btn-sm" id="colorResetBtn" onclick="colorResetAll()">Reset all to defaults</button>
+ </div>
+ <div class="color-save-bar">
+ <button class="btn btn-primary" id="colorSaveBtn" onclick="colorSave()">Save Colors</button>
+ <span id="colorSaveStatus" class="color-save-status"></span>
+ </div>
+ </div>
+ <div class="editor-main color-preview-main">
+ <div class="color-preview-toolbar">
+ <label for="colorMode">Color mode:</label>
+ <select id="colorMode" onchange="renderColorPreview()">
+ <option value="xterm256">xterm256 (full color)</option>
+ <option value="ansi16">ansi16 (16-color nearest)</option>
+ <option value="none">none (uncolored)</option>
+ </select>
+ <span class="color-preview-hint">Right side updates live as you edit colors.</span>
+ </div>
+ <div class="color-preview-scroll">
+ <pre id="colorPreview" class="color-preview-pre"></pre>
+ </div>
+ </div>
+</div>
+<input type="hidden" id="colorImportInput">
+<script src="/static/coloreditor.js"></script>
+<script>
+initColorEditor();
+</script>
+{{end}}
+</content> \ No newline at end of file
diff --git a/internal/admin/templates/layout.html b/internal/admin/templates/layout.html
index 02f8a01..f3bf9fd 100644
--- a/internal/admin/templates/layout.html
+++ b/internal/admin/templates/layout.html
@@ -20,6 +20,7 @@
<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/triggers" class="{{if eq .Page "triggers"}}active{{end}}">Triggers</a>
+ <a href="/editor/colors" class="{{if eq .Page "colors"}}active{{end}}">Color</a>
<a href="/editor/characters" class="{{if eq .Page "characters"}}active{{end}}">Characters</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>
@@ -40,6 +41,7 @@
{{else if eq .Page "techs"}}{{template "body-techs" .}}
{{else if eq .Page "modules"}}{{template "body-modules" .}}
{{else if eq .Page "triggers"}}{{template "body-triggers" .}}
+{{else if eq .Page "colors"}}{{template "body-colors" .}}
{{else if eq .Page "characters"}}{{template "body-characters" .}}
{{else if eq .Page "dashboard"}}{{template "body-dashboard" .}}
{{else if eq .Page "files"}}{{template "body-files" .}}