mirror of
https://github.com/kbenestad/invoice.git
synced 2026-06-18 08:04:32 +00:00
Align kb-header with timesheet/reimburse design
- Always use kb-brand structure (remove app-wordmark fallback path) - Default brand: kbenestad.invoice / Invoice Generator when org-name and org-subheading are absent from config - Remove .app-wordmark CSS class - kb-footer max-width 980px to match kb-wrap https://claude.ai/code/session_01MkM7p8Us3L8YAfLKGA13NS
This commit is contained in:
parent
a9115d0355
commit
24909e6f45
1 changed files with 8 additions and 22 deletions
|
|
@ -157,7 +157,6 @@
|
|||
gap: 24px; padding-bottom: 20px; margin-bottom: 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
/* Full brand (org name visible) */
|
||||
.kb-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
|
||||
.kb-brand .logo {
|
||||
height: 46px; width: 46px; flex: 0 0 46px; border-radius: 10px;
|
||||
|
|
@ -165,15 +164,7 @@
|
|||
}
|
||||
.kb-brand .logo svg { width: 100%; height: 100%; display: block; }
|
||||
.kb-brand .org { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
|
||||
.kb-brand .org small { display: block; font-size: var(--fs-small); font-weight: 500; color: var(--text-muted); letter-spacing: 0; margin-top: 1px; }
|
||||
/* Minimal wordmark (no org) */
|
||||
.app-wordmark {
|
||||
display: inline-flex; align-items: center; gap: 8px;
|
||||
font: 700 var(--fs-h1)/1 var(--font-sans);
|
||||
color: var(--text); letter-spacing: -0.01em; user-select: none;
|
||||
}
|
||||
.app-wordmark svg { flex-shrink: 0; }
|
||||
/* Right: app name + meta */
|
||||
.kb-brand .org small { display: block; font-size: var(--fs-small); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
|
||||
.kb-doctitle { text-align: right; }
|
||||
.kb-doctitle h1 {
|
||||
margin: 0; font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.01em;
|
||||
|
|
@ -346,7 +337,7 @@
|
|||
|
||||
/* ── Footer ─────────────────────────────────────────────────────────────── */
|
||||
.kb-footer {
|
||||
max-width: 960px; margin: 0 auto; padding: 16px 20px 12px;
|
||||
max-width: 980px; margin: 0 auto; padding: 16px 20px 12px;
|
||||
font-size: var(--fs-small); color: var(--text-muted);
|
||||
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
|
||||
border-top: 1px solid var(--border);
|
||||
|
|
@ -623,19 +614,14 @@ const LOGO_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" ar
|
|||
</svg>`;
|
||||
|
||||
function buildHeader() {
|
||||
const orgName = cfg["org-name"];
|
||||
const orgSub = cfg["org-subheading"];
|
||||
const orgName = cfg["org-name"] || "kbenestad.invoice";
|
||||
const orgSub = cfg["org-subheading"] || "Invoice Generator";
|
||||
|
||||
// Left brand
|
||||
// Left brand — always kb-brand structure
|
||||
const brandEl = document.getElementById("hdr-brand");
|
||||
if (orgName) {
|
||||
brandEl.className = "kb-brand";
|
||||
brandEl.innerHTML = `<span class="logo">${LOGO_SVG}</span>
|
||||
<span class="org">${h(orgName)}${orgSub ? `<small>${h(orgSub)}</small>` : ""}</span>`;
|
||||
} else {
|
||||
brandEl.className = "app-wordmark";
|
||||
brandEl.innerHTML = LOGO_SVG + " invoice";
|
||||
}
|
||||
brandEl.className = "kb-brand";
|
||||
brandEl.innerHTML = `<span class="logo">${LOGO_SVG}</span>
|
||||
<span class="org">${h(orgName)}<small>${h(orgSub)}</small></span>`;
|
||||
|
||||
// Right: app name h1 (icon + lowercase app name)
|
||||
const titleEl = document.getElementById("inv-title");
|
||||
|
|
|
|||
Loading…
Reference in a new issue