ProcesoEntrega Section
TheProcesoEntrega component displays the website creation process as an interactive accordion-based timeline. It combines visual flow indicators with expandable content sections to guide users through the delivery process.
Component Location
File:src/sections/ProcesoEntrega.astro
Data Source
Process steps are loaded fromsrc/data/procesoentrega.json, which contains an array of process steps with titles and HTML body content.
Component Overview
Fromsrc/sections/ProcesoEntrega.astro:1-25:
Props
| Prop | Type | Default | Description |
|---|---|---|---|
tiempoEntrega | string | "7 días" | Delivery timeframe displayed in the title |
Usage
Default (7 días)
Custom Delivery Time
Section Structure
The component consists of:- Payment highlight banner - Displays discount and payment info
- Section title - Shows delivery timeframe
- Process steps - Interactive accordion timeline
Payment Highlight Banner
Fromsrc/sections/ProcesoEntrega.astro:28-39:
- Dynamic current month display (
mesActual) - 20% discount messaging with urgency (“Últimas 3 plazas”)
- Single payment clarification
- Icon from
astro-icon(Material Design Icons)
Section Title
Fromsrc/sections/ProcesoEntrega.astro:41-46:
Process Steps Structure
Each step combines:- Visual flow - Numbered balloon indicator with connecting lines
- Accordion content - Expandable step details
src/sections/ProcesoEntrega.astro:47-75:
Key Features
- Numbered balloons: Display step numbers (1, 2, 3…)
- Connecting lines: Visual flow between steps
- First step open:
open={index === 0}opens the first accordion by default - HTML content: Uses
set:htmlto render HTML from JSON - Click sync: Balloons and accordions are synchronized via JavaScript
Interactive Behavior
JavaScript handles accordion-balloon synchronization (from line 77-126):Balloon Click Handler
Accordion Toggle Handler
- Clicking a balloon opens its accordion
- Opening an accordion highlights its balloon
- Only one accordion can be open at a time (exclusive)
Data Structure
Fromsrc/data/procesoentrega.json:
body field contains HTML with internal links to blog posts for SEO.
Styling Overview
Container and Background
Fromsrc/sections/ProcesoEntrega.astro:132-146:
Payment Highlight Styles
Fromsrc/sections/ProcesoEntrega.astro:148-184:
Flow Balloon Styles
Fromsrc/sections/ProcesoEntrega.astro:245-276:
- Default: Light background, subtle border
- Hover: Scales up, darker border
- Active: Blue background, white text, glowing shadow
Grid Layout
Fromsrc/sections/ProcesoEntrega.astro:229-235:
- Column 1 (60px): Visual flow (balloons + lines)
- Column 2 (1fr): Accordion content
SEO Features
Internal Links
The component includes SEO-friendly internal links in step content:Responsive Design
Mobile styles fromsrc/sections/ProcesoEntrega.astro:324-334:
- Narrower visual flow column (50px)
- Smaller balloons (36px)
- Reduced font size
Dependencies
External Packages
- free-astro-components: Provides accordion functionality
- astro-icon: Material Design Icons support
Internal Components
Example: Adding to a Page
Customization
Change Delivery Time
Pass differenttiempoEntrega prop:
Update Discount Offer
Edit line 32-33 in the component:Add/Remove Process Steps
Editsrc/data/procesoentrega.json:
Best Practices
- Keep steps concise: 4-6 steps work best visually
- Use internal links: Include blog links in step content for SEO
- Update monthly: Change the urgency message regularly
- Mobile test: Verify balloon tap targets on mobile
- Descriptive titles: Make step titles clear and action-oriented
- HTML content: Use basic HTML tags in body content (strong, a, em)
Accessibility
- Semantic HTML structure
- Keyboard navigation via native
<details>elements - Clickable balloon indicators
- Clear visual states (hover, active)
- ARIA attributes handled by accordion component
Performance
- Lightweight JavaScript (event listeners only)
- CSS transitions (no heavy animations)
- Lazy-loaded icons
- Efficient DOM queries (no jQuery)