Skip to content

Commit 12bff37

Browse files
authored
Add row-detail modal styling; drop obsolete expand/collapse-all bar and per-row toggle CSS
1 parent d1fda1c commit 12bff37

1 file changed

Lines changed: 112 additions & 107 deletions

File tree

css/jaraidFilterSort.css

Lines changed: 112 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -20,55 +20,6 @@
2020
font-size: 14px;
2121
}
2222

23-
/* Expand/Collapse-all controls: a separate, prominent bar placed
24-
* between the page nav menu and the filter/search panel
25-
* (#jaraidToolbar), rather than buried among the filter fields.
26-
*/
27-
#jaraidRowControls {
28-
display: flex;
29-
flex-wrap: wrap;
30-
gap: 10px;
31-
margin: 18px 0 0 0;
32-
}
33-
34-
#jaraidRowControls .jaraid-btn-prominent {
35-
display: inline-flex;
36-
align-items: center;
37-
gap: 8px;
38-
padding: 10px 18px;
39-
border: none;
40-
border-radius: 6px;
41-
background: #333;
42-
color: #fff;
43-
cursor: pointer;
44-
font-family: Georgia, serif;
45-
font-size: 15px;
46-
font-weight: bold;
47-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
48-
}
49-
50-
#jaraidRowControls .jaraid-btn-prominent:hover {
51-
background: #555;
52-
}
53-
54-
#jaraidRowControls .jaraid-btn-prominent:focus {
55-
outline: 2px solid #6ab0f3;
56-
outline-offset: 2px;
57-
}
58-
59-
#jaraidRowControls .jaraid-btn-icon {
60-
display: inline-flex;
61-
align-items: center;
62-
justify-content: center;
63-
width: 18px;
64-
height: 18px;
65-
border-radius: 3px;
66-
background: rgba(255, 255, 255, 0.18);
67-
font-family: monospace;
68-
font-size: 13px;
69-
line-height: 1;
70-
}
71-
7223
#jaraidToolbar .jaraid-row {
7324
display: flex;
7425
flex-wrap: wrap;
@@ -212,37 +163,40 @@
212163
background: #e2e2e2;
213164
}
214165

