diff --git a/src/App.jsx b/src/App.jsx index 7df5549..9f86008 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -9,6 +9,8 @@ import ServiceDetail from './pages/ServiceDetail' import Project from './pages/Project' import Contact from './pages/Contact' +const PAGE_LOAD = performance.now() + function NotFound() { return (
@@ -21,12 +23,19 @@ function NotFound() { export default function App() { useEffect(() => { - const preloader = document.getElementById("preloader") - if (preloader) { - preloader.classList.add("loaded") - setTimeout(() => preloader.remove(), 500) - } + const el = document.getElementById("preloader") + if (!el) return + + const elapsed = performance.now() - PAGE_LOAD + const minShow = 1500 // ms — let user perceive the brand + const delay = Math.max(0, minShow - elapsed) + + setTimeout(() => { + el.classList.add("loaded") + setTimeout(() => el.remove(), 500) + }, delay) }, []) + return ( diff --git a/src/components/home/HomeServicesSection.jsx b/src/components/home/HomeServicesSection.jsx index 99bfdf1..5126dac 100644 --- a/src/components/home/HomeServicesSection.jsx +++ b/src/components/home/HomeServicesSection.jsx @@ -2,7 +2,7 @@ import { Link } from "react-router-dom"; const SERVICES = [ { slug: "adiabatic-pre-cooling-system", title: "Adiabatic Pre-Cooling System", img: "/assets/images/img-1.jpg", icon: "/assets/images/service_block_4.svg" }, - { slug: "misting-solutions", title: "Promist Misting Solutions", img: "/assets/images/IMG-9.jpg", icon: "/assets/images/why_feature_6.svg" }, + { slug: "misting-solutions", title: "Promist Misting Solutions", img: "/assets/images/IMG-9.jpg", icon: "/assets/images/why_feature_6.svg", external: true }, { slug: "chiller-hot-cool-solutions", title: "Chiller Hot & Cool Solution", img: "/assets/images/IMG-4.jpg", icon: "/assets/images/title_icon2.svg" }, { slug: "building-management-system", title: "Building Management System", img: "/assets/images/bms.jpg", icon: "/assets/images/why_feature_2.svg" }, { slug: "interior-fit-out-works", title: "Interior & Fit-Out Work", img: "/assets/images/IMG-6.jpg", icon: "/assets/images/why_feature_1.svg" }, @@ -73,7 +73,13 @@ export default function HomeServicesSection() { {s.title}
-

{s.title}

+

+ {s.external ? ( + {s.title} + ) : ( + {s.title} + )} +

diff --git a/src/components/sections/ContactForm.jsx b/src/components/sections/ContactForm.jsx index 9deccc4..ba2c4c3 100644 --- a/src/components/sections/ContactForm.jsx +++ b/src/components/sections/ContactForm.jsx @@ -1,48 +1,89 @@ +import { useState } from 'react' + export default function ContactForm({ heading, subtitle, style = 'default' }) { const light = style === 'light' - const wrapperClass = light - ? 'input-light ajax-contact pb-30 pb-md-0' - : 'ajax-contact' + const [form, setForm] = useState({ name: '', email: '', phone: '', subject: '', message: '' }) + + const handleChange = (e) => { + setForm(prev => ({ ...prev, [e.target.name]: e.target.value })) + } + + const handleSubmit = (e) => { + e.preventDefault() + const { name, email, phone, subject, message } = form + const body = encodeURIComponent( + `Name: ${name}\nEmail: ${email}\nPhone: ${phone}\nSubject: ${subject}\n\n${message}` + ) + const mailto = `mailto:info@profeng.ae?subject=${encodeURIComponent(subject || 'Contact Form')}&body=${body}` + window.location.href = mailto + } + return ( -
+
{heading &&

{heading}

} -
-

    -
    -
    -
    - - {light ? : } -
    -
    - - {light ? : } -
    -
    - - {light ? : } -
    -
    - - - - {light ? : } -
    -
    - - {light ? : } -
    -
    - -
    + +
    +
    + + + + {light ? : }
    - -
    +
    + + + + {light ? : } +
    +
    + + + + {light ? : } +
    +
    + + + + {light ? : } +
    +
    + + + + {light ? : } +
    +
    + +
    +
    +
    ) } diff --git a/src/components/sections/Header.jsx b/src/components/sections/Header.jsx index f18c2ef..035b4d4 100644 --- a/src/components/sections/Header.jsx +++ b/src/components/sections/Header.jsx @@ -12,7 +12,7 @@ const NAV_ITEMS = [ const SERVICE_SUBITEMS = [ { label: 'Adiabatic Pre-Cooling System', slug: 'adiabatic-pre-cooling-system' }, - { label: 'Promist Misting Solutions', slug: 'misting-solutions' }, + { label: 'Promist Misting Solutions', slug: 'misting-solutions', external: true }, { label: 'Chiller Hot & Cool Solution', slug: 'chiller-hot-cool-solutions' }, { label: 'Building Management System', slug: 'building-management-system' }, { label: 'Interior & Fit-Out Work', slug: 'interior-fit-out-works' }, @@ -62,7 +62,11 @@ export default function Header() { @@ -140,7 +144,11 @@ export default function Header() { @@ -160,7 +168,7 @@ export default function Header() {
    - + Promist