|
| 1 | +{{define "admin_head"}} |
| 2 | +<meta charset="utf-8"> |
| 3 | +<meta name="viewport" content="width=device-width,initial-scale=1"> |
| 4 | +<link rel="stylesheet" href="/static/dzarlax.css"> |
| 5 | +<script src="/static/dzarlax.js" defer></script> |
| 6 | +<script src="/static/htmx.min.js" defer></script> |
| 7 | +<style> |
| 8 | + body { padding: 1.5rem 2rem; margin: 0; max-width: none; } |
| 9 | + h1 { margin-bottom: 1rem; } |
| 10 | + .admin-tabs { display: flex; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.1); } |
| 11 | + .admin-tabs__tab { padding: 0.5rem 1rem; color: var(--text-secondary, rgba(0,0,0,0.6)); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; } |
| 12 | + .admin-tabs__tab:hover { color: var(--text-primary, #000); } |
| 13 | + .admin-tabs__tab--active { color: var(--text-primary, #000); border-bottom-color: var(--accent, #3b82f6); font-weight: 600; } |
| 14 | + .admin-section { margin-bottom: 2rem; } |
| 15 | + .filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; } |
| 16 | + .filters label { display: inline-flex; gap: 0.25rem; align-items: center; } |
| 17 | + .model-id { font-family: var(--font-mono, monospace); font-size: 0.875rem; } |
| 18 | + .caps-badges .badge { margin-right: 0.25rem; } |
| 19 | + .assign-buttons { margin-top: 0.25rem; } |
| 20 | + .assign-buttons .btn { margin-right: 0.25rem; margin-bottom: 0.25rem; } |
| 21 | + .price-cell { white-space: nowrap; font-variant-numeric: tabular-nums; } |
| 22 | + .preset-banner { padding: 0.75rem 1rem; border-radius: var(--radius, 8px); background: var(--surface-2, #E8E6E3); margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; } |
| 23 | + .preset-banner .preset-meta { color: var(--text-secondary, rgba(0,0,0,0.6)); font-size: 0.875rem; margin-top: 0.25rem; } |
| 24 | + .preset-banner details { margin-top: 0.5rem; font-size: 0.85em; } |
| 25 | + .preset-banner details > summary { cursor: pointer; color: var(--text-secondary, rgba(0,0,0,0.6)); user-select: none; list-style: none; } |
| 26 | + .preset-banner details > summary::-webkit-details-marker { display: none; } |
| 27 | + .preset-banner details > summary::before { content: "▸ "; display: inline-block; transition: transform 0.15s; } |
| 28 | + .preset-banner details[open] > summary::before { content: "▾ "; } |
| 29 | + .preset-banner details .formula { margin-top: 0.5rem; padding: 0.5rem 0.75rem; background: rgba(0,0,0,0.04); border-left: 3px solid var(--accent, #888); border-radius: 4px; line-height: 1.45; font-size: 0.9em; } |
| 30 | + .preset-banner details .formula code { background: rgba(0,0,0,0.06); padding: 0 0.25rem; border-radius: 3px; } |
| 31 | + .suggest-btn { margin-left: 0.5rem; } |
| 32 | + .table-wrap { overflow-x: auto; } |
| 33 | + .table-wrap table { width: 100%; } |
| 34 | + .usage-toolbar { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; } |
| 35 | + .usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; } |
| 36 | + .usage-card { padding: 0.75rem 1rem; border-radius: var(--radius, 8px); background: var(--surface-2, #E8E6E3); } |
| 37 | + .usage-card__label { font-size: 0.8em; color: var(--text-secondary, rgba(0,0,0,0.6)); text-transform: uppercase; letter-spacing: 0.05em; } |
| 38 | + .usage-card__value { font-size: 1.5em; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 0.25rem; } |
| 39 | + .usage-card__sub { font-size: 0.8em; color: var(--text-secondary, rgba(0,0,0,0.6)); margin-top: 0.25rem; } |
| 40 | + .usage-chart-wrap { margin-bottom: 1.5rem; padding: 0.75rem; background: rgba(0,0,0,0.03); border-radius: var(--radius, 8px); } |
| 41 | + .usage-chart-title { font-size: 0.85em; margin-bottom: 0.5rem; color: var(--text-secondary, rgba(0,0,0,0.7)); } |
| 42 | + .usage-chart { width: 100%; height: auto; display: block; } |
| 43 | + .usage-chart-legend { font-size: 0.85em; display: flex; gap: 1.5rem; margin-top: 0.5rem; color: var(--text-secondary, rgba(0,0,0,0.7)); } |
| 44 | + .usage-chart-legend__swatch { display: inline-block; width: 10px; height: 10px; margin-right: 0.25rem; border-radius: 2px; vertical-align: middle; } |
| 45 | + .usage-section-h { font-size: 0.95em; margin-top: 1.5rem; margin-bottom: 0.5rem; font-weight: 600; } |
| 46 | + .usage-turns td { vertical-align: top; } |
| 47 | + .usage-turn__q { color: var(--text-primary, #000); margin-bottom: 0.25rem; font-size: 0.9em; } |
| 48 | + .usage-turn__a { color: var(--text-secondary, rgba(0,0,0,0.7)); font-size: 0.9em; } |
| 49 | +</style> |
| 50 | +{{end}} |
| 51 | + |
| 52 | +{{define "admin_tabs"}} |
| 53 | +<nav class="admin-tabs"> |
| 54 | + <a class="admin-tabs__tab {{if eq .ActiveTab "routing"}}admin-tabs__tab--active{{end}}" href="/">Routing & Models</a> |
| 55 | + <a class="admin-tabs__tab {{if eq .ActiveTab "analytics"}}admin-tabs__tab--active{{end}}" href="/analytics">Analytics</a> |
| 56 | +</nav> |
| 57 | +{{end}} |
0 commit comments