Files
Glimmer/internal/server/templates/bin_view.html
T
lucio 9e10bc3031 Redesign UI to match Solis design system
Replace Pico CSS with a custom Solis-style design system — warm amber
on cream, Outfit font, 260px sidebar (logged in) or sticky public
header (logged out), soft amber-tinted shadows, cubic-bezier spring
animations on toasts and modals.

- Add static/css/style.css with the full design token system
- Add base.html + content-block pattern; each page defines its own
  {{define "content"}} and base.html provides the chrome
- pageData gains ActiveNav; adminPage(w, r, nav) sets it; handlers
  pass the right value for every admin route
- Standalone pages (login, 404, embed) render without base.html
- Templates use Solis-style data-table, card, stats-bar, tag-pill,
  alert, btn components
- Remove vendored Pico CSS (83KB) and the old style.css (12KB)
- Update AGENTS.md and CLAUDE.md to reflect the new design system

Bug fixes during the redesign:
- Preview dialog now only shows when [open] (UA default was being
  overridden by display:flex)
- Preview dialog centered via explicit top/left/transform — the
  browser's default margin:auto centering fights with display:flex
  on <dialog>
- Add ?embed=1 route that renders paste content without base.html
  chrome, so the admin paste preview iframe shows only the body

Tested: go build ./... clean, go vet ./... clean, binary boots.
2026-06-06 14:15:19 -07:00

52 lines
1.7 KiB
HTML

{{define "title"}}{{if .Paste}}{{with .Paste}}{{if .Title}}{{.Title}}{{else}}{{.Name}}{{end}}{{end}}{{else}}Paste{{end}} — Glimmer{{end}}
{{define "content"}}
{{with .Paste}}
<div style="max-width: 900px; margin: 0 auto;">
<div class="paste-header">
<div>
<h2>{{if .Title}}{{.Title}}{{else}}{{.Name}}{{end}}</h2>
<div class="paste-meta">
<code>/bin/{{.Name}}</code>
<span class="tag-pill badge-format">{{.Format}}</span>
{{if .Token}}
<span class="tag-pill badge-token">🔒 token protected</span>
{{else}}
<span class="tag-pill badge-public">public</span>
{{end}}
<span class="text-muted">updated {{.UpdatedAt.Format "2006-01-02 15:04"}}</span>
</div>
</div>
<div class="paste-toolbar">
<a href="?raw=1" class="btn btn-secondary btn-sm">Raw</a>
<button class="btn btn-primary btn-sm" onclick="copyPaste(this)">Copy</button>
</div>
</div>
<div class="card" style="padding: 2rem;">
<div class="paste-body">
{{$.PasteBody}}
</div>
</div>
<pre id="paste-raw" style="display:none">{{.Content}}</pre>
</div>
<script>
function copyPaste(btn) {
var orig = btn.textContent;
navigator.clipboard.writeText(document.getElementById('paste-raw').innerText).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = orig; }, 1500);
});
}
</script>
{{else}}
<div class="card center-page">
<h2>Paste not found</h2>
<p class="text-muted">This paste may have been deleted or is hidden.</p>
</div>
{{end}}
{{end}}