From ea6820f1c464678766d11394d2120ff62234d622 Mon Sep 17 00:00:00 2001 From: Tudor Date: Wed, 4 Feb 2026 09:54:27 +0000 Subject: [PATCH] Combine hero and filter sections into unified search block Merged the hero title/description into FilterBar component to save vertical space. The combined block has a gradient background flowing from cream to white with the search controls below the header. Co-Authored-By: Claude Opus 4.5 --- nextjs-app/components/FilterBar.module.css | 46 +++++++++++++++ nextjs-app/components/FilterBar.tsx | 13 +++- nextjs-app/components/HomeView.module.css | 69 ---------------------- nextjs-app/components/HomeView.tsx | 19 +++--- 4 files changed, 64 insertions(+), 83 deletions(-) diff --git a/nextjs-app/components/FilterBar.module.css b/nextjs-app/components/FilterBar.module.css index 4c51726..b3a3ab6 100644 --- a/nextjs-app/components/FilterBar.module.css +++ b/nextjs-app/components/FilterBar.module.css @@ -7,6 +7,35 @@ box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06)); } +.filterBar.withHero { + background: linear-gradient(180deg, var(--bg-secondary, #f3ede4) 0%, var(--bg-card, white) 40%); + padding: 1.75rem 1.5rem 1.5rem; +} + +.heroSection { + text-align: center; + margin-bottom: 1.25rem; + padding-bottom: 1.25rem; + border-bottom: 1px solid var(--border-color, #e5dfd5); +} + +.heroTitle { + font-size: 1.75rem; + font-weight: 700; + color: var(--text-primary, #1a1612); + margin: 0 0 0.375rem; + line-height: 1.2; + letter-spacing: -0.02em; + font-family: var(--font-playfair), 'Playfair Display', serif; +} + +.heroDescription { + font-size: 0.9375rem; + color: var(--text-secondary, #5c564d); + margin: 0; + line-height: 1.4; +} + .searchModeToggle { display: flex; gap: 0.5rem; @@ -168,6 +197,23 @@ border-radius: 8px; } + .filterBar.withHero { + padding: 1.25rem 1rem 1rem; + } + + .heroSection { + margin-bottom: 1rem; + padding-bottom: 1rem; + } + + .heroTitle { + font-size: 1.375rem; + } + + .heroDescription { + font-size: 0.875rem; + } + .locationForm { flex-direction: column; } diff --git a/nextjs-app/components/FilterBar.tsx b/nextjs-app/components/FilterBar.tsx index 6ceda0b..cbc2b22 100644 --- a/nextjs-app/components/FilterBar.tsx +++ b/nextjs-app/components/FilterBar.tsx @@ -14,9 +14,11 @@ import styles from './FilterBar.module.css'; interface FilterBarProps { filters: Filters; showLocationSearch?: boolean; + heroTitle?: string; + heroDescription?: string; } -export function FilterBar({ filters, showLocationSearch = true }: FilterBarProps) { +export function FilterBar({ filters, showLocationSearch = true, heroTitle, heroDescription }: FilterBarProps) { const router = useRouter(); const pathname = usePathname(); const searchParams = useSearchParams(); @@ -104,7 +106,14 @@ export function FilterBar({ filters, showLocationSearch = true }: FilterBarProps const hasActiveFilters = currentSearch || currentLA || currentType || currentPostcode; return ( -
+
+ {heroTitle && ( +
+

{heroTitle}

+ {heroDescription &&

{heroDescription}

} +
+ )} + {showLocationSearch && (