Replace the front page with an admin-driven home
The home page is rebuilt from scratch and configured from a new Front page tab in the admin, backed by migration 017 and served by GET /api/front-page. Hero: brand, photos (crossfading slideshow with progress and pause) or livestream (YouTube/Facebook/Vimeo embed with a LIVE badge), switched by hand. After it, bands the admin can reorder, retitle or hide: a countdown to the next event (series-aware), the National Retreats carousel, a numbers band (typed in or counted from the database), a horizontal rail of featured timeline entries, and a "Find your way in" pathfinder replacing the old connect section. The CRUD engine gains a `singleton` flag: the entity has one row, made by its migration, and create and delete are refused. The list screen opens that row and the editor drops the slug, back link and delete. shapeSeries moves to shape.js so /front-page can share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
b4b013209b
commit
6a69084de2
25 changed files with 2299 additions and 494 deletions
156
src/pages/sections/home/home.css
Normal file
156
src/pages/sections/home/home.css
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
/* ═══════════════════════════════════════════════════════════════
|
||||
FRONT PAGE MOTION
|
||||
|
||||
Keyframes and the few rules Tailwind utilities can't express.
|
||||
Everything that moves on its own stops under
|
||||
prefers-reduced-motion; the page still reads the same without it.
|
||||
═══════════════════════════════════════════════════════════════ */
|
||||
|
||||
/* ── Hero: brand mode aurora ─────────────────────────────────── */
|
||||
|
||||
.hp-aurora {
|
||||
position: absolute;
|
||||
border-radius: 9999px;
|
||||
filter: blur(80px);
|
||||
opacity: 0.55;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.hp-aurora--a { animation: hp-drift-a 22s ease-in-out infinite alternate; }
|
||||
.hp-aurora--b { animation: hp-drift-b 28s ease-in-out infinite alternate; }
|
||||
.hp-aurora--c { animation: hp-drift-c 34s ease-in-out infinite alternate; }
|
||||
|
||||
@keyframes hp-drift-a {
|
||||
from { transform: translate(-10%, -5%) scale(1); }
|
||||
to { transform: translate(15%, 10%) scale(1.25); }
|
||||
}
|
||||
@keyframes hp-drift-b {
|
||||
from { transform: translate(10%, 5%) scale(1.1); }
|
||||
to { transform: translate(-20%, -10%) scale(0.9); }
|
||||
}
|
||||
@keyframes hp-drift-c {
|
||||
from { transform: translate(0, 10%) scale(0.9); }
|
||||
to { transform: translate(-10%, -15%) scale(1.2); }
|
||||
}
|
||||
|
||||
/* Concentric rings: many circles, one centre. */
|
||||
.hp-rings {
|
||||
animation: hp-spin 90s linear infinite;
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
.hp-rings--reverse { animation-direction: reverse; animation-duration: 140s; }
|
||||
|
||||
@keyframes hp-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* ── Hero: headline words rise in ────────────────────────────── */
|
||||
|
||||
.hp-rise {
|
||||
display: inline-block;
|
||||
opacity: 0;
|
||||
transform: translateY(0.6em);
|
||||
animation: hp-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
|
||||
}
|
||||
|
||||
@keyframes hp-rise {
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
|
||||
/* ── Hero: photos ────────────────────────────────────────────── */
|
||||
|
||||
.hp-slide {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 1.4s ease;
|
||||
}
|
||||
.hp-slide--on { opacity: 1; }
|
||||
|
||||
.hp-slide img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.hp-slide--on img { animation: hp-kenburns var(--hp-slide-ms, 7000ms) ease-out forwards; }
|
||||
|
||||
@keyframes hp-kenburns {
|
||||
from { transform: scale(1.12) translate(1.5%, 1%); }
|
||||
to { transform: scale(1) translate(0, 0); }
|
||||
}
|
||||
|
||||
.hp-progress {
|
||||
transform-origin: left center;
|
||||
transform: scaleX(0);
|
||||
}
|
||||
.hp-progress--run { animation: hp-fill var(--hp-slide-ms, 7000ms) linear forwards; }
|
||||
.hp-progress--done { transform: scaleX(1); }
|
||||
.hp-progress--paused { animation-play-state: paused; }
|
||||
|
||||
@keyframes hp-fill {
|
||||
to { transform: scaleX(1); }
|
||||
}
|
||||
|
||||
/* ── Hero: LIVE ──────────────────────────────────────────────── */
|
||||
|
||||
.hp-live-dot {
|
||||
box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
|
||||
animation: hp-pulse 1.6s ease-out infinite;
|
||||
}
|
||||
|
||||
@keyframes hp-pulse {
|
||||
to { box-shadow: 0 0 0 12px rgba(255, 77, 77, 0); }
|
||||
}
|
||||
|
||||
/* ── Timeline rail ───────────────────────────────────────────── */
|
||||
|
||||
.hp-rail {
|
||||
scroll-snap-type: x mandatory;
|
||||
scrollbar-width: none;
|
||||
cursor: grab;
|
||||
}
|
||||
.hp-rail::-webkit-scrollbar { display: none; }
|
||||
.hp-rail--dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
|
||||
.hp-rail > * { scroll-snap-align: start; }
|
||||
|
||||
/* ── Pathfinder: actions arrive one after another ────────────── */
|
||||
|
||||
.hp-pop {
|
||||
opacity: 0;
|
||||
transform: translateY(14px) scale(0.98);
|
||||
animation: hp-pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
|
||||
}
|
||||
|
||||
@keyframes hp-pop {
|
||||
to { opacity: 1; transform: none; }
|
||||
}
|
||||
|
||||
/* ── Stats: numbers settle in ────────────────────────────────── */
|
||||
|
||||
.hp-stat {
|
||||
opacity: 0;
|
||||
transform: translateY(18px);
|
||||
transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
|
||||
}
|
||||
.hp-stat--in { opacity: 1; transform: none; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.hp-aurora,
|
||||
.hp-rings,
|
||||
.hp-slide--on img,
|
||||
.hp-live-dot {
|
||||
animation: none;
|
||||
}
|
||||
.hp-rise,
|
||||
.hp-pop {
|
||||
animation: none;
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
.hp-stat {
|
||||
transition: none;
|
||||
}
|
||||
.hp-slide {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue