diff --git a/src/manage_packing_list_items.php b/src/manage_packing_list_items.php index 0829925..76d50c0 100644 --- a/src/manage_packing_list_items.php +++ b/src/manage_packing_list_items.php @@ -38,8 +38,8 @@ if ($is_owner || $is_in_same_household) { $can_edit = true; } if (!$can_edit) { die("Zugriff verweigert."); } $phase = isset($_GET['phase']) ? intval($_GET['phase']) : 0; -$col_class_lager = ($phase == 1) ? 'col-lg-6' : (($phase == 2) ? 'd-none' : 'col-lg-4'); -$col_class_table = ($phase == 1 || $phase == 2) ? 'col-lg-6' : 'col-lg-4'; +$col_class_lager = ($phase == 1) ? 'col-phase1-lager' : (($phase == 2) ? 'd-none' : 'col-lg-4'); +$col_class_table = ($phase == 1) ? 'col-phase1-table' : (($phase == 2) ? 'col-lg-6' : 'col-lg-4'); $col_class_rucksack = ($phase == 2) ? 'col-lg-6' : (($phase == 1) ? 'd-none' : 'col-lg-4'); $phase_title_suffix = ($phase == 1) ? " - Auswahl (Lager)" : (($phase == 2) ? " - Packen (Rucksack)" : ""); @@ -151,41 +151,65 @@ $conn->close(); /* Lager Grid */ .lager-grid { display: grid; - grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; padding: 5px; - align-items: start; /* Prevents cards from stretching vertically */ + align-items: start; } .lager-card { border: 1px solid #eee; border-radius: 8px; padding: 6px; text-align: center; background: #fff; display: flex; flex-direction: column; transition: transform 0.1s, box-shadow 0.1s; + height: 200px; } .lager-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.05); } .lager-img-wrapper { - width: 100%; height: 120px; margin-bottom: 6px; display: flex; + width: 100%; height: 90px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; + flex-shrink: 0; } .lager-img-wrapper img.lager-card-img { width: 100% !important; height: 100% !important; - max-width: 100% !important; max-height: 120px !important; + max-width: 100% !important; max-height: 90px !important; object-fit: contain !important; border-radius: 4px; } .lager-title { - font-size: 0.85em; font-weight: 600; margin-bottom: 4px; - line-height: 1.1; word-wrap: break-word; + font-size: 0.85em; font-weight: 600; margin-bottom: 2px; + line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + flex-shrink: 0; + } + .lager-meta { + font-size: 0.7em; color: #6c757d; margin-bottom: 4px; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + line-height: 1.1; flex-shrink: 0; } .lager-controls { - display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 4px; + display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: auto; } .table-status-text { font-size: 0.75em; color: #2e7d32; font-weight: 600; - min-height: 14px; margin-top: 2px; visibility: hidden; line-height: 1; + min-height: 12px; margin-top: 2px; visibility: hidden; line-height: 1; } .table-status-text.visible { visibility: visible; } .editor-pane { display: flex; flex-direction: column; height: 100%; } .pane-content { flex-grow: 1; overflow-y: auto; padding: 10px; } + /* Layout Phase 1 Split */ + .col-phase1-lager { width: calc(66.666% - 5px); flex: 0 0 auto; } + .col-phase1-table { width: calc(33.333% - 5px); flex: 0 0 auto; } + .resizer { + width: 10px; + cursor: col-resize; + background-color: transparent; + transition: background-color 0.2s; + border-radius: 4px; + z-index: 10; + flex: 0 0 auto; + } + .resizer:hover, .resizer.resizing { + background-color: rgba(0,0,0,0.1); + } + /* Remove empty dropzone on the table specifically */ #table-container > .packed-item-container > .nested-sortable:empty { min-height: 0; @@ -218,9 +242,9 @@ $conn->close(); -