From 737329794c472e58101b4f0953460c7b1ff18801 Mon Sep 17 00:00:00 2001 From: Timo Knuth Date: Wed, 4 Feb 2026 15:47:40 +0100 Subject: [PATCH] perf: Lighthouse optimizations - lazy loading, contrast fixes, LCP preload, SEO links --- bizmatch/src/app/app.routes.ts | 23 ++++------ .../components/footer/footer.component.html | 4 +- .../src/app/pages/home/home.component.html | 32 +++++++++----- .../src/app/pages/home/home.component.scss | 41 +++++++++++++----- .../src/assets/images/avatar-f-3 copy.png | Bin 10666 -> 0 bytes .../assets/images/business_logo_with_bg.png | Bin 2070904 -> 0 bytes bizmatch/src/assets/images/bw-sky copy.jpg | Bin 61712 -> 0 bytes .../images/corpusChristiSkyline copy.jpg | Bin 82226 -> 0 bytes bizmatch/src/assets/images/flag_flour_bg.jpg | Bin 9125566 -> 0 bytes .../src/assets/images/header-logo copy.png | Bin 16932 -> 0 bytes bizmatch/src/assets/images/header-logo-hq.png | Bin 51598 -> 0 bytes .../assets/images/header-logo-original.png | Bin 16932 -> 0 bytes bizmatch/src/assets/images/index-bg copy.jpg | Bin 677763 -> 0 bytes .../src/assets/images/placeholder copy.png | Bin 667 -> 0 bytes .../images/placeholder_properties copy.jpg | Bin 86586 -> 0 bytes .../assets/images/properties_logo_backup.png | Bin 2593812 -> 0 bytes .../assets/images/properties_logo_with_bg.png | Bin 1928986 -> 0 bytes bizmatch/src/build.ts | 2 +- bizmatch/src/index.html | 3 ++ bizmatch/src/styles.scss | 3 +- 20 files changed, 68 insertions(+), 40 deletions(-) delete mode 100644 bizmatch/src/assets/images/avatar-f-3 copy.png delete mode 100644 bizmatch/src/assets/images/business_logo_with_bg.png delete mode 100644 bizmatch/src/assets/images/bw-sky copy.jpg delete mode 100644 bizmatch/src/assets/images/corpusChristiSkyline copy.jpg delete mode 100644 bizmatch/src/assets/images/flag_flour_bg.jpg delete mode 100644 bizmatch/src/assets/images/header-logo copy.png delete mode 100644 bizmatch/src/assets/images/header-logo-hq.png delete mode 100644 bizmatch/src/assets/images/header-logo-original.png delete mode 100644 bizmatch/src/assets/images/index-bg copy.jpg delete mode 100644 bizmatch/src/assets/images/placeholder copy.png delete mode 100644 bizmatch/src/assets/images/placeholder_properties copy.jpg delete mode 100644 bizmatch/src/assets/images/properties_logo_backup.png delete mode 100644 bizmatch/src/assets/images/properties_logo_with_bg.png diff --git a/bizmatch/src/app/app.routes.ts b/bizmatch/src/app/app.routes.ts index a5262a1..7cb57de 100644 --- a/bizmatch/src/app/app.routes.ts +++ b/bizmatch/src/app/app.routes.ts @@ -11,19 +11,14 @@ import { LoginRegisterComponent } from './components/login-register/login-regist import { AuthGuard } from './guards/auth.guard'; import { ListingCategoryGuard } from './guards/listing-category.guard'; -// Public pages (eagerly loaded - high traffic) -import { DetailsBusinessListingComponent } from './pages/details/details-business-listing/details-business-listing.component'; -import { DetailsCommercialPropertyListingComponent } from './pages/details/details-commercial-property-listing/details-commercial-property-listing.component'; -import { DetailsUserComponent } from './pages/details/details-user/details-user.component'; +// Public pages - HomeComponent stays eagerly loaded as landing page import { HomeComponent } from './pages/home/home.component'; -import { BrokerListingsComponent } from './pages/listings/broker-listings/broker-listings.component'; -import { BusinessListingsComponent } from './pages/listings/business-listings/business-listings.component'; -import { CommercialPropertyListingsComponent } from './pages/listings/commercial-property-listings/commercial-property-listings.component'; import { SuccessComponent } from './pages/success/success.component'; import { TermsOfUseComponent } from './pages/legal/terms-of-use.component'; import { PrivacyStatementComponent } from './pages/legal/privacy-statement.component'; -// Note: Account, Edit, Admin, Favorites, MyListing, and EmailUs components are now lazy-loaded below +// Note: All listing and details components are now lazy-loaded for better initial bundle size + export const routes: Routes = [ { @@ -32,17 +27,17 @@ export const routes: Routes = [ }, { path: 'businessListings', - component: BusinessListingsComponent, + loadComponent: () => import('./pages/listings/business-listings/business-listings.component').then(m => m.BusinessListingsComponent), runGuardsAndResolvers: 'always', }, { path: 'commercialPropertyListings', - component: CommercialPropertyListingsComponent, + loadComponent: () => import('./pages/listings/commercial-property-listings/commercial-property-listings.component').then(m => m.CommercialPropertyListingsComponent), runGuardsAndResolvers: 'always', }, { path: 'brokerListings', - component: BrokerListingsComponent, + loadComponent: () => import('./pages/listings/broker-listings/broker-listings.component').then(m => m.BrokerListingsComponent), runGuardsAndResolvers: 'always', }, { @@ -53,11 +48,11 @@ export const routes: Routes = [ // Listings Details - New SEO-friendly slug-based URLs { path: 'business/:slug', - component: DetailsBusinessListingComponent, + loadComponent: () => import('./pages/details/details-business-listing/details-business-listing.component').then(m => m.DetailsBusinessListingComponent), }, { path: 'commercial-property/:slug', - component: DetailsCommercialPropertyListingComponent, + loadComponent: () => import('./pages/details/details-commercial-property-listing/details-commercial-property-listing.component').then(m => m.DetailsCommercialPropertyListingComponent), }, // Backward compatibility redirects for old UUID-based URLs { @@ -95,7 +90,7 @@ export const routes: Routes = [ // User Details { path: 'details-user/:id', - component: DetailsUserComponent, + loadComponent: () => import('./pages/details/details-user/details-user.component').then(m => m.DetailsUserComponent), }, // ######### // User edit (lazy-loaded) diff --git a/bizmatch/src/app/components/footer/footer.component.html b/bizmatch/src/app/components/footer/footer.component.html index 11589dc..fdc3a59 100644 --- a/bizmatch/src/app/components/footer/footer.component.html +++ b/bizmatch/src/app/components/footer/footer.component.html @@ -23,9 +23,9 @@
- 1-800-840-6025 - info@bizmatch.net
diff --git a/bizmatch/src/app/pages/home/home.component.html b/bizmatch/src/app/pages/home/home.component.html index 761867a..3c7e41b 100644 --- a/bizmatch/src/app/pages/home/home.component.html +++ b/bizmatch/src/app/pages/home/home.component.html @@ -1,5 +1,5 @@
- Logo + BizMatch - Business & Property Marketplace