summaryrefslogtreecommitdiff
path: root/web/templates
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-14 18:13:22 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-16 02:44:02 +0000
commit9a7f19270c50def47be5dc1a9b30d8655d7098c9 (patch)
tree889533960475b82491644496d3af57bba167ca25 /web/templates
parent7cf03d3559d25377699c78085c6d722ba0aebae5 (diff)
feat: add authenticated /docs viewer for superpowers specs/plans
Renders docs/superpowers/{specs,plans}/*.md to HTML via goldmark, served from doot's own web server behind the existing session auth instead of as raw files. DOCS_DIR is configurable (defaults to docs/superpowers relative to the working directory) so the deployed server can point straight at the working repo and stay live-synced with no separate copy/deploy step for new docs.
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/docs-index.html29
-rw-r--r--web/templates/docs-view.html36
2 files changed, 65 insertions, 0 deletions
diff --git a/web/templates/docs-index.html b/web/templates/docs-index.html
new file mode 100644
index 0000000..c041a3f
--- /dev/null
+++ b/web/templates/docs-index.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Docs</title>
+ <link rel="stylesheet" href="/static/css/output.css">
+</head>
+<body class="min-h-screen bg-gray-900 text-slate-200 p-4">
+ <div class="max-w-2xl mx-auto pt-6">
+ <a href="/" class="text-sm text-slate-400 hover:text-slate-200 mb-4 inline-block">&larr; Dashboard</a>
+ <h1 class="font-semibold text-xl mb-6">Docs</h1>
+ {{range .Categories}}
+ <div class="bg-gray-800 rounded-xl p-5 mb-4">
+ <h2 class="font-semibold text-base mb-3 capitalize text-slate-100">{{.Name}}</h2>
+ {{if .Entries}}
+ <ul class="space-y-1">
+ {{range .Entries}}
+ <li><a href="{{.URL}}" class="text-sm text-blue-400 hover:text-blue-300">{{.Name}}</a></li>
+ {{end}}
+ </ul>
+ {{else}}
+ <p class="text-sm text-slate-500">No files yet.</p>
+ {{end}}
+ </div>
+ {{end}}
+ </div>
+</body>
+</html>
diff --git a/web/templates/docs-view.html b/web/templates/docs-view.html
new file mode 100644
index 0000000..396e846
--- /dev/null
+++ b/web/templates/docs-view.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{{.Title}}</title>
+ <link rel="stylesheet" href="/static/css/output.css">
+ <style>
+ .markdown-body h1 { font-size: 1.5rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #f1f5f9; }
+ .markdown-body h2 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: #f1f5f9; }
+ .markdown-body h3 { font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: #e2e8f0; }
+ .markdown-body p { margin: 0.75rem 0; line-height: 1.6; }
+ .markdown-body ul, .markdown-body ol { margin: 0.5rem 0 0.75rem 1.5rem; }
+ .markdown-body li { margin: 0.25rem 0; line-height: 1.5; }
+ .markdown-body li > ul, .markdown-body li > ol { margin-top: 0.25rem; }
+ .markdown-body code { background: #1e293b; padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.85em; }
+ .markdown-body pre { background: #0f172a; border: 1px solid #1e293b; border-radius: 8px; padding: 1rem; overflow-x: auto; margin: 0.75rem 0; }
+ .markdown-body pre code { background: none; padding: 0; }
+ .markdown-body blockquote { border-left: 3px solid #334155; padding-left: 1rem; color: #94a3b8; margin: 0.75rem 0; }
+ .markdown-body a { color: #60a5fa; }
+ .markdown-body a:hover { color: #93c5fd; }
+ .markdown-body strong { color: #f1f5f9; }
+ .markdown-body hr { border-color: #1e293b; margin: 1.5rem 0; }
+ .markdown-body table { border-collapse: collapse; margin: 0.75rem 0; }
+ .markdown-body th, .markdown-body td { border: 1px solid #334155; padding: 0.4rem 0.75rem; }
+ </style>
+</head>
+<body class="min-h-screen bg-gray-900 text-slate-200 p-4">
+ <div class="max-w-3xl mx-auto pt-6 pb-12">
+ <a href="/docs" class="text-sm text-slate-400 hover:text-slate-200 mb-4 inline-block">&larr; Docs</a>
+ <div class="bg-gray-800 rounded-xl p-6 markdown-body">
+ {{.Body}}
+ </div>
+ </div>
+</body>
+</html>