mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
- repertoire-index.php: add $colHasMatches per-column guard. Entries in a column are only faded when that column has at least one matched entry in the current result set. When a dimension has no matched entries (e.g. no thesis has orientation_id set yet), the entire column stays fully interactive — all values remain clickable. This fixes: empty columns, forced single-select, cascade fading. - Database.php: revert allAp/allOr/allFi to full lookup-table queries so all known values are always shown (not just ones linked to theses). - common.css: body is now a flex column; main gets flex:1 + min-height:0; header-search-wrap gets flex-shrink:0; duplicate html/body blocks merged. - public.css: removed redundant top-level main block; home-main gets min-height:0. - repertoire.css: search-main gets min-height:0 for proper flex scroll.
271 lines
6.0 KiB
CSS
271 lines
6.0 KiB
CSS
/* ============================================================
|
|
HOME PAGE (index.php)
|
|
============================================================ */
|
|
|
|
@import url("./variables.css");
|
|
|
|
/* Cards grid — scrollable main area */
|
|
.home-main {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 0;
|
|
}
|
|
|
|
.cards-container {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
gap: var(--space-s);
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: var(--space-xs) var(--space-s) var(--space-m);
|
|
}
|
|
|
|
@media (min-width: 1400px) {
|
|
.cards-container {
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.cards-container {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Each card = list item containing a block <a> link */
|
|
.card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
cursor: pointer;
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: 8px;
|
|
background: var(--bg-primary);
|
|
overflow: hidden;
|
|
transition:
|
|
box-shadow 0.2s ease,
|
|
transform 0.2s ease;
|
|
}
|
|
|
|
.card:hover {
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.card > a {
|
|
text-decoration: none;
|
|
color: inherit;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
border-radius: inherit;
|
|
}
|
|
|
|
/* Media wrapper: <figure> for real images/video, <div class="card__media--gradient"> for placeholders */
|
|
.home-body figure {
|
|
width: 100%;
|
|
aspect-ratio: 4/3;
|
|
overflow: hidden;
|
|
background: var(--bg-tertiary);
|
|
position: relative;
|
|
margin: 0; /* reset <figure> default margin */
|
|
border-radius: 7px 7px 0 0;
|
|
}
|
|
|
|
.home-body figure img,
|
|
.home-body figure video {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.card:hover figure img,
|
|
.card:hover figure video {
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
.card__media--placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-active));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-tertiary);
|
|
font-size: var(--step-3);
|
|
}
|
|
|
|
.card__media--gradient {
|
|
width: 100%;
|
|
aspect-ratio: 4/3;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: var(--space-s);
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
border-radius: 7px 7px 0 0;
|
|
background: linear-gradient(
|
|
180deg,
|
|
rgba(60, 133, 108, 1) 0%,
|
|
rgba(96, 236, 180, 1) 33%,
|
|
rgba(227, 144, 255, 1) 66%,
|
|
rgba(149, 87, 181, 1) 100%
|
|
);
|
|
}
|
|
|
|
.card__gradient-author {
|
|
color: var(--accent-foreground);
|
|
font-size: var(--step--2);
|
|
opacity: 0.85;
|
|
margin-bottom: 0.25rem;
|
|
display: block;
|
|
}
|
|
|
|
.card__gradient-title {
|
|
color: var(--accent-foreground);
|
|
font-size: var(--step--1);
|
|
font-weight: 600;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Section label */
|
|
.home-section-label {
|
|
font-style: normal;
|
|
background: transparent;
|
|
color: var(--text-primary);
|
|
font-size: var(--step--2);
|
|
font-weight: 600;
|
|
letter-spacing: 0.1em;
|
|
text-transform: uppercase;
|
|
padding: var(--space-s) var(--space-s) var(--space-xs);
|
|
border-bottom: 1px solid var(--border-primary);
|
|
margin: 0;
|
|
}
|
|
|
|
/* Card caption — <p> directly inside the card <a> link, below the media */
|
|
.home-body li > a > p {
|
|
padding: var(--space-2xs) var(--space-xs) var(--space-xs);
|
|
font-size: var(--step--1);
|
|
line-height: 1.35;
|
|
color: var(--text-primary);
|
|
margin: 0;
|
|
font-weight: 400;
|
|
border-top: 1px solid var(--border-primary);
|
|
}
|
|
|
|
/* Empty-state message shown when no cards exist */
|
|
.cards-empty {
|
|
padding: var(--space-l);
|
|
color: var(--text-tertiary);
|
|
font-size: var(--step--1);
|
|
list-style: none;
|
|
}
|
|
|
|
/* Filter info */
|
|
.filter-info {
|
|
background: var(--accent-muted);
|
|
color: var(--accent-secondary);
|
|
padding: var(--space-3xs) var(--space-s);
|
|
font-size: var(--step--1);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-s);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.clear-filter {
|
|
color: var(--accent-secondary);
|
|
text-decoration: none;
|
|
padding: var(--space-3xs) var(--space-2xs);
|
|
background: var(--accent-muted);
|
|
border-radius: 3px;
|
|
font-size: var(--step--1);
|
|
}
|
|
|
|
.clear-filter:hover {
|
|
background: var(--accent-secondary);
|
|
}
|
|
|
|
/* Pagination */
|
|
.pagination-wrap {
|
|
border-top: 1px solid var(--border-secondary);
|
|
background: var(--bg-primary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pagination-wrap ul {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
gap: var(--space-2xs);
|
|
padding: var(--space-s);
|
|
list-style: none;
|
|
margin: 0;
|
|
}
|
|
|
|
.pagination-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 2.75rem;
|
|
min-height: 2.75rem;
|
|
padding: 0 var(--space-2xs);
|
|
border: 1px solid var(--border-secondary);
|
|
border-radius: 3px;
|
|
color: var(--text-primary);
|
|
font-size: var(--step--1);
|
|
text-decoration: none;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.pagination-btn:hover:not(.disabled) {
|
|
border-color: var(--accent-primary);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.pagination-btn.disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.pagination-info {
|
|
font-size: var(--step--1);
|
|
color: var(--text-secondary);
|
|
padding: 0 var(--space-2xs);
|
|
}
|
|
|
|
.page-current {
|
|
font-weight: 600;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Suppress card hover scale for users who prefer reduced motion */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.home-body figure img,
|
|
.home-body figure video {
|
|
transition: none;
|
|
}
|
|
.card:hover figure img,
|
|
.card:hover figure video {
|
|
transform: none;
|
|
}
|
|
.card__media--gradient {
|
|
transition: none;
|
|
}
|
|
.card {
|
|
transition: none;
|
|
}
|
|
.card:hover {
|
|
transform: none;
|
|
}
|
|
}
|