levineuwirth.org/static/css/library.css

364 lines
9.4 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* library.css — Library + Bibliography page components, plus the
epistemic-filter UI that now lives on /search.html. */
/* ============================================================
FILTER UI
Originally the Library's sort+filter panel; the sort panel
and numeric filter were dropped in Phase 4 when the Library
unified onto item-cards. The filter panel itself remains in
use on /search.html, which reuses the same classes and
filter-panel markup.
============================================================ */
.library-filter-toggle {
font-family: var(--font-sans);
font-size: 0.75rem;
color: var(--text-muted);
background: none;
border: 1px solid var(--border);
border-radius: 2px;
padding: 0.15em 0.55em;
cursor: pointer;
margin-left: auto;
transition: border-color 0.1s, color 0.1s;
}
.library-filter-toggle:hover,
.library-filter-toggle[aria-expanded="true"] {
border-color: var(--text-muted);
color: var(--text);
}
.filter-toggle-badge {
font-weight: 600;
}
.library-filters {
border-top: 1px solid var(--border);
padding-top: 0.75rem;
margin-top: 0.75rem;
}
.library-filters[hidden] {
display: none;
}
.filter-row {
display: flex;
align-items: center;
gap: 0.45rem;
margin-bottom: 0.45rem;
}
.filter-label {
font-family: var(--font-sans);
font-size: 0.72rem;
color: var(--text-faint);
width: 5.5rem;
flex-shrink: 0;
}
.filter-options {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem;
}
.filter-prefix {
font-family: var(--font-sans);
font-size: 0.72rem;
color: var(--text-faint);
}
.filter-btn {
font-family: var(--font-sans);
font-size: 0.72rem;
color: var(--text-muted);
background: none;
border: 1px solid var(--border);
border-radius: 2px;
padding: 0.1em 0.45em;
cursor: pointer;
transition: border-color 0.1s, color 0.1s;
}
.filter-btn:hover {
border-color: var(--border-muted);
color: var(--text);
}
.filter-btn.is-active {
border-color: var(--text-muted);
color: var(--text);
font-weight: 600;
}
.filter-number {
font-family: var(--font-sans);
font-size: 0.72rem;
width: 3rem;
padding: 0.1em 0.3em;
border: 1px solid var(--border);
border-radius: 2px;
background: transparent;
color: var(--text);
}
.filter-number:focus {
outline: none;
border-color: var(--text-muted);
}
.filter-row-actions {
justify-content: flex-end;
margin-top: 0.25rem;
}
.filter-clear-btn {
font-family: var(--font-sans);
font-size: 0.72rem;
color: var(--text-faint);
background: none;
border: none;
cursor: pointer;
padding: 0;
}
.filter-clear-btn:hover {
color: var(--text);
}
/* Search-page result filtering (applied via search-filters.js) */
.search-filtered {
display: none !important;
}
/* Search page filter controls — just the toggle, no sort buttons */
.search-filter-controls {
display: flex;
justify-content: flex-end;
margin-bottom: 0.5rem;
}
/* ============================================================
PORTAL SECTIONS
Shared by the Library and by /bibliography/<keyword>/ pages
for the Writings + References section headers.
============================================================ */
.library-section {
margin-bottom: 2.5rem;
}
.library-section h2 {
font-family: var(--font-sans);
font-size: 0.78rem;
font-variant: small-caps;
letter-spacing: 0.08em;
color: var(--text-muted);
text-transform: lowercase;
font-weight: 500;
margin-bottom: 0.5rem;
}
/* Per-shelf ornament sitting before the heading text. SVGs in
/images/dingbats/ painted via mask-image so they inherit
currentColor (→ the same muted tone as the heading). */
.library-section-ornament {
display: inline-block;
width: 1em;
height: 1em;
margin-right: 0.5em;
background-color: currentColor;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: contain;
vertical-align: -0.12em;
}
.library-section-ornament[data-ornament="research"] {
mask-image: url('/images/dingbats/research.svg');
-webkit-mask-image: url('/images/dingbats/research.svg');
}
.library-section-ornament[data-ornament="nonfiction"] {
mask-image: url('/images/dingbats/nonfiction.svg');
-webkit-mask-image: url('/images/dingbats/nonfiction.svg');
}
.library-section-ornament[data-ornament="fiction"] {
mask-image: url('/images/dingbats/fiction.svg');
-webkit-mask-image: url('/images/dingbats/fiction.svg');
}
.library-section-ornament[data-ornament="poetry"] {
mask-image: url('/images/dingbats/poetry.svg');
-webkit-mask-image: url('/images/dingbats/poetry.svg');
}
.library-section-ornament[data-ornament="music"] {
mask-image: url('/images/dingbats/clef.svg');
-webkit-mask-image: url('/images/dingbats/clef.svg');
}
.library-section-ornament[data-ornament="ai"] {
mask-image: url('/images/dingbats/ai.svg');
-webkit-mask-image: url('/images/dingbats/ai.svg');
}
.library-section-ornament[data-ornament="tech"] {
mask-image: url('/images/dingbats/tech.svg');
-webkit-mask-image: url('/images/dingbats/tech.svg');
}
.library-section-ornament[data-ornament="miscellany"] {
mask-image: url('/images/dingbats/trefoil.svg');
-webkit-mask-image: url('/images/dingbats/trefoil.svg');
}
/* Inter-shelf divider. Adjacent-sibling selector renders between
actually-emitted sections — a section hidden by its $if$ gate
leaves no orphan divider because it never hits the DOM. */
.library-section + .library-section::before {
content: "";
display: block;
width: 240px;
max-width: 60%;
height: 24px;
margin: 2.5rem auto;
color: var(--text-faint);
background-color: currentColor;
mask-image: url('/images/dingbats/library-divider.svg');
-webkit-mask-image: url('/images/dingbats/library-divider.svg');
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: center;
-webkit-mask-size: contain;
}
/* "More on this shelf →" link, shown when the portal has more
items than the shelf's cap. Right-aligned, italic, subdued. */
.library-more {
text-align: right;
font-family: var(--font-serif);
font-style: italic;
font-size: 0.9rem;
color: var(--text-muted);
margin: 0.65rem 0 0;
}
.library-more a {
color: inherit;
text-decoration: underline;
text-decoration-color: var(--border);
text-decoration-thickness: 0.08em;
text-underline-offset: 0.2em;
transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}
.library-more a:hover {
color: var(--text);
text-decoration-color: var(--border-muted);
}
/* Leading blockquote above the shelves, lifted from content/library.md. */
.library-intro {
margin: 0.5rem 0 2rem;
}
.library-section h2 a {
color: inherit;
text-decoration: none;
}
.library-section h2 a:hover {
color: var(--text);
}
/* ============================================================
SEE ALSO — compact chain (Phase 4)
Secondary navigation above the portal sections: New,
Commonplace, Colophon, Bibliography. Single-line `·`-separated
list, sans-serif, muted, reads as a utility row rather than
content.
============================================================ */
.library-see-also {
font-family: var(--font-sans);
font-size: 0.85rem;
color: var(--text-muted);
margin: 0.25rem 0 2rem;
}
.library-see-also a {
color: var(--text-muted);
text-decoration: underline;
text-decoration-color: var(--border);
text-decoration-thickness: 0.08em;
text-underline-offset: 0.2em;
transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}
.library-see-also a:hover {
color: var(--text);
text-decoration-color: var(--border-muted);
}
.library-see-also-sep {
color: var(--text-faint);
padding: 0 0.35em;
user-select: none;
}
/* ============================================================
BIBLIOGRAPHY INDEX — alphabet jump strip + letter headers
Complete AZ row at top of /bibliography/ so the page reads
as a scannable reference. Absent letters render as muted
non-links so the strip stays visually complete without gaps.
============================================================ */
.bibliography-alphabet {
display: flex;
flex-wrap: wrap;
gap: 0.15em;
margin: 0.25rem 0 1.5rem;
font-family: var(--font-sans);
font-size: 0.85rem;
line-height: 1.4;
}
.bibliography-alphabet .alpha {
display: inline-block;
min-width: 1.2em;
padding: 0.05em 0.2em;
text-align: center;
color: var(--text-muted);
text-decoration: none;
border-bottom: 1px solid transparent;
transition: color var(--transition-fast), border-color var(--transition-fast);
}
.bibliography-alphabet a.alpha:hover {
color: var(--text);
border-bottom-color: var(--border-muted);
}
.bibliography-alphabet .alpha-empty {
color: var(--text-faint);
opacity: 0.45;
cursor: default;
}
.bibliography-letter {
font-family: var(--font-sans);
font-size: 0.85rem;
font-variant: small-caps;
text-transform: lowercase;
letter-spacing: 0.08em;
color: var(--text-muted);
font-weight: 500;
margin: 1.5rem 0 0.5rem;
scroll-margin-top: 1rem;
}