From 2888ff90ac34d970bd575dd7c98fc291dd13547e Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 6 Mar 2026 04:27:14 +0000 Subject: [PATCH 1/2] Update src/app/layout.tsx --- src/app/layout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e199bf2..9d8fd84 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -7,7 +7,8 @@ import "./styles/base.css"; const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: "CoreScale - Professional Websites for Small Businesses", description: "Affordable professional websites for small and local businesses. Build trust, attract customers, and grow your business online with CoreScale."}; + title: "CoreScale - Professional Websites for Small Businesses", description: "Affordable professional websites for small and local businesses. Build trust, attract customers, and grow your business online with CoreScale." +}; export default function RootLayout({ children, -- 2.49.1 From 80546c2ddf6d75f1646bd4e4476f02212fbec875 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 6 Mar 2026 04:27:14 +0000 Subject: [PATCH 2/2] Update src/app/page.tsx --- src/app/page.tsx | 89 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 23 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 2cffd36..8d2e2a1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -13,7 +13,8 @@ import { useState } from "react"; export default function LandingPage() { const [submitted, setSubmitted] = useState(false); const [formData, setFormData] = useState({ - fullName: "", businessName: "", email: "", phone: "", message: ""}); + fullName: "", businessName: "", email: "", phone: "", message: "" + }); const handlePhoneClick = () => { window.location.href = "tel:206-741-9017"; @@ -23,12 +24,45 @@ export default function LandingPage() { window.location.href = "mailto:CoreScale.co@gmail.com"; }; - const handleFormSubmit = (e: React.FormEvent) => { + const handleFormSubmit = async (e: React.FormEvent) => { e.preventDefault(); - setSubmitted(true); - setFormData({ - fullName: "", businessName: "", email: "", phone: "", message: ""}); - setTimeout(() => setSubmitted(false), 5000); + + // Prepare email content + const emailBody = `New Website Request from CoreScale Contact Form\n\n${ + "==".repeat(40) + }\n\nFull Name: ${formData.fullName}\nBusiness Name: ${formData.businessName}\nEmail Address: ${formData.email}\nPhone Number: ${formData.phone}\nMessage: ${formData.message}\n\n${ + "==".repeat(40) + }`; + + try { + // Send email using Formspree or similar service + const response = await fetch("https://formspree.io/f/mpwazqqq", { + method: "POST", headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ + name: formData.fullName, + email: formData.email, + businessName: formData.businessName, + phone: formData.phone, + message: formData.message, + _subject: "New Website Request \u2013 CoreScale", _reply_to: formData.email + }) + }); + + if (response.ok) { + setSubmitted(true); + setFormData({ + fullName: "", businessName: "", email: "", phone: "", message: "" + }); + setTimeout(() => setSubmitted(false), 5000); + } else { + alert("Failed to send form. Please try again."); + } + } catch (error) { + console.error("Error submitting form:", error); + alert("An error occurred. Please try again."); + } }; const handleInputChange = ( @@ -36,7 +70,7 @@ export default function LandingPage() { ) => { setFormData({ ...formData, - [e.target.name]: e.target.value, + [e.target.name]: e.target.value }); }; @@ -60,10 +94,11 @@ export default function LandingPage() { { name: "About", id: "about" }, { name: "Services", id: "services" }, { name: "Why We Matter", id: "why-matters" }, - { name: "Contact", id: "contact" }, + { name: "Contact", id: "contact" } ]} button={{ - text: "Get Your Website Today", href: "contact"}} + text: "Get Your Website Today", href: "contact" + }} animateOnLoad={true} /> @@ -81,7 +116,7 @@ export default function LandingPage() { showDimOverlay={false} buttons={[ { text: "Get Your Website Today", href: "contact" }, - { text: "Learn More", href: "about" }, + { text: "Learn More", href: "about" } ]} buttonAnimation="slide-up" /> @@ -91,7 +126,8 @@ export default function LandingPage() { @@ -143,11 +181,14 @@ export default function LandingPage() { gridVariant="three-columns-all-equal-width" features={[ { - id: "01", title: "Build Trust & Credibility", description: "A professional website shows customers that you're legitimate and serious about your business. It's often the first impression customers have of your company.", imageSrc: "http://img.b2bpic.net/free-vector/flat-design-responsive-website-design_23-2149483806.jpg", imageAlt: "Professional website design"}, + id: "01", title: "Build Trust & Credibility", description: "A professional website shows customers that you're legitimate and serious about your business. It's often the first impression customers have of your company.", imageSrc: "http://img.b2bpic.net/free-vector/flat-design-responsive-website-design_23-2149483806.jpg", imageAlt: "Professional website design" + }, { - id: "02", title: "Attract More Customers", description: "When customers search online for services you offer, a well-designed website helps them find you. Don't miss out on valuable business opportunities.", imageSrc: "http://img.b2bpic.net/free-photo/website-construction-error-concept_53876-132306.jpg", imageAlt: "Customer attraction through online presence"}, + id: "02", title: "Attract More Customers", description: "When customers search online for services you offer, a well-designed website helps them find you. Don't miss out on valuable business opportunities.", imageSrc: "http://img.b2bpic.net/free-photo/website-construction-error-concept_53876-132306.jpg", imageAlt: "Customer attraction through online presence" + }, { - id: "03", title: "Stand Out from Competitors", description: "Many local businesses still don't have websites. By getting online with CoreScale, you'll have a competitive advantage and reach customers your competitors are missing.", imageSrc: "http://img.b2bpic.net/free-photo/group-people-working-website-template_53876-25068.jpg", imageAlt: "Competitive advantage online"}, + id: "03", title: "Stand Out from Competitors", description: "Many local businesses still don't have websites. By getting online with CoreScale, you'll have a competitive advantage and reach customers your competitors are missing.", imageSrc: "http://img.b2bpic.net/free-photo/group-people-working-website-template_53876-25068.jpg", imageAlt: "Competitive advantage online" + } ]} /> @@ -303,10 +344,10 @@ export default function LandingPage() { ) : (

- Thank you for contacting CoreScale. + Thank you for contacting CoreScale. We will reach out to you shortly.

- We will reach out shortly to discuss your website. + We've received your website request and will be in touch soon to discuss your project.

)} @@ -318,9 +359,11 @@ export default function LandingPage() { -- 2.49.1