From 30fe67fd6ef94b2900c703dc7548f483a949e852 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 29 May 2026 15:13:38 +0000 Subject: [PATCH] Replace PDF preview overlay with direct download on Generate Clicking Generate now immediately triggers a PDF download instead of opening a full-screen overlay preview that was inaccessible on smaller screens. Removes the overlay HTML, its CSS, buildPreviewHTML(), and closeOverlay(). https://claude.ai/code/session_0127ywsQA7qWcX3tGX4itqN5 --- app/index.html | 216 +------------------------------------------------ 1 file changed, 2 insertions(+), 214 deletions(-) diff --git a/app/index.html b/app/index.html index 9ac8b25..d4b6760 100644 --- a/app/index.html +++ b/app/index.html @@ -196,106 +196,6 @@ } #btn-generate:hover { background: var(--accent-hover); } - /* ── Invoice overlay ────────────────────────────────────────────────────── */ - #overlay { - display: none; - position: fixed; inset: 0; - background: rgba(15,23,42,.65); - z-index: 900; - overflow-y: auto; - padding: 32px 16px 48px; - align-items: flex-start; - justify-content: center; - flex-direction: column; - } - #overlay.on { display: flex; } - - #overlay-actions { - display: flex; gap: 10px; - margin: 0 auto 16px; - width: 794px; max-width: 100%; - } - .btn-dl { - background: var(--success); color: var(--white); - padding: 10px 20px; font-size: 14px; font-weight: 600; - border-radius: var(--radius); - } - .btn-dl:hover { background: #166534; } - .btn-close { - background: var(--white); color: var(--text); - padding: 10px 20px; font-size: 14px; - border: 1px solid var(--border); border-radius: var(--radius); - } - .btn-close:hover { background: var(--bg); } - - /* ── Invoice preview (screen only) ──────────────────────────────────────── */ - #inv-doc { - background: var(--white); - width: 794px; max-width: 100%; min-height: 1100px; - padding: 52px 60px 60px; - box-shadow: 0 4px 24px rgba(0,0,0,.25); - margin: 0 auto; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, - "Helvetica Neue", Arial, sans-serif; - font-size: 11.5px; color: #111827; - } - - /* 2×2 invoice header grid */ - .d-4hdr { - display: grid; grid-template-columns: 1fr 1fr; - border-bottom: 3px solid var(--navy); - margin-bottom: 22px; - } - .d-4hdr > div { padding: 0; } - .d-4hdr > .d-tl { padding: 0 20px 16px 0; border-bottom: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; } - .d-4hdr > .d-tr { padding: 0 0 16px 20px; border-bottom: 1px solid #e5e7eb; } - .d-4hdr > .d-bl { padding: 16px 20px 16px 0; border-right: 1px solid #e5e7eb; } - .d-4hdr > .d-br { padding: 16px 0 16px 20px; } - - .d-sender .name { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; } - .d-sender p { font-size: 10.5px; color: #4b5563; margin-bottom: 2px; } - - .d-pay-hdr .ph-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: #6b7280; margin-bottom: 6px; } - .d-pay-hdr .ph-terms { font-size: 10.5px; color: #4b5563; margin-bottom: 6px; } - .d-pay-hdr .ph-grid { display: grid; grid-template-columns: 130px 1fr; gap: 3px 8px; font-size: 10.5px; margin-top: 6px; } - .d-pay-hdr .ph-grid .pl { color: #6b7280; } - .d-pay-hdr .ph-grid .pv { font-weight: 500; word-break: break-all; } - .d-pay-hdr .ph-ref { margin-top: 6px; font-size: 10.5px; color: #4b5563; } - .d-pay-hdr .ph-ref strong { color: #111827; } - - .d-bill .bt-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: #6b7280; margin-bottom: 5px; } - .d-bill .bt-name { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 3px; } - .d-bill p { font-size: 10.5px; color: #4b5563; margin-bottom: 2px; } - .bt-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; } - .bt-meta span { font-size: 10px; color: #4b5563; } - .bt-meta strong { color: #111827; } - - .d-inv-meta { text-align: right; } - .d-inv-meta h1 { font-size: 28px; font-weight: 800; letter-spacing: 5px; color: var(--navy); margin-bottom: 14px; } - .d-meta { border-collapse: collapse; margin-left: auto; } - .d-meta td { font-size: 10.5px; padding: 2px 0 2px 12px; } - .d-meta .ml { color: #6b7280; text-align: right; } - .d-meta .mv { font-weight: 600; text-align: right; } - - .d-lines { width: 100%; border-collapse: collapse; margin-bottom: 20px; } - .d-lines thead tr { background: var(--navy); color: white; } - .d-lines thead th { padding: 7px 10px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; text-align: left; } - .d-lines thead th.r { text-align: right; } - .d-lines tbody tr { border-bottom: 1px solid #e5e7eb; } - .d-lines tbody tr:nth-child(even) { background: #f9fafb; } - .d-lines tbody td { padding: 7px 10px; font-size: 10.5px; vertical-align: top; } - .d-lines tbody td.r { text-align: right; } - .d-lines tbody td.b { font-weight: 600; } - .d-fx-note { font-size: 9.5px; color: #6b7280; margin-top: 3px; } - - .d-tots { width: 100%; border-collapse: collapse; } - .d-tots td { padding: 5px 10px; font-size: 11.5px; } - .d-tots .sp { width: 55%; } - .d-tots .tl { text-align: right; color: #6b7280; padding-right: 20px; } - .d-tots .tv { text-align: right; width: 130px; font-weight: 600; } - .d-tots .sub td { border-top: 1px solid #e5e7eb; } - .d-tots .fin td { background: var(--navy); color: white; font-size: 14px; font-weight: 700; border-top: 2px solid var(--navy); } - .d-tots .fin .tl { color: rgba(255,255,255,.75); } /* ── Payment card form fields ────────────────────────────────────────────── */ .pay-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--navy); margin-bottom: 10px; } @@ -348,14 +248,6 @@ - -
-
- - -
-
-