diff --git a/app/[locale]/book-demo/page.tsx b/app/[locale]/book-demo/page.tsx index e1fa6922..5984060e 100644 --- a/app/[locale]/book-demo/page.tsx +++ b/app/[locale]/book-demo/page.tsx @@ -110,7 +110,7 @@ const BookDemoPage = () => { window.removeEventListener('message', handleCalendlyEvent); document.body.removeChild(script); }; - }, []); + }, [handleCalendlyEvent]); return (
diff --git a/app/[locale]/company/about-us/page.tsx b/app/[locale]/company/about-us/page.tsx index 278fa244..1a0d44ae 100644 --- a/app/[locale]/company/about-us/page.tsx +++ b/app/[locale]/company/about-us/page.tsx @@ -1,6 +1,5 @@ 'use client'; -import '@/app/theme.css'; import Image from 'next/image'; import { useRouter } from 'next/navigation'; @@ -45,7 +44,7 @@ function WhoWeAre() { return (

@@ -68,7 +67,7 @@ function FoundingTeam() { return (

@@ -125,7 +124,7 @@ function WhatWeOffer() { return (

@@ -148,7 +147,7 @@ function Investors() { return (

@@ -197,7 +196,7 @@ function GetStarted() { return (

@@ -208,17 +207,15 @@ function GetStarted() {

-

@@ -227,7 +224,7 @@ function GetStarted() { const AboutPage = () => { return ( -
+
diff --git a/app/[locale]/pricing-rt/page.tsx b/app/[locale]/pricing-rt/page.tsx index 6eb5084f..cfbf2d09 100644 --- a/app/[locale]/pricing-rt/page.tsx +++ b/app/[locale]/pricing-rt/page.tsx @@ -42,10 +42,10 @@ const Pricing = () => { ]; return ( -
+

{t.pricing.realTimeApi.title}

diff --git a/app/[locale]/solutions/compliance/autorater/page.tsx b/app/[locale]/solutions/compliance/autorater/page.tsx index 46edf36c..2a7c5598 100644 --- a/app/[locale]/solutions/compliance/autorater/page.tsx +++ b/app/[locale]/solutions/compliance/autorater/page.tsx @@ -8,7 +8,7 @@ const AutoRaterSolutionsPage = () => { const { t } = useTranslation(); return ( -
+
{ const solutionPages = t.solutionPages; return ( -
+
{ const solutionPages = t.solutionPages; return ( -
+
{ const solutionPages = t.solutionPages; return ( -
+
= ({ fileType, fileUrl }) => const renderContent = () => { if (fileType === 'application/pdf') { return ( -
+
@@ -33,14 +34,14 @@ const DocumentViewer: React.FC = ({ fileType, fileUrl }) => fileType === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ) { return ( -
+
{/* */}
); } else if (fileType.startsWith('image/')) { return ( -
+
Document { +const Heading = ({ title, subtitle, center, white, customClass }: HeadingProps) => { return (

{title}

diff --git a/app/components/HtmlAttributes.tsx b/app/components/HtmlAttributes.tsx index f6602002..f9320243 100644 --- a/app/components/HtmlAttributes.tsx +++ b/app/components/HtmlAttributes.tsx @@ -25,6 +25,30 @@ export default function HtmlAttributes() { document.documentElement.classList.add('ltr'); document.documentElement.classList.remove('rtl'); } + + // Sync theme class from body to html element + const syncTheme = () => { + const bodyClasses = document.body.classList; + if (bodyClasses.contains('dark')) { + document.documentElement.classList.add('dark'); + document.documentElement.classList.remove('light'); + } else if (bodyClasses.contains('light')) { + document.documentElement.classList.add('light'); + document.documentElement.classList.remove('dark'); + } + }; + + // Initial sync + syncTheme(); + + // Watch for theme changes on body + const observer = new MutationObserver(syncTheme); + observer.observe(document.body, { + attributes: true, + attributeFilter: ['class'], + }); + + return () => observer.disconnect(); }, [pathname]); return null; diff --git a/app/components/SimpleButton.tsx b/app/components/SimpleButton.tsx index 426018c2..cc4f3157 100644 --- a/app/components/SimpleButton.tsx +++ b/app/components/SimpleButton.tsx @@ -7,50 +7,43 @@ interface SimpleButtonProps { onClick?: (e: React.MouseEvent) => void; disabled?: boolean; small?: boolean; + compact?: boolean; icon?: Icon; labelIcon?: Icon; } -const SimpleButton = ({ label, onClick, disabled, small, icon: Icon, labelIcon: LabelIcon }: SimpleButtonProps) => { +const SimpleButton = ({ + label, + onClick, + disabled, + small, + compact, + icon: Icon, + labelIcon: LabelIcon, +}: SimpleButtonProps) => { + const baseClasses = [ + 'relative', + 'disabled:opacity-70', + 'disabled:cursor-not-allowed', + 'rounded-xl', + 'bg-neutral-200', + 'hover:bg-cambio-blue-0', + 'hover:text-white', + 'transition', + 'text-neutral-600', + compact + ? 'px-4 py-2 text-sm font-medium w-auto' + : small + ? 'py-3 text-lg w-full font-semibold' + : 'py-4 text-3xl w-full font-semibold', + ].join(' '); + return ( - ); diff --git a/app/components/YoutubeFacade.tsx b/app/components/YoutubeFacade.tsx index d8e47c38..d008c0b2 100644 --- a/app/components/YoutubeFacade.tsx +++ b/app/components/YoutubeFacade.tsx @@ -23,6 +23,7 @@ const YouTubeFacade = ({ videoId }: YouTubeFacadeProps) => { /> ) : (
+ {/* eslint-disable-next-line @next/next/no-img-element */} YouTube video thumbnail
+ {/* eslint-disable-next-line @next/next/no-img-element */} {logo.alt} { const { t, locale } = useTranslation(); return ( -
+

Footer

-
+
- +
{socialLinks.map((socialLink) => ( @@ -47,11 +47,15 @@ const Footer = () => {
diff --git a/app/components/homepage/Banners.tsx b/app/components/homepage/Banners.tsx index 6401491c..31fad4b2 100644 --- a/app/components/homepage/Banners.tsx +++ b/app/components/homepage/Banners.tsx @@ -1,12 +1,9 @@ 'use client'; -import '@/app/theme.css'; import { motion } from 'framer-motion'; import { imgPrefix } from '@/app/hooks/useImgPrefix'; -import { useRouter } from 'next/navigation'; import { useTranslation } from '@/lib/use-translation'; import Container from '../Container'; -import Button from '../Button'; import Image from 'next/image'; import CodeBlock from '../CodeBlock'; @@ -28,7 +25,7 @@ const Banner = ({ title, description, actionLabel, action, inverse, imgPath, cod
{description}
-
{imgPath && (
)} {code && ( -
+
)} @@ -71,22 +78,30 @@ const Banner = ({ title, description, actionLabel, action, inverse, imgPath, cod }; const Banners = () => { - const router = useRouter(); const { t, locale } = useTranslation(); return ( -
+
{t.homepage.banners.map( (banner: { title: string; description: string; actionLabel: string }, index: number) => ( -
+
router.push(index === 0 ? `/${locale}/anyparser` : `/${locale}/account`)} + action={() => { + if (index === 0) { + window.open('https://app.energent.ai', '_blank', 'noopener,noreferrer'); + } else { + window.open(`/${locale}/account`, '_blank', 'noopener,noreferrer'); + } + }} inverse={index === 1} imgPath={index === 0 ? '/images/homepage/banner-1.png' : undefined} code={ diff --git a/app/components/homepage/Capabilities.tsx b/app/components/homepage/Capabilities.tsx index 06e0ebc2..f9d4741d 100644 --- a/app/components/homepage/Capabilities.tsx +++ b/app/components/homepage/Capabilities.tsx @@ -1,6 +1,5 @@ 'use client'; -import '@/app/theme.css'; import { motion } from 'framer-motion'; import { useTranslation } from '@/lib/use-translation'; import Container from '../Container'; @@ -15,7 +14,7 @@ interface CapabilityCardProps { const CapabilityCard = ({ description, index }: CapabilityCardProps) => { return ( { const { t } = useTranslation(); return ( -
+
{ transition={{ duration: 0.6 }} viewport={{ once: true }} > -

+

{t.homepage.capabilities.title}

diff --git a/app/components/homepage/Customers.tsx b/app/components/homepage/Customers.tsx index f187c25a..815042ca 100644 --- a/app/components/homepage/Customers.tsx +++ b/app/components/homepage/Customers.tsx @@ -34,12 +34,13 @@ const Customers = () => {
- +
{customers.map((customer, i) => (
+ {/* eslint-disable-next-line @next/next/no-img-element */} {customer.alt} { key={card.title + i} className="w-[300px] h-[300px] bg-cambio-primary rounded-xl hover:shadow-lg transition duration-300 ease-in-out" > + {/* eslint-disable-next-line @next/next/no-img-element */} {card.image && {card.title}} {card.icon && }
@@ -83,7 +84,7 @@ const Differentiators = () => {
- +
{differentiators.map((differentiator, i) => ( { + const router = useRouter(); + const { t, locale } = useTranslation(); + const [isPlaying, setIsPlaying] = useState(false); + + const playVideo = () => { + setIsPlaying(true); + }; + + return ( +
+
+ {/* Main content */} + + + +
+ +

+ {t.homepage.hero.title} +

+
+ {t.homepage.hero.subtitle} +
+
+
+ + +
+
+
+ {isPlaying ? ( +