chore: session 2 snapshot — archive before Bricks-first restart
Snapshots the project at the end of session 2, just before resetting to a Bricks-first orthodox architecture. RESTART-PLAN.md at the root explains why this approach is being abandoned and what the next session will look like. Why we restart - Three architectures got stacked: Custom PHP Templates → Gutenberg blocks in post_content → Bricks data in post meta. Each layer fights the next. - Bricks Builder UI does not load because our header.php / footer.php / page.php emit chrome that conflicts with Bricks' own template-parts. - CSS overrides multiplied (Gutenberg + Bricks variants) and still don't pixel-match the original PHP-rendered visual. - 8+ one-shot mu-plugins live in LocalWP to patch over inconsistencies. What survives the restart (preserved here on main) - BRIEF, both PDFs, .txt extracts (sources of truth) - assets/css/tokens.css (full design system, untouched) - assets/fonts/Inter-Variable*.woff2 (RGPD self-hosted) - inc/<section>-data.php files (text copy from PDF strategie, will become /content-source/ on next session for reuse as translation dictionary and as input to programmatic page generation) - The Git repo, remote, branch main - LocalWP site, Bricks v2.3.4, WPML 4.9.3 with active licenses - WPML EN + FR setup with directory URL strategy What gets wiped at the start of next session - wp-content/themes/asterion-bricks/header.php / footer.php / page.php / index.php / front-page.php / template-parts/ / templates/ - inc/render-blocks.php, inc/render-blocks-native.php, inc/render-bricks.php - inc/shortcodes.php, inc/i18n.php, inc/form-handler.php - 35+ WP pages created over the session - All one-shot mu-plugins in LocalWP/wp-content/mu-plugins/ Restart approach (detailed in RESTART-PLAN.md) - Minimalist child theme: style.css, functions.php, theme.json, tokens.css, trimmed utilities.css, fonts, inc/cpt.php — that's it. - No header.php / footer.php / page.php in child theme — Bricks Templates (Header / Footer / Single — Page) take over via Bricks' Conditions. - User builds 5-7 archetype Bricks templates visually (~1-2h each) then programmatic generation fills the variants from inc/*-data.php sources. - WPML duplication after EN is validated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -672,6 +672,10 @@
|
||||
.av-hero {
|
||||
position: relative;
|
||||
background-color: var(--color-brand-navy);
|
||||
background-image:
|
||||
radial-gradient(ellipse at 70% 30%, rgba(201, 164, 90, 0.15), transparent 60%),
|
||||
radial-gradient(ellipse at 20% 70%, rgba(31, 91, 168, 0.20), transparent 60%),
|
||||
linear-gradient(135deg, var(--color-brand-navy-deep) 0%, var(--color-brand-navy) 50%, var(--color-bg-dark-elevated) 100%);
|
||||
color: var(--color-text-on-dark);
|
||||
overflow: hidden;
|
||||
isolation: isolate;
|
||||
@@ -920,6 +924,361 @@
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================
|
||||
12c. Bricks Builder element overrides — when a Bricks element carries one
|
||||
of our `av-*` classes, raise specificity so our design-system rules
|
||||
win against Bricks default styles (which use a single `.brxe-*`
|
||||
class selector).
|
||||
============================================================================ */
|
||||
|
||||
/* Hero — re-apply our layout & background on top of brxe-section. */
|
||||
.brxe-section.av-hero {
|
||||
position: relative;
|
||||
background-color: var(--color-brand-navy);
|
||||
/* Use background (shorthand) so .bricks-lazy-hidden's
|
||||
`background-image: none !important` doesn't kill the gradient outright;
|
||||
the shorthand wins by being declared after the shorthand reset. */
|
||||
background:
|
||||
radial-gradient(ellipse at 70% 30%, rgba(201, 164, 90, 0.15), transparent 60%),
|
||||
radial-gradient(ellipse at 20% 70%, rgba(31, 91, 168, 0.20), transparent 60%),
|
||||
linear-gradient(135deg, var(--color-brand-navy-deep) 0%, var(--color-brand-navy) 50%, var(--color-bg-dark-elevated) 100%);
|
||||
color: var(--color-text-on-dark);
|
||||
min-height: 70vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding-block: var(--space-20);
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.brxe-section.av-hero { min-height: 85vh; padding-block: var(--space-32); }
|
||||
}
|
||||
.brxe-container.av-hero__inner {
|
||||
width: 100%;
|
||||
max-width: var(--container-max);
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--container-padding-mobile);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-6);
|
||||
align-items: flex-start;
|
||||
}
|
||||
@media (min-width: 768px) { .brxe-container.av-hero__inner { padding-inline: var(--container-padding-tablet); } }
|
||||
@media (min-width: 1280px) { .brxe-container.av-hero__inner { padding-inline: var(--container-padding-desktop); } }
|
||||
|
||||
/* Hero typography on Bricks-rendered text-basic + heading. */
|
||||
.brxe-text-basic.av-hero__eyebrow {
|
||||
font-size: var(--text-overline);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--tracking-overline);
|
||||
color: var(--color-brand-gold);
|
||||
margin: 0;
|
||||
}
|
||||
.brxe-heading.av-hero__headline {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(2.5rem, 6vw, var(--text-display-xl));
|
||||
line-height: var(--leading-display-xl);
|
||||
font-weight: var(--font-weight-bold);
|
||||
letter-spacing: var(--tracking-tight);
|
||||
color: var(--color-text-on-dark);
|
||||
margin: 0;
|
||||
max-width: 18ch;
|
||||
}
|
||||
.brxe-text-basic.av-hero__sub {
|
||||
font-size: var(--text-body-lg);
|
||||
line-height: var(--leading-body-lg);
|
||||
color: var(--color-text-on-dark-muted);
|
||||
max-width: 60ch;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Section spacing on Bricks-rendered sections. */
|
||||
.brxe-section.av-section {
|
||||
padding-block: var(--space-16);
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.brxe-section.av-section { padding-block: var(--space-20); }
|
||||
}
|
||||
|
||||
/* Plain Bricks container reuses our container width / padding. */
|
||||
.brxe-container.av-container {
|
||||
max-width: var(--container-max);
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--container-padding-mobile);
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 768px) { .brxe-container.av-container { padding-inline: var(--container-padding-tablet); } }
|
||||
@media (min-width: 1280px) { .brxe-container.av-container { padding-inline: var(--container-padding-desktop); } }
|
||||
|
||||
/* Cards grid — Bricks `block` element uses display:flex column by default.
|
||||
Force CSS grid back. */
|
||||
.brxe-block.av-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-6);
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 768px) { .brxe-block.av-grid-3 { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (min-width: 1024px) { .brxe-block.av-grid-3 { grid-template-columns: repeat(3, 1fr); } }
|
||||
|
||||
.brxe-block.av-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-6);
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 768px) { .brxe-block.av-grid-4 { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (min-width: 1280px) { .brxe-block.av-grid-4 { grid-template-columns: repeat(4, 1fr); } }
|
||||
|
||||
/* Card design on Bricks block. */
|
||||
.brxe-block.av-card {
|
||||
background-color: var(--color-bg-elevated);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
overflow: hidden;
|
||||
padding: var(--space-6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
transition:
|
||||
box-shadow var(--duration-default) var(--ease-default),
|
||||
transform var(--duration-default) var(--ease-default);
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.brxe-block.av-card { padding: var(--space-8); }
|
||||
}
|
||||
.brxe-block.av-card:hover {
|
||||
box-shadow: var(--shadow-md);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.brxe-text-basic.av-card__eyebrow {
|
||||
font-size: var(--text-overline);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--tracking-overline);
|
||||
color: var(--color-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
.brxe-heading.av-card__title {
|
||||
font-family: var(--font-display);
|
||||
font-size: var(--text-h3);
|
||||
line-height: var(--leading-h3);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
color: var(--color-text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
.brxe-text-basic.av-card__excerpt {
|
||||
font-size: var(--text-body-md);
|
||||
line-height: var(--leading-body-md);
|
||||
color: var(--color-text-secondary);
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* Button on Bricks button element. Bricks renders <a class="brxe-button bricks-button">. */
|
||||
.brxe-button.av-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-2);
|
||||
height: 44px;
|
||||
padding: 0 var(--space-5);
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--text-body-md);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
line-height: 1;
|
||||
text-decoration: none;
|
||||
border: var(--border-default) solid transparent;
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
align-self: flex-start;
|
||||
transition:
|
||||
background-color var(--duration-fast) var(--ease-default),
|
||||
color var(--duration-fast) var(--ease-default),
|
||||
transform var(--duration-fast) var(--ease-default),
|
||||
border-color var(--duration-fast) var(--ease-default);
|
||||
}
|
||||
.brxe-button.av-btn--md { height: 44px; padding: 0 var(--space-5); }
|
||||
.brxe-button.av-btn--lg { height: 52px; padding: 0 1.75rem; font-size: var(--text-body-lg); }
|
||||
|
||||
.brxe-button.av-btn--primary {
|
||||
background-color: var(--color-brand-gold);
|
||||
color: var(--color-brand-navy);
|
||||
border-color: var(--color-brand-gold);
|
||||
}
|
||||
.brxe-button.av-btn--primary:hover,
|
||||
.brxe-button.av-btn--primary:focus-visible {
|
||||
background-color: var(--color-brand-gold-soft);
|
||||
border-color: var(--color-brand-gold-soft);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.brxe-button.av-btn--secondary {
|
||||
background-color: transparent;
|
||||
color: var(--color-brand-navy);
|
||||
border-color: var(--color-brand-navy);
|
||||
}
|
||||
.brxe-button.av-btn--secondary:hover,
|
||||
.brxe-button.av-btn--secondary:focus-visible {
|
||||
background-color: var(--color-brand-navy);
|
||||
color: var(--color-text-on-dark);
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================
|
||||
12b. Gutenberg block overrides — neutralize default layout styles when
|
||||
a block also carries one of our `av-*` design-system classes. We
|
||||
keep our grid / spacing / button rules in charge.
|
||||
============================================================================ */
|
||||
|
||||
/* Group blocks: drop the WP layout flow constraints that introduce extra margins. */
|
||||
.av-hero.wp-block-group,
|
||||
.av-section.wp-block-group,
|
||||
.av-card.wp-block-group,
|
||||
.av-card__body.wp-block-group,
|
||||
.av-container.wp-block-group,
|
||||
.av-hero__inner.wp-block-group {
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
/* Hero overrides — keep the hero layout we already had. */
|
||||
.av-hero.wp-block-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.av-hero__inner.wp-block-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Container blocks: WP `is-layout-constrained` pads/centers via wp-container-X
|
||||
helpers. We keep our own .av-container width/padding. */
|
||||
.av-container.wp-block-group {
|
||||
max-width: var(--container-max);
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--container-padding-mobile);
|
||||
width: 100%;
|
||||
}
|
||||
@media (min-width: 768px) { .av-container.wp-block-group { padding-inline: var(--container-padding-tablet); } }
|
||||
@media (min-width: 1280px) { .av-container.wp-block-group { padding-inline: var(--container-padding-desktop); } }
|
||||
|
||||
/* Columns: WP forces display:flex via .is-layout-flex. We force grid back so
|
||||
our 1/2/3/4-col responsive rules win. */
|
||||
.av-grid-3.wp-block-columns,
|
||||
.av-grid-3.wp-block-columns.is-layout-flex {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.av-grid-3.wp-block-columns,
|
||||
.av-grid-3.wp-block-columns.is-layout-flex { grid-template-columns: repeat(2, 1fr); }
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.av-grid-3.wp-block-columns,
|
||||
.av-grid-3.wp-block-columns.is-layout-flex { grid-template-columns: repeat(3, 1fr); }
|
||||
}
|
||||
|
||||
.av-grid-4.wp-block-columns,
|
||||
.av-grid-4.wp-block-columns.is-layout-flex {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--space-6);
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.av-grid-4.wp-block-columns,
|
||||
.av-grid-4.wp-block-columns.is-layout-flex { grid-template-columns: repeat(2, 1fr); }
|
||||
}
|
||||
@media (min-width: 1280px) {
|
||||
.av-grid-4.wp-block-columns,
|
||||
.av-grid-4.wp-block-columns.is-layout-flex { grid-template-columns: repeat(4, 1fr); }
|
||||
}
|
||||
|
||||
/* Each column: drop the flex-basis WP applies. */
|
||||
.wp-block-columns.av-grid-3 > .wp-block-column,
|
||||
.wp-block-columns.av-grid-4 > .wp-block-column {
|
||||
flex-basis: auto !important;
|
||||
flex-grow: 0 !important;
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
/* Section spacing — re-apply our padding-block to the migrated section blocks. */
|
||||
.av-section.wp-block-group {
|
||||
padding-block: var(--space-16);
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.av-section.wp-block-group { padding-block: var(--space-20); }
|
||||
}
|
||||
|
||||
/* Cards inside a wp-block-column: keep our card design. */
|
||||
.av-card.wp-block-group {
|
||||
background-color: var(--color-bg-elevated);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
overflow: hidden;
|
||||
height: 100%; /* fill the column for visual rhythm */
|
||||
}
|
||||
.av-card__body.wp-block-group {
|
||||
padding: var(--space-6);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-3);
|
||||
height: 100%;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.av-card__body.wp-block-group { padding: var(--space-8); }
|
||||
}
|
||||
|
||||
/* Buttons row: WP wraps every button in `.wp-block-button` and adds
|
||||
`.is-layout-flex` to the parent, which centers and adds gap.
|
||||
Strip the WP padding/margin so our `.av-btn` sizing wins. */
|
||||
.wp-block-buttons.av-card__cta,
|
||||
.wp-block-buttons.av-hero__ctas {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.wp-block-button.av-btn {
|
||||
margin: 0;
|
||||
}
|
||||
.wp-block-button.av-btn .wp-block-button__link {
|
||||
/* Reset Gutenberg's built-in button skin — let .av-btn rules win. */
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
line-height: 1;
|
||||
transition: none;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* Inherit our .av-btn padding via the containing flex layout. */
|
||||
}
|
||||
/* Auto-margin-top to push CTAs to the bottom of cards. */
|
||||
.av-card__cta {
|
||||
margin-top: auto;
|
||||
padding-top: var(--space-4);
|
||||
}
|
||||
|
||||
/* Eyebrow / overline reset — Gutenberg paragraph defaults could drift. */
|
||||
p.av-card__eyebrow,
|
||||
p.av-hero__eyebrow {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* WordPress core "global styles" reset noise — collapse the auto block-margin
|
||||
that pushes our text away from the hero edges. */
|
||||
.wp-block-group.av-hero > .wp-block-group,
|
||||
.wp-block-group.av-section > .wp-block-group {
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================
|
||||
13. Reveal animation (scroll-triggered, JS-driven via main.js)
|
||||
============================================================================ */
|
||||
|
||||
Reference in New Issue
Block a user