Route
- Path:
/propiedades(Spanish) or/en/propiedades(English) - File:
src/pages/[...lang]/propiedades.astro - Type: Static page with dynamic client-side filtering
Page Structure
Hero Section
Simple hero with static image background:src/pages/[...lang]/propiedades.astro
- 40vh height with minimum 400px
- Dark overlay for text readability
- Animated title reveal via GSAP
Properties Grid Section
Main section containing filters and property cards:PropertyGrid Component
ThePropertyGrid component handles fetching, filtering, and displaying properties.
Data Fetching
src/components/properties/PropertyGrid.astro
PropertyService.getAll() method:
- Fetches properties from the eGO API
- Paginates through all results (100 per page)
- Filters for sale properties only
- Maps API data to local
Propertytype - Implements rate limiting (1.5s delay between pages)
Layout Structure
Two-column layout: sidebar filters + property gridFilters
The sidebar contains multiple filter types:1. Sort Dropdown
Custom select component for sorting:2. Location Filter
Radio buttons for location selection:3. Property Type Filter
Radio buttons for property types:4. Beds & Baths Filters
Dropdown selectors for minimum bedroom/bathroom count:Property Cards
Each property is rendered as a linked card:- Display a special header badge
- Styled with dark border and background
- Highlighted in the grid
Client-Side Filtering
Filtering logic runs entirely in the browser:src/components/properties/PropertyGrid.astro
Sorting
Sort visible cards by price or size:Pagination Indicator
Visual scroll indicator with three dots:Custom Select Components
Custom dropdowns with glassmorphism styling:Mobile Responsiveness
Related Files
- Service:
src/services/api/properties.ts - Component:
src/components/properties/PropertyGrid.astro - Utils:
src/utils/slug.ts - Types:
src/types/index.ts