From 4b058e999c45bc6383b92773c2aa78ec174e4a55 Mon Sep 17 00:00:00 2001 From: Enrico Piovesan Date: Tue, 7 Jul 2026 23:11:45 -0600 Subject: [PATCH] feat: extract shared UI components to components.css (S4) Added page-hero, two-col, stat-row/stat-card, section-title-sm, section-lead, problem-list/benefit-list, and use-case-grid as globally-defined components in components.css. strip_global_styles.py removes these from page-level ' + + new_content = re.sub( + r']*)>(.*?)', + replace_style, + content, + flags=re.DOTALL + ) + + if new_content != content: + path.write_text(new_content, encoding="utf-8") + print(f" ✓ {path.relative_to(ROOT)}") + + +def main(): + pages = list(SRC_PAGES.rglob("*.astro")) + print(f"Scanning {len(pages)} pages...\n") + for p in sorted(pages): + process_file(p) + print("\nDone.") + + +if __name__ == "__main__": + main() diff --git a/src/pages/about.astro b/src/pages/about.astro index 115e3a2..6cadb1f 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -9,14 +9,7 @@ const _body = "
\n
\n - + } diff --git a/src/pages/solutions/ecommerce.astro b/src/pages/solutions/ecommerce.astro index 41abdd0..e60eb2d 100644 --- a/src/pages/solutions/ecommerce.astro +++ b/src/pages/solutions/ecommerce.astro @@ -9,14 +9,7 @@ const _body = "
\n
\n - + diff --git a/src/pages/solutions/saas.astro b/src/pages/solutions/saas.astro index 374c52d..861f8fd 100644 --- a/src/pages/solutions/saas.astro +++ b/src/pages/solutions/saas.astro @@ -9,9 +9,7 @@ const _body = "
\n
\n
- + .sol-item p { font-size: 0.85rem; color: var(--fg-muted); margin: 0; line-height: 1.5; }