mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Unify the three public pages (à propos, charte, licence) onto a single grid layout (.page-content) with sticky TOC sidebar, replacing the old separate / / markup. - Merge about.php, charte.php, licence.php templates into shared .page-content / .content-section structure - Add CommonMark HeadingPermalinkExtension for stable heading anchors - Use SlugNormalizer for TOC links so they match rendered heading IDs - Standardize link styling across content blocks: bold black, accent on hover (consistent with global link style) - Fix code block wrapping: use pre-wrap instead of pre, constrain grid columns with min-width:0, auto scrollbar - Fix apropos page grid placement: force content-section into column 2 so contacts and credits stay in the content area, not the sidebar Also includes accumulated WIP changes: - Header gradient: hardcoded purple-to-green (replaces CSS variables) - Search placeholder font - Duration field: replace minutes/sec/heures with h:m:s time inputs - TFE file optional for formats 1,4,6 with client-side JS toggle - Licence form: em-dash to hyphen, details/summary classes - Pill search: block Enter key form submission when no results - Draft autosave: remove CSRF rotation (broke concurrent FilePond uploads) - Language pill: clear hints for excluded main languages - Search results: gradient placeholder cards for items without covers - TFE display: format durée values as XhYm instead of decimal
272 lines
6.0 KiB
CSS
272 lines
6.0 KiB
CSS
/* ============================================================
|
|
HOME PAGE (index.php)
|
|
Root class: .home-body
|
|
============================================================ */
|
|
|
|
/* 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(3, 1fr);
|
|
gap: var(--space-s);
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: var(--space-xs) var(--space-s) var(--space-m);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.cards-container {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.cards-container {
|
|
grid-template-columns: 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: var(--radius);
|
|
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(51, 191, 135, 1) 25%,
|
|
rgba(192, 93, 225, 1) 75%,
|
|
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: var(--radius);
|
|
font-size: var(--step--1);
|
|
}
|
|
|
|
.clear-filter:hover {
|
|
background: var(--accent-secondary);
|
|
color: var(--accent-foreground);
|
|
}
|
|
|
|
/* 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: var(--radius);
|
|
color: var(--text-primary);
|
|
font-size: var(--step--1);
|
|
text-decoration: none;
|
|
font-weight: 400;
|
|
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;
|
|
}
|
|
}
|