Redesign the News page around D8's list + preview split view

Replaces the flat news list with a D8-style two-pane layout: a filterable
list on the left (All/Drafts/Scheduled/Published chips with counts) and a
preview of whichever item is selected on the right, reusing the same
article/photos/publish markup news_detail.html already had (now factored
into _news_preview.html so both pages share it). Adds an NL/EN language
toggle to the article preview -- the club's two content languages are now
switchable in place, with a fallback note when a translation is missing,
instead of a separate "English" card that only appeared once translated.
The standalone news_detail.html permalink page is unchanged behaviourally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-20 08:30:24 +02:00
parent 2b4cc7d527
commit 331b0b8227
9 changed files with 379 additions and 158 deletions

View File

@@ -1678,3 +1678,34 @@
color: var(--color-club-content);
}
}
/* --- News preview (management/templates/management/_news_preview.html) ---
The NL/EN language toggle above the article body -- same bg-steel pill
shell as member_list.html's Members/Guardians/Both selector, but a JS-
toggled pair of <button>s (an in-page content swap, not a page navigation
with its own querystring state) rather than links, so a dedicated small
class pair is simpler than juggling several Tailwind utilities via
classList from the script. */
@layer components {
.news-lang-btn {
border-radius: 999px;
padding: 0.375rem 0.75rem;
font-family: var(--font-display);
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--color-on-dark);
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
}
.news-lang-btn:hover {
color: #fff;
}
.news-lang-btn.active {
background: #fff;
color: var(--color-ink);
}
}