From 0523bf80a8e92cd100611603bf573a1b46315699 Mon Sep 17 00:00:00 2001 From: barsa Date: Wed, 4 Mar 2026 13:11:20 +0900 Subject: [PATCH] refactor: update landing page components and styles - Removed obsolete components including ContactSection, PopularServicesSection, RemoteSupportSection, SolutionsCarousel, and TrustSection to streamline the landing page. - Introduced new components such as TrustStrip and ServicesGrid for improved layout and functionality. - Enhanced global CSS with new line-height tokens and updated styles for better typography. - Updated PublicLandingLoadingView for consistent loading states across the landing page. - Added new landing services data structure to support the ServicesGrid component. --- apps/portal/src/app/globals.css | 3 + .../landing-page/components/CTABanner.tsx | 40 +++ .../components/ContactSection.tsx | 302 ------------------ .../landing-page/components/HeroSection.tsx | 165 ++-------- .../components/PopularServicesSection.tsx | 122 ------- .../components/RemoteSupportSection.tsx | 192 ----------- .../landing-page/components/ServicesGrid.tsx | 41 +++ .../components/SolutionsCarousel.tsx | 281 ---------------- .../landing-page/components/TrustStrip.tsx | 25 ++ .../{TrustSection.tsx => WhyUsSection.tsx} | 30 +- .../features/landing-page/components/index.ts | 13 +- .../src/features/landing-page/data/index.ts | 2 + .../features/landing-page/data/services.tsx | 48 +++ .../src/features/landing-page/hooks/index.ts | 1 + .../landing-page/hooks/useStickyCta.ts | 33 ++ .../views/PublicLandingLoadingView.tsx | 121 +++---- .../landing-page/views/PublicLandingView.tsx | 42 +-- .../services/components/base/HowItWorks.tsx | 4 +- .../services/components/base/ServiceCTA.tsx | 4 +- .../services/components/base/ServiceFAQ.tsx | 4 +- .../services/components/base/ServicesHero.tsx | 2 +- .../components/vpn/VpnPlansContent.tsx | 6 +- apps/portal/src/styles/utilities.css | 62 ++-- 23 files changed, 335 insertions(+), 1208 deletions(-) create mode 100644 apps/portal/src/features/landing-page/components/CTABanner.tsx delete mode 100644 apps/portal/src/features/landing-page/components/ContactSection.tsx delete mode 100644 apps/portal/src/features/landing-page/components/PopularServicesSection.tsx delete mode 100644 apps/portal/src/features/landing-page/components/RemoteSupportSection.tsx create mode 100644 apps/portal/src/features/landing-page/components/ServicesGrid.tsx delete mode 100644 apps/portal/src/features/landing-page/components/SolutionsCarousel.tsx create mode 100644 apps/portal/src/features/landing-page/components/TrustStrip.tsx rename apps/portal/src/features/landing-page/components/{TrustSection.tsx => WhyUsSection.tsx} (69%) create mode 100644 apps/portal/src/features/landing-page/hooks/useStickyCta.ts diff --git a/apps/portal/src/app/globals.css b/apps/portal/src/app/globals.css index 4b89cec2..edadecd4 100644 --- a/apps/portal/src/app/globals.css +++ b/apps/portal/src/app/globals.css @@ -316,6 +316,9 @@ /* Glass tokens */ --color-glass-bg: var(--glass-bg); --color-glass-border: var(--glass-border); + + /* Line-height tokens */ + --leading-display: 1.1; } @layer base { diff --git a/apps/portal/src/features/landing-page/components/CTABanner.tsx b/apps/portal/src/features/landing-page/components/CTABanner.tsx new file mode 100644 index 00000000..7415d769 --- /dev/null +++ b/apps/portal/src/features/landing-page/components/CTABanner.tsx @@ -0,0 +1,40 @@ +import Link from "next/link"; +import { ArrowRight, Phone } from "lucide-react"; + +export function CTABanner() { + return ( +
+
+

+ Ready to Get Connected? +

+

+ No Japanese required. Our English-speaking team is here to help. +

+ +
+ + + 03-5812-1050 + +
+ +
+ + Browse Services + + + + Contact Us + +
+
+
+ ); +} diff --git a/apps/portal/src/features/landing-page/components/ContactSection.tsx b/apps/portal/src/features/landing-page/components/ContactSection.tsx deleted file mode 100644 index b33e8877..00000000 --- a/apps/portal/src/features/landing-page/components/ContactSection.tsx +++ /dev/null @@ -1,302 +0,0 @@ -"use client"; - -import { - Mail, - MessageSquare, - PhoneCall, - Train, - MapPin, - CheckCircle, - AlertCircle, -} from "lucide-react"; -import { Spinner } from "@/components/atoms"; -import { AlertBanner } from "@/components/molecules/AlertBanner/AlertBanner"; -import { CONTACT_SUBJECTS, type FormErrors } from "@/features/landing-page/data"; -import { useInView, useContactForm } from "@/features/landing-page/hooks"; - -type ContactFormReturn = ReturnType; - -interface ContactSectionProps { - formData: ContactFormReturn["formData"]; - formErrors: ContactFormReturn["formErrors"]; - formTouched: ContactFormReturn["formTouched"]; - isSubmitting: ContactFormReturn["isSubmitting"]; - submitStatus: ContactFormReturn["submitStatus"]; - handleInputChange: ContactFormReturn["handleInputChange"]; - handleInputBlur: ContactFormReturn["handleInputBlur"]; - handleSubmit: ContactFormReturn["handleSubmit"]; -} - -function getInputClassName( - fieldName: keyof FormErrors, - formTouched: ContactSectionProps["formTouched"], - formErrors: ContactSectionProps["formErrors"] -) { - const baseClass = - "w-full rounded-md border px-4 py-3 text-sm focus-visible:outline-none focus-visible:ring-2 bg-card transition-colors"; - const hasError = formTouched[fieldName] && formErrors[fieldName]; - return `${baseClass} ${ - hasError - ? "border-danger focus-visible:ring-danger/60" - : "border-border focus-visible:ring-primary/60" - }`; -} - -export function ContactSection({ - formData, - formErrors, - formTouched, - isSubmitting, - submitStatus, - handleInputChange, - handleInputBlur, - handleSubmit, -}: ContactSectionProps) { - const [contactRef, contactInView] = useInView(); - - return ( -
} - className={`relative left-1/2 right-1/2 w-screen -translate-x-1/2 bg-primary-soft py-14 sm:py-16 transition-all duration-700 ${ - contactInView ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8" - }`} - > -
-

CONTACT US

-
-
-
-
- - By Online Form (Anytime) -
- - {submitStatus === "success" && ( - - Thank you for contacting us. We'll get back to you within 24 hours. - - )} - {submitStatus === "error" && ( - - Please try again or contact us directly by phone. - - )} - -
- {/* Subject Dropdown */} -
- - - {formTouched.subject && formErrors.subject && ( -

- - {formErrors.subject} -

- )} -
- - {/* Name Input */} -
- - - {formTouched.name && formErrors.name && ( -

- - {formErrors.name} -

- )} -
- - {/* Email Input */} -
- - - {formTouched.email && formErrors.email && ( -

- - {formErrors.email} -

- )} -
- - {/* Phone Input (optional) */} -
- - -
- - {/* Message Textarea */} -
- -