mavweb: ui design system refresh — shared nav, cards, component classes
- Rewrote ui.css with design tokens, card/btn/badge/dot components - All pages wrapped in <main class=page> with max-width container - Replaced inline <style> blocks with ui.css classes - passkey page now uses shared nav.site template - PWA voice page unified under shared nav.site (no more separate tab nav) - Inline lang toggle moved from nav to voice page body
This commit is contained in:
+13
-6
@@ -371,12 +371,13 @@ const toolsHTML = `<!doctype html><meta charset=utf-8>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1">
|
||||
<title>maven · tools</title>
|
||||
<link rel=stylesheet href=/ui.css>
|
||||
<style>input[type=text]{width:20rem}</style>
|
||||
{{template "nav" "tools"}}
|
||||
<main class=page>
|
||||
<h1>tools</h1>
|
||||
<p class=muted>enabling requires step-up — <a href=/auth/passkey>assert a passkey</a> first.</p>
|
||||
{{if .Msg}}<div class="msg msg-ok">{{.Msg}}</div>{{end}}
|
||||
<h2>proposed <small>({{len .Proposed}})</small></h2>
|
||||
<section class=card>
|
||||
<h2 class=card-title>proposed <span class=badge>{{len .Proposed}}</span></h2>
|
||||
{{if .Proposed}}<p class=muted>maven drafted these from acts she couldn't run. Fill the command (argv, space-separated) and enable.</p>
|
||||
<div class=scroll><table><tr><th>name</th><th>scope</th><th>from utterance</th><th>enable as</th></tr>
|
||||
{{range .Proposed}}<tr>
|
||||
@@ -385,12 +386,14 @@ const toolsHTML = `<!doctype html><meta charset=utf-8>
|
||||
<input type=hidden name=name value="{{.Name}}">
|
||||
<input type=hidden name=scope value="{{.Scope}}">
|
||||
<input type=hidden name=action value=enable>
|
||||
<input type=text name=cmd placeholder="systemctl restart" required>
|
||||
<input type=text name=cmd class=input-wide placeholder="systemctl restart" required>
|
||||
<label><input type=checkbox name=destructive> destructive</label>
|
||||
<button>enable</button></form></td>
|
||||
<button class=btn>enable</button></form></td>
|
||||
</tr>{{end}}</table></div>
|
||||
{{else}}<p class=muted>none pending.</p>{{end}}
|
||||
<h2>enabled <small>({{len .Enabled}})</small></h2>
|
||||
</section>
|
||||
<section class=card>
|
||||
<h2 class=card-title>enabled <span class=badge>{{len .Enabled}}</span></h2>
|
||||
{{if .Enabled}}<div class=scroll><table><tr><th>name</th><th>scope</th><th>command</th><th></th><th></th></tr>
|
||||
{{range .Enabled}}<tr><td><code>{{.Name}}</code></td><td><span class=badge>{{.Scope}}</span></td><td><code>{{join .Cmd " "}}</code></td>
|
||||
<td>{{if .Destructive}}<span class=red>destructive</span>{{end}}</td>
|
||||
@@ -398,14 +401,18 @@ const toolsHTML = `<!doctype html><meta charset=utf-8>
|
||||
<input type=hidden name=name value="{{.Name}}">
|
||||
<input type=hidden name=scope value="{{.Scope}}">
|
||||
<input type=hidden name=action value=disable>
|
||||
<button>disable</button></form></td></tr>{{end}}</table></div>
|
||||
<button class=btn>disable</button></form></td></tr>{{end}}</table></div>
|
||||
{{else}}<p class=muted>none enabled.</p>{{end}}
|
||||
</section>
|
||||
</main>
|
||||
`
|
||||
|
||||
var historyTmpl = template.Must(template.New("history").Parse(navHTML + historyHTML))
|
||||
|
||||
var notificationsTmpl = template.Must(template.New("notifications").Parse(navHTML + notificationsHTML))
|
||||
|
||||
var passkeyTmpl = template.Must(template.New("passkey").Parse(navHTML + passkeyPageHTML))
|
||||
|
||||
var traceTmpl = template.Must(template.New("trace").Funcs(template.FuncMap{
|
||||
"ago": func(t time.Time) string {
|
||||
if t.IsZero() {
|
||||
|
||||
Reference in New Issue
Block a user