Skip to content

Commit aa350e5

Browse files
authored
Show all populated columns directly in the table instead of a 4-field summary
1 parent c5dfcc7 commit aa350e5

1 file changed

Lines changed: 88 additions & 47 deletions

File tree

css/jaraidFilterSort.css

Lines changed: 88 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -248,33 +248,39 @@ tr[role="label"] td.jaraid-sort-desc::after {
248248
-webkit-overflow-scrolling: touch;
249249
}
250250

251-
/* ---- Compact chronological summary row ----
252-
* Each row (and the header above it) lays out on a shared CSS Grid
253-
* template -- year / last-issue date / title / place -- rather than a
254-
* flexbox line whose items size to their own content. Flex left every
255-
* row's columns starting at a different x position depending on how
256-
* long the previous cell's text happened to be, so nothing lined up
257-
* and it read as loose fragments rather than a table. Grid gives every
258-
* row the same four column tracks, so values line up vertically like
259-
* an actual table again while the underlying markup stays a real
260-
* <table> (sortable, filterable, accessible).
251+
/* ---- Full data table, laid out for comfortable reading ----
252+
* Every column that this page's base stylesheet (teiChrono.css /
253+
* teiFihris.css) already renders for its language is shown directly in
254+
* the row -- so links to online holdings, comments, source notes, etc.
255+
* are all one glance away instead of hidden behind a click. Each row
256+
* (and the header above it) lays out on a shared CSS Grid template so
257+
* values line up into true vertical columns like a real table, rather
258+
* than a flexbox line whose items size to their own content and never
259+
* align from row to row.
261260
*
262-
* Day/month, owners/editors (English n=6 and Arabic n=11), comments,
263-
* source and holdings have no header cell and are never rendered in
264-
* the row at all -- click the row (or its small view-details button)
265-
* to see them, along with everything else, in the modal below. Only
266-
* one of title/place's English (n=4/5) or Arabic (n=10/12) columns is
267-
* ever visible at a time -- the other is hidden by this page's base
268-
* stylesheet (teiChrono.css / teiFihris.css) -- so exactly four
269-
* columns show on both pages.
261+
* The two languages don't expose the same columns (teiFihris.css hides
262+
* the English fields 4/5/6/7 (Title/Place/Owners/Comments), keeping
263+
* Comments off the Arabic page entirely; teiChrono.css hides the
264+
* Arabic-only fields 10/11/12) and their natural DOM order puts
265+
* Source/Holdings ahead of the Arabic title/editor/place cells --
266+
* visually backwards compared to the English row's Title-first
267+
* reading order. The "order" rules below reshuffle the Arabic page's
268+
* columns into the same conceptual sequence as the English page
269+
* (chronology, then title/place/editor, then source/holdings) without
270+
* touching the underlying markup, which stays in its original TEI
271+
* column order for the modal and for screen readers.
272+
*
273+
* Clicking a row (or its small view-details button) still opens the
274+
* full-entry popup -- handy for a large-type, single-record view or
275+
* for copying a citation -- it's just no longer the only way to see a
276+
* field.
270277
*/
271278
tr[role="label"],
272279
tr[role="data"] {
273280
display: grid;
274-
grid-template-columns: 90px 150px minmax(240px, 2fr) minmax(140px, 1fr);
275-
align-items: baseline;
276-
column-gap: 20px;
277-
row-gap: 2px;
281+
align-items: start;
282+
column-gap: 18px;
283+
row-gap: 3px;
278284
}
279285

