diff --git a/Web/templates/library_table.html b/Web/templates/library_table.html index 4743d4c..6015169 100644 --- a/Web/templates/library_table.html +++ b/Web/templates/library_table.html @@ -8,9 +8,9 @@ 1. Modals & Overlays ========================================= */ .modal { - display: none; /* Managed by JS (none/flex) */ + display: none; position: fixed; - inset: 0; /* Modern shorthand for top: 0, right: 0, bottom: 0, left: 0 */ + inset: 0; z-index: 1000; background-color: rgba(0, 0, 0, 0.6); align-items: center; @@ -23,7 +23,7 @@ display: flex; flex-direction: column; width: 100%; - max-width: 900px; /* Consolidated from conflicting 600px/900px rules */ + max-width: 900px; max-height: 90vh; background-color: var(--ui-surface, #fff); border-radius: 8px; @@ -419,31 +419,136 @@ } /* ========================================= - 7. Mobile Responsiveness + 7. Mobile Responsiveness (Updated for Cards) ========================================= */ @media (max-width: 768px) { .library-table-container { padding: 10px; } .library-search-bar { flex-direction: column; } .library-search-input { width: 100%; } - .library-items-table { font-size: 0.85em; } + + /* Enlarge touch targets */ + .library-search-input, + .library-scan-controls select, + .library-scan-controls input, + .library-filter-toggle-btn, + .filter-item input, + .filter-item select, + .button { + min-height: 44px; + } + /* Stack Scan & Controls */ + .library-scan-controls { + display: flex; + flex-direction: column; + align-items: stretch; + gap: 12px; + } + .library-scan-controls > * { + width: 100% !important; + margin-left: 0 !important; + } + + .filter-row { + grid-template-columns: 1fr; + } + + .filter-buttons { + flex-direction: column; + align-items: stretch; + } + + .filter-buttons .button { + width: 100%; + justify-content: center; + margin-bottom: 8px; + } + + .filter-buttons > div[style*="flex-grow"] { + display: none; + } + + /* Convert Table to Cards */ + .library-items-table, + .library-items-table thead, + .library-items-table tbody, .library-items-table th, + .library-items-table td, + .library-items-table tr { + display: block; + width: 100%; + } + + .library-items-table thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + + .library-items-table tr { + margin-bottom: 16px; + border: 1px solid var(--ui-border, #ddd); + border-radius: 12px; + background: #fff; + box-shadow: 0 4px 6px rgba(0,0,0,0.05); + overflow: hidden; + } + .library-items-table td { - padding: 8px 10px; + position: relative; + padding: 12px 16px 12px 35% !important; + text-align: right; + border-bottom: 1px solid #f4f4f4; + font-size: 0.95em; + min-height: auto; + display: flex; + justify-content: flex-end; + align-items: center; + } + + .library-items-table td::before { + content: attr(data-label); + position: absolute; + left: 16px; + width: 30%; + text-align: left; + font-weight: 600; + color: #555; + white-space: nowrap; + } + + /* Styles specific for the Actions cell */ + .library-items-table td:last-child { + border-bottom: none; + padding: 16px !important; + background: #f8fafc; + display: flex; + flex-direction: column; + gap: 10px; + align-items: stretch; + } + + .library-items-table td:last-child::before { + display: none; + } + + .table-actions { + flex-direction: column; + width: 100%; + gap: 10px; } .table-actions .button { - padding: 4px 8px; - font-size: 0.75em; - } - - .filter-row, - .library-scan-controls { - grid-template-columns: 1fr; + width: 100%; + margin: 0 !important; + padding: 12px; + font-size: 1em; + justify-content: center; } .library-scan-reader-wrap { max-width: 100%; } } + .library-scan-reader-wrap { display: none; margin-top: 15px; @@ -534,13 +639,12 @@
Bücher, CDs, DVDs und weitere Medien