diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-06-12 13:57:11 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-06-12 13:57:11 +0000 |
| commit | b9a3ce6942e917c8e5046d652b7742cfe5f960ec (patch) | |
| tree | 2d57c8205f085a16c3ea86d5339f4dbcae028a4d /public/css | |
| parent | a942b4e83d8c3c71020fdc6ae93954ddfa2ea338 (diff) | |
Add bulk photo selection panel to person page (admin)
On /people/:slug, admins see a sticky left panel and selectable photo
tiles. Clicking a tile (or its checkbox overlay) toggles selection;
clicking without modifier still opens the photo in a new tab. The panel
shows the selection count and two actions:
- Reassign to person: moves the selected photos' face entries from the
current person's cluster to the chosen person.
- Move to album: moves the photo files on disk and updates album.json,
faces.json, and people.json rel paths accordingly. Album paths are
offered via a datalist autocomplete.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'public/css')
| -rw-r--r-- | public/css/style.css | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/public/css/style.css b/public/css/style.css index f522bff..93345ad 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -548,6 +548,52 @@ tr.delete-marked td { background: rgba(192,57,43,.08); } .person-name { padding: 7px 10px 2px; font-size: .9rem; font-weight: 500; color: var(--text); } .person-count { padding: 0 10px 8px; font-size: .75rem; color: var(--text-dim); } +/* ── Person page bulk selection ────────────────────────────────────────── */ +.person-page-wrap { display: flex; align-items: flex-start; gap: 0; } +.bulk-panel { + width: 220px; flex-shrink: 0; position: sticky; top: 16px; + background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); + padding: 14px 16px; margin-right: 20px; +} +.bulk-panel-title { font-size: .95rem; font-weight: 600; margin: 0 0 8px; } +.bulk-panel-hint { font-size: .82rem; color: var(--text-dim); margin: 0; } +.bulk-selected-count { font-size: .9rem; margin: 0; } +.bulk-sep { border: none; border-top: 1px solid var(--border); margin: 12px 0; } +.bulk-label { display: block; font-size: .8rem; color: var(--text-dim); margin-bottom: 4px; } +.bulk-select, .bulk-input { + width: 100%; background: var(--bg3); border: 1px solid var(--border); + border-radius: var(--radius); color: var(--text); padding: 5px 8px; + font-size: .82rem; margin-bottom: 8px; box-sizing: border-box; +} +.bulk-select:focus, .bulk-input:focus { border-color: var(--accent); outline: none; } +.bulk-action-btn { width: 100%; text-align: center; } +.person-page-main { flex: 1; min-width: 0; } + +/* Selectable photo cards */ +.selectable-card { cursor: pointer; position: relative; } +.selectable-card .thumb-wrap { position: relative; } +.select-checkbox { + position: absolute; top: 6px; left: 6px; + width: 20px; height: 20px; border-radius: 4px; + border: 2px solid rgba(255,255,255,.7); + background: rgba(0,0,0,.35); + display: flex; align-items: center; justify-content: center; + opacity: 0; transition: opacity .12s; + pointer-events: none; +} +.selectable-card:hover .select-checkbox { opacity: 1; } +.selectable-card.selected .select-checkbox { + opacity: 1; background: var(--accent); border-color: var(--accent); +} +.selectable-card.selected .select-checkbox::after { + content: ''; display: block; + width: 5px; height: 9px; + border: 2px solid #fff; border-top: none; border-left: none; + transform: rotate(45deg) translate(-1px, -1px); +} +.selectable-card.selected .thumb-wrap img { opacity: .75; } +.selectable-card.selected { outline: 2px solid var(--accent); outline-offset: -2px; } + /* ── Admin upload ──────────────────────────────────────────────────────── */ .admin-upload { margin-top: 32px; } .admin-upload h2 { font-size: 1rem; color: var(--text-dim); margin-bottom: 6px; } |
