diff --git a/AGENTS.md b/AGENTS.md index a1145cc..db85725 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,6 +48,9 @@ glimmer/ │ │ └── style.css # Custom Solis-style design system (amber/cream, Outfit font) │ ├── favicon.ico │ ├── favicon.png + │ ├── js/ # Per-page scripts (CSP blocks inline JS) + │ │ ├── base.js # QR modal, data-confirm forms, glimmerCopy + │ │ └── *.js # One file per template that needs behaviour │ └── upload.js # Shared client-side upload helper (window.GlimmerUpload) └── templates/ ├── base.html # Layout wrapper: sidebar (logged in) or public header @@ -89,8 +92,10 @@ All templates receive a `pageData` struct. Add new fields there when templates n ### Templates are embedded, not on disk Templates and static files are embedded into the binary via `//go:embed` in `templates.go`. Changes to templates are compiled in; they are **not** reloaded at runtime. Always rebuild after template changes. -### No JS frameworks -All JavaScript is vanilla ES5-style (`var`, not `const`/`let`). Most JS is inline in templates; shared upload logic lives in `static/upload.js` and is exposed as `window.GlimmerUpload`. No build step, no npm, no bundler. +### No JS frameworks — and no inline JS +All JavaScript is vanilla ES5-style (`var`, not `const`/`let`). No build step, no npm, no bundler. + +The CSP is `script-src 'self'`, so **inline ` + {{end}} diff --git a/internal/server/templates/admin_bin.html b/internal/server/templates/admin_bin.html index c5a437e..ab28a2e 100644 --- a/internal/server/templates/admin_bin.html +++ b/internal/server/templates/admin_bin.html @@ -46,10 +46,10 @@
- + {{end}} diff --git a/internal/server/templates/admin_bin_edit.html b/internal/server/templates/admin_bin_edit.html index ca9cbda..12fd4a3 100644 --- a/internal/server/templates/admin_bin_edit.html +++ b/internal/server/templates/admin_bin_edit.html @@ -63,7 +63,7 @@{{len .Uploads}} file{{if ne (len .Uploads) 1}}s{{end}} stored locally.