From 83b0461f3b0b7b804869744a6f5e7c6b0da4e108 Mon Sep 17 00:00:00 2001 From: Juan Diego Moreno Upegui Date: Wed, 4 Feb 2026 18:31:47 -0500 Subject: [PATCH] feat: refactor components to use slots, implement CSS-controlled SVG graphics, and enhance theming system - Refactored InitialSection.astro to use named slot (extraContent) instead of prop for flexible HTML/JSX content injection from parent components - Updated index.astro to utilize extraContent slot in InitialSection component - Replaced decorative background div in Layout.astro with inline SVG element, enabling dynamic color control via CSS variable (--naliia-n-bg-color) - Added .bg-svg class and --bg-svg-color variable in global.css for customizable SVG decorative background - Converted navbar logo from img to inline SVG with CSS-controlled gradient using linearGradient definition - Implemented gradient variables (--navbar-n-naliia-start, --navbar-n-naliia-end) for theme-aware logo coloring - Configured vertical gradient (bottom-to-top) with pink color at bottom for navbar logo - Added data-theme attribute support in Layout.astro for light/dark theme switching - Extended global.css with comprehensive color palette (pink, yellow, mistyRose variants) and semantic tokens - Refactored all color references to use CSS custom properties for consistent theming - Updated Footer.astro logo from img to inline SVG with gradient support matching navbar implementation - Replaced hardcoded color values in navbar.css and footer.css with semantic token variables - Added [data-theme='dark'] selector in global.css to support future dark mode implementation - Created reusable CSS variables for borders, backgrounds, and text colors across components - Improved pricing card layout with enhanced visual hierarchy and gradient-based pricing tiers - Restructured index.astro pricing section with improved feature presentation and layout --- src/components/InitialSection.astro | 2 + src/components/footer/Footer.astro | 127 ++++++++++++++++- src/components/footer/footer.css | 6 +- src/components/navbar/Navbar.astro | 36 ++++- src/components/navbar/navbar.css | 11 +- src/layouts/Layout.astro | 16 ++- src/pages/index.astro | 207 +++++++++++++++++----------- src/styles/global.css | 103 +++++++++++--- src/styles/index.css | 131 +++++++++++------- 9 files changed, 464 insertions(+), 175 deletions(-) diff --git a/src/components/InitialSection.astro b/src/components/InitialSection.astro index 104bf68..579b887 100644 --- a/src/components/InitialSection.astro +++ b/src/components/InitialSection.astro @@ -41,6 +41,8 @@ const { imgSrc, imgAlt, logoSrc, logoAlt, mainTitle, subtitle, buttonText } = ) } + + diff --git a/src/components/footer/Footer.astro b/src/components/footer/Footer.astro index ffd6a17..dfa471c 100644 --- a/src/components/footer/Footer.astro +++ b/src/components/footer/Footer.astro @@ -4,11 +4,124 @@ import "./footer.css";