From 45c0c0047f75480cd674c6277a3200b488478331 Mon Sep 17 00:00:00 2001 From: Kerim Atilgan Date: Fri, 15 May 2026 18:13:50 +0200 Subject: [PATCH] Stitch-styled PDF viewer + .icon-btn helper for modal icon buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Anzeigen / Download / Löschen icons inside the documents modal and the close X of every modal sit outside , so the previous "table button" reset didn't reach them — the global blue button styling shone through. - Introduce a generic `.icon-btn` class that mirrors the table reset (transparent background, no padding, inherit colour). The reset rule is now `table button, .icon-btn`. - Tag the documents modal close button and the view/download/delete buttons inside each document card with `icon-btn`. Tailwind classes (`text-outline hover:text-primary` etc.) still win for colour. - Rebuild the PDF viewer modal in Stitch style: clean white card, light header with picture_as_pdf glyph + title, body on a soft grey surface, footer with chevron navigation buttons and zoom icons. Toggle hidden/flex instead of the legacy `.show` class. Removed the matching .pdf-viewer-* / .pdf-nav-btn / .pdf-zoom-btn CSS that no longer applies. Co-Authored-By: Claude Opus 4.7 (1M context) --- public/index.html | 199 +++++++++++----------------------------------- public/script.js | 14 ++-- 2 files changed, 56 insertions(+), 157 deletions(-) diff --git a/public/index.html b/public/index.html index 4e80ea5..c9d0f09 100644 --- a/public/index.html +++ b/public/index.html @@ -156,11 +156,13 @@ box-shadow: inset 0 -2px 0 0 #b4c5ff; } - /* Buttons inside data tables are icon-only by default in the new - Stitch style. The legacy `button { background, padding, color }` - rules would otherwise turn them into solid blue blobs — class- - level Tailwind utilities still win for explicit backgrounds. */ - table button { + /* Reset for icon-only buttons (table actions, modal close, + pdf zoom). The legacy global `button { background, padding, + color }` would otherwise turn them into solid blue blobs. + Tailwind utilities like `bg-primary` still win since they + share class specificity but come later in the cascade. */ + table button, + .icon-btn { background: transparent; color: inherit; padding: 0; @@ -650,141 +652,15 @@ } /* PDF Viewer Styles */ - .pdf-viewer-modal { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.8); - z-index: 3000; - animation: fadeIn 0.3s ease; - } - - .pdf-viewer-modal.show { - display: flex; - align-items: center; - justify-content: center; - } - - .pdf-viewer-content { - background: white; - border-radius: 12px; - width: 90%; - height: 90%; - max-width: 1200px; - max-height: 800px; - overflow: hidden; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); - animation: slideIn 0.3s ease; - display: flex; - flex-direction: column; - } - - .pdf-viewer-header { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: white; - padding: 15px 20px; - display: flex; - justify-content: space-between; - align-items: center; - } - - .pdf-viewer-title { - font-size: 18px; - font-weight: 600; - margin: 0; - } - - .pdf-viewer-close { - background: none; - border: none; - color: white; - font-size: 24px; - cursor: pointer; - width: 30px; - height: 30px; - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - transition: background 0.3s ease; - } - - .pdf-viewer-close:hover { - background: rgba(255, 255, 255, 0.2); - } - - .pdf-viewer-body { - flex: 1; - overflow: auto; - padding: 20px; - background: #f5f5f5; - } - + /* PDF viewer modal now styled with Tailwind in the markup. + Only keep the canvas container neutral so the PDF page stands + out against the body background. */ .pdf-canvas-container { text-align: center; background: white; border-radius: 8px; - padding: 20px; - box-shadow: 0 2px 10px rgba(0,0,0,0.1); - } - - .pdf-controls { - background: white; - padding: 15px; - border-top: 1px solid #ddd; - display: flex; - justify-content: center; - align-items: center; - gap: 15px; - } - - .pdf-nav-btn { - background: #3498db; - color: white; - border: none; - padding: 8px 16px; - border-radius: 6px; - cursor: pointer; - font-size: 14px; - transition: background 0.3s ease; - } - - .pdf-nav-btn:hover { - background: #2980b9; - } - - .pdf-nav-btn:disabled { - background: #bdc3c7; - cursor: not-allowed; - } - - .pdf-page-info { - font-size: 14px; - color: #2c3e50; - font-weight: 500; - } - - .pdf-zoom-controls { - display: flex; - align-items: center; - gap: 10px; - } - - .pdf-zoom-btn { - background: #27ae60; - color: white; - border: none; - padding: 6px 12px; - border-radius: 4px; - cursor: pointer; - font-size: 12px; - } - - .pdf-zoom-btn:hover { - background: #219a52; + padding: 16px; + box-shadow: 0 2px 8px rgba(0,0,0,0.08); } /* Enhanced Tarifoptionen Styling */ @@ -1862,7 +1738,7 @@ description

Dokumente

- @@ -1883,27 +1759,46 @@ -
-
-
-

📋 PDF Viewer

- +