215-
/* Per-row expand/collapse toggle (title/place/date shown by default;
216-
click to reveal owners, comments, source and holdings for that
217-
entry). Placed at the very start of the Year cell. */
218-
.jaraid-row-toggle {
166+
/* Small "view details" button at the start of each row's Year cell --
167+
opens the modal for that entry. The row itself is also clickable (see
168+
jaraidFilterSort.js), but this button gives keyboard/screen-reader
169+
users an explicit, focusable target. */
170+
.jaraid-row-view-btn {
219171
display: inline-flex;
220172
align-items: center;
221173
justify-content: center;
222-
width: 16px;
223-
height: 16px;
174+
width: 18px;
175+
height: 18px;
224176
margin-right: 6px;
225177
border: 1px solid #999;
226178
border-radius: 3px;
227179
background: #fafafa;
228180
color: #333;
229-
font-family: monospace;
230-
font-size: 12px;
181+
font-size: 13px;
231182
line-height: 1;
232183
cursor: pointer;
233-
user-select: none;
234184
vertical-align: middle;
235185
}
236186

237-
.jaraid-row-toggle:hover {
187+
.jaraid-row-view-btn:hover {
238188
background: #e8e8e8;
239189
}
240190

241-
.jaraid-row-toggle:focus {
191+
.jaraid-row-view-btn:focus {
242192
outline: 2px solid #6ab0f3;
243193
outline-offset: 1px;
244194
}
245195

196+
tr[role="data"] {
197+
cursor: pointer;
198+
}
199+
246200
#jaraidToolbar .jaraid-status {
247201
font-size: 12px;
248202
color: #444;
@@ -294,23 +248,13 @@ tr[role="label"] td.jaraid-sort-desc::after {
294248
-webkit-overflow-scrolling: touch;
295249
}
296250

297-
/* ---- Compact chronological summary/detail layout ----
298-
* Previously each row's day/month, owners, comments, source and
299-
* holdings cells were toggled display:none/table-cell while the
300-
* header row kept showing all 9 column titles regardless -- since a
301-
* single <table> can't have a header aligned to a column only some
302-
* rows populate, the header ended up claiming a wide strip of columns
303-
* with nothing underneath them, and every row's "collapsed" state
304-
* looked like a table with random gaps.
305-
*
306-
* Instead, both the header row and each data row now lay out as a
307-
* flexbox line rather than rigid table columns. The header only shows
308-
* labels for the fields that stay visible when collapsed (year,
309-
* last-issue date, title, place); the detail fields (day/month,
310-
* owners, comments, source, holdings) have no header cell at all --
311-
* jaraidFilterSort.js gives each of them its own inline label instead
312-
* (reusing that column's original header text) -- and they wrap onto
313-
* their own line below the summary only once a row is expanded.
251+
/* ---- Compact chronological summary line ----
252+
* Each row (and the header above it) lays out as a flexbox line rather
253+
* than rigid table columns, showing only year / last-issue date / title
254+
* / place at a glance. Day/month, owners, comments, source and holdings
255+
* have no header cell and are never rendered in the row at all -- click
256+
* the row (or its small view-details button) to see them, along with
257+
* everything else, in the modal below.
314258
*/
315259
tr[role="label"] {
316260
display: flex;
@@ -328,15 +272,6 @@ tr[role="label"] td {
328272
padding: 0 !important;
329273
}
330274

331-
/* No header cell for the detail-only fields -- see note above. */
332-
tr[role="label"] td[n="2"],
333-
tr[role="label"] td[n="6"],
334-
tr[role="label"] td[n="7"],
335-
tr[role="label"] td[n="8"],
336-
tr[role="label"] td[n="9"] {
337-
display: none !important;
338-
}
339-
340275
tr[role="data"] {
341276
display: flex;
342277
flex-wrap: wrap;
@@ -352,36 +287,103 @@ tr[role="data"] td {
352287
padding: 0 !important;
353288
}
354289

355-
/* Detail fields: full-width so each wraps onto its own line below the
356-
summary line, only visible once a row is expanded. */
290+
tr[role="label"] td[n="2"],
291+
tr[role="label"] td[n="6"],
292+
tr[role="label"] td[n="7"],
293+
tr[role="label"] td[n="8"],
294+
tr[role="label"] td[n="9"],
357295
tr[role="data"] td[n="2"],
358296
tr[role="data"] td[n="6"],
359297
tr[role="data"] td[n="7"],
360298
tr[role="data"] td[n="8"],
361299
tr[role="data"] td[n="9"] {
362-
flex-basis: 100%;
363-
margin-top: 4px;
364-
padding-top: 6px !important;
365-
border-top: 1px dashed #ccc;
366-
font-size: 0.95em;
367-
color: #333;
300+
display: none !important;
301+
}
302+
303+
/* ---- Row detail modal ---- */
304+
.jaraid-modal-overlay {
305+
position: fixed;
306+
inset: 0;
307+
background: rgba(0, 0, 0, 0.55);
308+
display: flex;
309+
align-items: center;
310+
justify-content: center;
311+
padding: 20px;
312+
z-index: 1000;
313+
}
314+
315+
.jaraid-modal-overlay[hidden] {
316+
display: none;
317+
}
318+
319+
.jaraid-modal {
320+
position: relative;
321+
background: #ffffff;
322+
border-radius: 8px;
323+
width: 100%;
324+
max-width: 640px;
325+
max-height: 85vh;
326+
overflow-y: auto;
327+
padding: 28px 30px 24px 30px;
328+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
329+
font-family: Georgia, serif;
330+
}
331+
332+
.jaraid-modal-close {
333+
position: absolute;
334+
top: 10px;
335+
inset-inline-end: 12px;
336+
width: 30px;
337+
height: 30px;
338+
border: none;
339+
border-radius: 4px;
340+
background: transparent;
341+
color: #555;
342+
font-size: 22px;
343+
line-height: 1;
344+
cursor: pointer;
345+
}
346+
347+
.jaraid-modal-close:hover {
348+
background: #eee;
349+
}
350+
351+
.jaraid-modal-close:focus {
352+
outline: 2px solid #6ab0f3;
353+
outline-offset: 1px;
354+
}
355+
356+
.jaraid-modal-title {
357+
margin: 0 30px 16px 0;
358+
font-size: 20px;
359+
line-height: 1.4;
360+
}
361+
362+
.jaraid-modal-field {
363+
margin-bottom: 14px;
364+
line-height: 1.5;
365+
font-size: 14px;
366+
}
367+
368+
.jaraid-modal-field:last-child {
369+
margin-bottom: 0;
370+
}
371+
372+
.jaraid-modal-value {
373+
margin-top: 2px;
368374
}
369375

370376
.jaraid-field-label {
377+
display: block;
371378
font-weight: 600;
372-
color: #555;
379+
font-size: 11px;
380+
text-transform: uppercase;
381+
letter-spacing: 0.03em;
382+
color: #777;
373383
}
374384

375385

376386
@media (max-width: 700px) {
377-
#jaraidRowControls {
378-
flex-direction: column;
379-
}
380-
#jaraidRowControls .jaraid-btn-prominent {
381-
width: 100%;
382-
justify-content: center;
383-
box-sizing: border-box;
384-
}
385387
#jaraidToolbar .jaraid-row {
386388
flex-direction: column;
387389
align-items: stretch;
@@ -417,10 +419,13 @@ tr[role="data"] td[n="9"] {
417419
#t1 table {
418420
font-size: 11px;
419421
}
420-
.jaraid-row-toggle {
421-
width: 22px;
422-
height: 22px;
423-
font-size: 14px;
422+
.jaraid-row-view-btn {
423+
width: 24px;
424+
height: 24px;
425+
font-size: 15px;
426+
}
427+
.jaraid-modal {
428+
padding: 22px 20px 18px 20px;
424429
}
425430
tr[role="label"],
426431
tr[role="data"] {

0 commit comments

Comments
 (0)