update doormile approach
This commit is contained in:
@@ -5,7 +5,7 @@ const nextConfig: NextConfig = {
|
||||
turbopack: {
|
||||
root: path.resolve(__dirname),
|
||||
},
|
||||
// output: "export",
|
||||
output: "export",
|
||||
// Required by the How It Works 3D experience. React StrictMode double-invokes
|
||||
// mount/effects in dev, which tears down and re-creates the WebGL context of
|
||||
// the heavy 32MB scene mid-initialization — the context is lost ("THREE.
|
||||
|
||||
@@ -18160,7 +18160,6 @@ img:is([sizes=auto i]){contain-intrinsic-size:3000px 1500px}
|
||||
:root { --dm-mobile-gutter: 10px; }
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e {
|
||||
--padding-left: var(--dm-mobile-gutter) !important;
|
||||
@@ -18171,15 +18170,14 @@ img:is([sizes=auto i]){contain-intrinsic-size:3000px 1500px}
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc {
|
||||
--padding-left: 10px !important;
|
||||
--padding-right: 10px !important;
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
--padding-left: 0px !important;
|
||||
--padding-right: 0px !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner {
|
||||
@@ -18193,8 +18191,6 @@ img:is([sizes=auto i]){contain-intrinsic-size:3000px 1500px}
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner > .e-con,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner > .e-con,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner > .e-con,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner > .e-con,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner > .e-con {
|
||||
--padding-left: 0px !important;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 30 KiB |
@@ -539,10 +539,10 @@ body {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc {
|
||||
--padding-left: 10px !important;
|
||||
--padding-right: 10px !important;
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
--padding-left: 0px !important;
|
||||
--padding-right: 0px !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-3b4a7cc > .e-con-inner {
|
||||
@@ -565,7 +565,18 @@ body {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-d602f7f,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-d602f7f {
|
||||
--padding-left: 20px !important;
|
||||
--padding-right: 20px !important;
|
||||
padding-left: 20px !important;
|
||||
padding-right: 20px !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-f64bd88,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-5ed2dbb,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-6829276 {
|
||||
@@ -607,7 +618,6 @@ body {
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e {
|
||||
--padding-left: var(--dm-mobile-gutter) !important;
|
||||
@@ -618,7 +628,6 @@ body {
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner {
|
||||
width: 100% !important;
|
||||
@@ -631,7 +640,6 @@ body {
|
||||
}
|
||||
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-89a0ca1 > .e-con-inner > .e-con,
|
||||
.elementor.elementor-61 .elementor-element.elementor-element-88745f4 > .e-con-inner > .e-con,
|
||||
.elementor.elementor-86 .elementor-element.elementor-element-c2c601a > .e-con-inner > .e-con,
|
||||
.elementor.elementor-104 .elementor-element.elementor-element-c70681e > .e-con-inner > .e-con {
|
||||
--padding-left: 0px !important;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
import { sendContactEmail } from "@/actions/sendEmail";
|
||||
import { submitContactForm } from "@/lib/contactForm";
|
||||
import { ScrollReveal } from "@/animations/Reveal";
|
||||
|
||||
export default function Footer() {
|
||||
@@ -55,18 +55,13 @@ export default function Footer() {
|
||||
|
||||
setFormStatus("submitting");
|
||||
try {
|
||||
const res = await sendContactEmail({
|
||||
fullName: formData.fullName,
|
||||
email: formData.email,
|
||||
subject: formData.subject,
|
||||
message: formData.message,
|
||||
});
|
||||
const res = await submitContactForm(formData);
|
||||
|
||||
if (res.success) {
|
||||
setFormStatus("success");
|
||||
setFormData({ fullName: "", email: "", subject: "", message: "" });
|
||||
} else {
|
||||
console.error("Failed to send contact email:", res.error);
|
||||
console.error("Failed to submit contact form");
|
||||
setFormStatus("error");
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
@@ -335,7 +335,7 @@ export default function EVLogisticSection() {
|
||||
.ev-logistic-image-wrapper {
|
||||
max-width: 580px !important;
|
||||
transform: none !important;
|
||||
margin-left: 0 !important;
|
||||
margin: 0 auto !important;
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ export default function EVLogisticSection() {
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
@media (max-width: 768px) {
|
||||
.ev-logistic-section {
|
||||
--padding-left: 0px !important;
|
||||
--padding-right: 0px !important;
|
||||
|
||||
@@ -9,10 +9,10 @@ export default function IndustrySolutions() {
|
||||
<style dangerouslySetInnerHTML={{ __html: `
|
||||
@media (max-width: 768px) {
|
||||
.elementor-element.elementor-element-3b4a7cc {
|
||||
--padding-left: 10px !important;
|
||||
--padding-right: 10px !important;
|
||||
padding-left: 10px !important;
|
||||
padding-right: 10px !important;
|
||||
--padding-left: 0px !important;
|
||||
--padding-right: 0px !important;
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,18 @@ export default function IndustrySolutions() {
|
||||
padding-right: 0 !important;
|
||||
}
|
||||
|
||||
.elementor-element.elementor-element-d602f7f,
|
||||
.elementor-element.elementor-element-d602f7f {
|
||||
--padding-left: 20px !important;
|
||||
--padding-right: 20px !important;
|
||||
padding-left: 20px !important;
|
||||
padding-right: 20px !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
.elementor-element.elementor-element-f64bd88,
|
||||
.elementor-element.elementor-element-5ed2dbb,
|
||||
.elementor-element.elementor-element-6829276 {
|
||||
|
||||
39
src/lib/contactForm.ts
Normal file
39
src/lib/contactForm.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import emailjs from "@emailjs/browser";
|
||||
|
||||
interface ContactFormData {
|
||||
fullName: string;
|
||||
email: string;
|
||||
subject: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export async function submitContactForm(data: ContactFormData) {
|
||||
const serviceId = process.env.NEXT_PUBLIC_EMAILJS_SERVICE_ID;
|
||||
const templateId = process.env.NEXT_PUBLIC_EMAILJS_TEMPLATE_ID;
|
||||
const publicKey = process.env.NEXT_PUBLIC_EMAILJS_PUBLIC_KEY;
|
||||
|
||||
if (!serviceId || !templateId || !publicKey) {
|
||||
console.warn("EmailJS credentials are not configured. Falling back to mock success.");
|
||||
// Simulate network delay
|
||||
await new Promise((resolve) => setTimeout(resolve, 800));
|
||||
return { success: true, mock: true };
|
||||
}
|
||||
|
||||
try {
|
||||
await emailjs.send(
|
||||
serviceId,
|
||||
templateId,
|
||||
{
|
||||
name: data.fullName,
|
||||
email: data.email,
|
||||
subject: data.subject,
|
||||
message: data.message,
|
||||
},
|
||||
publicKey
|
||||
);
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
console.error("EmailJS sending failed:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user