From 1c297b336f5469623ae94ae8c9ab4f01acb45a55 Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Thu, 14 May 2026 21:02:10 +0200 Subject: [PATCH] style(footer): align + brand sub-title typography across columns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One-shot mu-plugin patches the Footer template (#46) : - Column sub-titles (Solutions / Company / Legal / Contact) now use the eyebrow style : gold, uppercase, 0.75rem, 0.1em letter-spacing — matches the section-eyebrows used across content pages. - Brand heading (ASTERION VR) downsized to 1.125rem so it stops dominating the row; tagline muted to text-tertiary 0.875rem. - Columns wrapper set to align-items: flex-start with consistent 3rem gap → all sub-titles sit at the same vertical baseline. - Each column container tightened to 0.5rem rowGap (less air between heading and links). Patches both content_2 (JSON, source) and footer_2 (serialized, mirrored by the REST bridge). Idempotent. Co-Authored-By: Claude Opus 4.7 (1M context) --- tools/av-fix-footer-headings.php | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 tools/av-fix-footer-headings.php diff --git a/tools/av-fix-footer-headings.php b/tools/av-fix-footer-headings.php new file mode 100644 index 0000000..4664e74 --- /dev/null +++ b/tools/av-fix-footer-headings.php @@ -0,0 +1,101 @@ + ['raw' => 'var(--color-brand-gold)'], + 'font-size' => '0.75rem', + 'font-weight' => '600', + 'letter-spacing' => '0.1em', + 'text-transform' => 'uppercase', + 'line-height' => '1.4', + ]; + + foreach (['_bricks_page_content_2', '_bricks_page_footer_2'] as $key) { + $val = $wpdb->get_var($wpdb->prepare( + "SELECT meta_value FROM {$wpdb->postmeta} WHERE post_id=%d AND meta_key=%s LIMIT 1", + 46, $key + )); + if (! is_string($val) || $val === '') continue; + $is_json = ($val[0] === '['); + $elements = $is_json ? json_decode($val, true) : @unserialize($val); + if (! is_array($elements)) continue; + + $changed = 0; + foreach ($elements as $i => $el) { + $id = $el['id'] ?? ''; + + // 1. Footer column sub-titles : eyebrow style + if (in_array($id, ['ftrh2', 'ftrh3', 'ftrh4', 'ftrh5'], true)) { + $elements[$i]['settings']['_typography'] = $eyebrow_typography; + $elements[$i]['settings']['_margin'] = ['top' => '0', 'right' => '0', 'bottom' => '0.5rem', 'left' => '0']; + $changed++; + } + + // 2. Brand heading (ASTERION VR) — smaller so it doesn't dominate + if ($id === 'ftrbrnd') { + $elements[$i]['settings']['_typography'] = [ + 'color' => ['raw' => 'var(--color-text-on-dark)'], + 'font-size' => '1.125rem', + 'font-weight' => '600', + 'letter-spacing' => '0.08em', + 'line-height' => '1.4', + ]; + $elements[$i]['settings']['_margin'] = ['top' => '0', 'right' => '0', 'bottom' => '0.5rem', 'left' => '0']; + $changed++; + } + + // 3. Brand tagline : muted, smaller + if ($id === 'ftrtagln') { + $elements[$i]['settings']['_typography'] = [ + 'color' => ['raw' => 'var(--color-text-tertiary)'], + 'font-size' => '0.875rem', + 'line-height' => '1.55', + ]; + $changed++; + } + + // 4. Columns wrapper : align children to flex-start so column tops match + if ($id === 'ftrcols') { + $elements[$i]['settings']['_alignItems'] = 'flex-start'; + $elements[$i]['settings']['_columnGap'] = '3rem'; + $elements[$i]['settings']['_rowGap'] = '2.5rem'; + $changed++; + } + + // 5. Each column container : tight row gap between heading and content + if (in_array($id, ['ftrcol1', 'ftrcol2', 'ftrcol3', 'ftrcol4', 'ftrcol5'], true)) { + $elements[$i]['settings']['_rowGap'] = '0.5rem'; + $changed++; + } + } + + if ($changed > 0) { + $new = $is_json ? wp_json_encode($elements) : maybe_serialize($elements); + $wpdb->update($wpdb->postmeta, ['meta_value' => $new], + ['post_id' => 46, 'meta_key' => $key], ['%s'], ['%d', '%s']); + wp_cache_delete(46, 'post_meta'); + echo " $key : $changed element(s) patched\n"; + } + } + + echo "\nDONE. Reload any page → footer sub-titles now eyebrow-styled and aligned.\n"; + exit; +});