280286
tr[role="label"] {
@@ -283,35 +289,56 @@ tr[role="label"] {
283289
border-bottom: 2px solid #999;
284290
}
285291

286-
tr[role="label"] td {
287-
border: none !important;
288-
padding: 0 !important;
289-
}
290-
291292
tr[role="data"] {
292-
padding: 10px 12px;
293+
padding: 9px 12px;
293294
border-bottom: 1px solid #ddd;
295+
font-size: 13px;
296+
line-height: 1.5;
294297
}
295298

299+
/* A light divider on the trailing edge of every visible cell reads as
300+
column separation without needing to single out "the last column" --
301+
DOM order (used by :last-of-type) doesn't match the visual order
302+
after the Arabic reorder below, and hidden n=10-12 (English) /
303+
n=4-7 (Arabic) cells never paint a border anyway since they're
304+
display:none, so this never produces a stray line past the real
305+
edge of the row. */
306+
tr[role="label"] td,
296307
tr[role="data"] td {
308+
min-width: 0;
297309
border: none !important;
298-
padding: 0 !important;
299-
}
300-
301-
tr[role="label"] td[n="2"],
302-
tr[role="label"] td[n="6"],
303-
tr[role="label"] td[n="7"],
304-
tr[role="label"] td[n="8"],
305-
tr[role="label"] td[n="9"],
306-
tr[role="label"] td[n="11"],
307-
tr[role="data"] td[n="2"],
308-
tr[role="data"] td[n="6"],
309-
tr[role="data"] td[n="7"],
310-
tr[role="data"] td[n="8"],
311-
tr[role="data"] td[n="9"],
312-
tr[role="data"] td[n="11"] {
313-
display: none !important;
314-
}
310+
border-inline-end: 1px solid #e4e4e4 !important;
311+
padding: 0 12px 0 0 !important;
312+
overflow-wrap: break-word;
313+
}
314+
315+
/* English page (pages/chrono.html): teiChrono.css already hides n=10-12,
316+
so the 9 remaining columns are in the desired reading order as-is. */
317+
body#chrono tr[role="label"],
318+
body#chrono tr[role="data"] {
319+
grid-template-columns:
320+
64px 84px 84px
321+
minmax(200px, 2.1fr) minmax(100px, 1fr) minmax(140px, 1.3fr)
322+
minmax(170px, 1.6fr) minmax(100px, 1fr) minmax(120px, 1.1fr);
323+
}
324+
325+
/* Arabic page (pages/fihris.html): teiFihris.css hides n=4-7, leaving
326+
Source (8) and Holdings (9) ahead of the Arabic title/editor/place
327+
cells (10/11/12) in raw DOM order -- reorder them here so the row
328+
still reads chronology, then title/place/editor, then source/holdings. */
329+
body#fihris tr[role="label"],
330+
body#fihris tr[role="data"] {
331+
grid-template-columns:
332+
64px 84px 84px
333+
minmax(200px, 2.1fr) minmax(100px, 1fr) minmax(140px, 1.3fr)
334+
minmax(100px, 1fr) minmax(120px, 1.1fr);
335+
}
336+
337+
body#fihris td[n="10"] { order: 4; } /* Arabic title */
338+
body#fihris td[n="12"] { order: 5; } /* Arabic place */
339+
body#fihris td[n="11"] { order: 6; } /* Arabic editor/publisher */
340+
body#fihris td[n="8"] { order: 7; } /* Source */
341+
body#fihris td[n="9"] { order: 8; } /* Holdings */
315342

316343
/* The trailing " ID:t1r123" fragment jaraidFilterSort.js wraps in a
317344
span (see tagIdSuffix()) -- hidden from the row itself so a title
@@ -452,8 +479,22 @@ tr[role="data"] .jaraid-id-tag {
452479
}
453480
tr[role="label"],
454481
tr[role="data"] {
455-
grid-template-columns: 55px 90px minmax(140px, 2fr) minmax(100px, 1fr);
456-
column-gap: 10px;
482+
column-gap: 8px;
457483
padding: 8px !important;
484+
font-size: 12px;
485+
}
486+
body#chrono tr[role="label"],
487+
body#chrono tr[role="data"] {
488+
grid-template-columns:
489+
44px 60px 60px
490+
minmax(120px, 2.1fr) minmax(70px, 1fr) minmax(90px, 1.3fr)
491+
minmax(100px, 1.6fr) minmax(70px, 1fr) minmax(80px, 1.1fr);
492+
}
493+
body#fihris tr[role="label"],
494+
body#fihris tr[role="data"] {
495+
grid-template-columns:
496+
44px 60px 60px
497+
minmax(120px, 2.1fr) minmax(70px, 1fr) minmax(90px, 1.3fr)
498+
minmax(70px, 1fr) minmax(80px, 1.1fr);
458499
}
459500
}

0 commit comments

Comments
 (0)