Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix : the SeoPageTemplate component (#739)
abhix4deb14ec76e31
diff --git a/apps/web/components/seo/SeoPageTemplate.tsx b/apps/web/components/seo/SeoPageTemplate.tsxindex 038635e64..3e38b1d7e 100644--- a/apps/web/components/seo/SeoPageTemplate.tsx+++ b/apps/web/components/seo/SeoPageTemplate.tsx@@ -3,8 +3,7 @@import { SeoPageContent } from "@/components/seo/types";import { Button } from "@cap/ui";import MuxPlayer from "@mux/mux-player-react";-import { motion } from "framer-motion";-import { useEffect } from "react";+const renderHTML = (content: string) => {const styledContent = content.replace(@@ -15,61 +14,6 @@ const renderHTML = (content: string) => {return <span dangerouslySetInnerHTML={{ __html: styledContent }} />;};-// Left Blue Hue Component-const LeftBlueHue = () => {- return (- <svg- className="absolute top-10 -left-24 z-0 opacity-20 pointer-events-none md:opacity-100"- width="1276"- height="690"- viewBox="0 0 1276 690"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <g filter="url(#blue-hue-filter)">- <ellipse- cx="592"- cy="339"- rx="584"- ry="251"- transform="rotate(180 592 339)"- fill="url(#blue-hue-gradient)"- />- </g>- <defs>- <filter- id="blue-hue-filter"- x="-92"- y="-12"- width="1368"- height="702"- filterUnits="userSpaceOnUse"- colorInterpolationFilters="sRGB"- >- <feFlood floodOpacity="0" result="BackgroundImageFix" />- <feBlend- mode="normal"- in="SourceGraphic"- in2="BackgroundImageFix"- result="shape"- />- <feGaussianBlur stdDeviation="50" result="blur-effect" />- </filter>- <linearGradient- id="blue-hue-gradient"- x1="1102.5"- y1="339"- x2="157.5"- y2="375.5"- gradientUnits="userSpaceOnUse"- >- <stop stopColor="#75A3FE" />- <stop offset="1" stopColor="white" stopOpacity="0" />- </linearGradient>- </defs>- </svg>- );-};export const SeoPageTemplate = ({content,@@ -78,44 +22,7 @@ export const SeoPageTemplate = ({content: SeoPageContent;showVideo?: boolean;}) => {- useEffect(() => {- const animateClouds = () => {- const cloud4 = document.getElementById("cloud-4");- const cloud5 = document.getElementById("cloud-5");-- if (cloud4 && cloud5) {- cloud4.animate(- [- { transform: "translateX(0) translateY(0)" },- { transform: "translateX(-10px) translateY(5px)" },- { transform: "translateX(10px) translateY(-5px)" },- { transform: "translateX(0) translateY(0)" },- ],- {- duration: 15000,- iterations: Infinity,- easing: "ease-in-out",- }- );-- cloud5.animate(- [- { transform: "translateX(0) translateY(0)" },- { transform: "translateX(10px) translateY(-5px)" },- { transform: "translateX(-10px) translateY(5px)" },- { transform: "translateX(0) translateY(0)" },- ],- {- duration: 18000,- iterations: Infinity,- easing: "ease-in-out",- }- );- }- };- animateClouds();- }, []);return (<>@@ -143,190 +50,10 @@ export const SeoPageTemplate = ({</Button></div></div>-- {/** Header BG */}- <div className="w-full mx-auto overflow-hidden h-[830px] absolute top-0 left-0 z-0">- <motion.div- animate={{- x: [0, "30vw"],- top: 340,- opacity: [0.7, 0.5],- }}- transition={{- duration: 6,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute opacity-70 top-[340px] -left-[200px] z-[9]- w-full max-w-[1800px] h-[100px] bg-gradient-to-l from-transparent via-white/90 to-white"- style={{- borderRadius: "100%",- mixBlendMode: "plus-lighter",- filter: "blur(50px)",- }}- />- <motion.div- initial={{- right: -200,- top: 150,- opacity: 0.25,- }}- animate={{- right: [-200, 400],- opacity: [0.25, 0.1, 0.25],- }}- transition={{- duration: 6,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute mix-blend-plus-lighter z-[9] w-full max-w-[800px] h-[200px]- blur-[60px] rounded-full bg-gradient-to-r from-transparent via-white to-white"- />-- <LeftBlueHue />-- {/** Clouds - Exactly matching HomePage */}- <motion.img- style={{- mixBlendMode: "plus-lighter",- }}- initial={{- right: 100,- top: 50,- rotate: 180,- }}- animate={{- x: "-100vw",- }}- transition={{- duration: 500,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute w-full max-w-[500px] z-[5] select-none"- src="/illustrations/bottomcloud.webp"- alt="bottomcloudthree"- />- <motion.img- style={{- mixBlendMode: "plus-lighter",- }}- animate={{- x: [0, "100vw"],- }}- transition={{- duration: 300,- repeat: Infinity,- repeatType: "reverse",- }}- className="absolute- top-[180px] w-full max-w-[280px] z-[4] right-[60px] md:right-[600px] select-none"- src="/illustrations/smallcloudthree.webp"- alt="smallcloudfour"- />- <motion.img- style={{- mixBlendMode: "screen",- }}- animate={{- x: [0, "100vw"],- }}- transition={{- duration: 100,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute top-[20px] left-[-60px] md:left-[-400px] select-none z-[5] pointer-events-none"- src="/illustrations/bottomcloud.webp"- alt="bottomcloudthree"- />- <img- className="absolute- top-[180px] w-full max-w-[400px] z-0 select-none right-[60px] opacity-30 pointer-events-none"- src="/illustrations/smallcloudthree.webp"- alt="smallcloudthree"- />- <motion.img- style={{- mixBlendMode: "screen",- }}- animate={{- x: [0, "-100vw"],- }}- transition={{- duration: 120,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute- bottom-[240px] w-full max-w-[430px] z-[1] right-[40px] select-none opacity-80 brightness-125 pointer-events-none"- src="/illustrations/smallcloudtwo.webp"- alt="smallcloudtwo"- />- <img- style={{- mixBlendMode: "screen",- }}- className="absolute- w-full max-w-[500px] top-[210px] right-[300px] z-[2] select-none brightness-125 pointer-events-none"- src="/illustrations/chipcloud.webp"- alt="chipcloudtwo"- />- <motion.img- style={{- mixBlendMode: "screen",- }}- initial={{- x: -200,- rotate: 180,- }}- animate={{- x: [-200, "100vw"],- }}- transition={{- duration: 200,- repeat: Infinity,- repeatType: "reverse",- ease: "linear",- }}- className="absolute- w-full max-w-[500px] bottom-[15px] select-none left-[-200px] lg:left-[30px] z-[10] pointer-events-none"- src="/illustrations/chipcloud.webp"- alt="chipcloudfour"- />- <img- className="absolute- w-full max-w-[500px] top-[160px] select-none mix-blend-screen left-[-200px] lg:left-[30px] z-[10] pointer-events-none"- src="/illustrations/chipcloud.webp"- alt="chipcloud"- />- <img- className="absolute bottom-[-200px] -left-[500px] select-none z-[5] pointer-events-none"- src="/illustrations/bottomcloud.webp"- alt="bottomcloud"- />- <img- className="absolute bottom-[-90px] right-[-400px] select-none z-[5] pointer-events-none"- src="/illustrations/bottomcloud.webp"- alt="bottomcloudtwo"- />- </div>-- {/** Right Blue Hue */}- <div- className="w-[868px] h-[502px] bg-gradient-to-l rounded-full blur-[100px]- absolute top-20 z-[0] right-0 from-[#A6D7FF] to-transparent"- /></div>{/* Main Content */}- <div className="wrapper py-24 bg-gradient-to-b from-white to-gray-50 relative z-10">+ <div className="wrapper py-24 relative z-10">{/* Features Section */}<div className="mb-28"><div className="text-center max-w-[800px] mx-auto mb-16">@@ -338,7 +65,7 @@ export const SeoPageTemplate = ({{renderHTML(content.featuresDescription)}</p></div>- <div className="grid grid-cols-1 md:grid-cols-3 gap-8">+ <div className="grid grid-cols-1 md:grid-cols-3 gap-8 px-4">{content.features.map((feature, index) => (<divkey={index}@@ -468,7 +195,7 @@ export const SeoPageTemplate = ({</h2></div><div className="overflow-x-auto">- <table className="w-full max-w-4xl mx-auto bg-gray-1 rounded-xl shadow-md">+ <table className="w-full max-w-4xl mx-auto bg-gray-1 shadow-md rounded-2xl overflow-hidden"><thead className="bg-blue-50"><tr>{content.comparisonTable.headers.map((header, index) => (@@ -485,9 +212,7 @@ export const SeoPageTemplate = ({{content.comparisonTable.rows.map((row, rowIndex) => (<trkey={rowIndex}- className={- rowIndex % 2 === 0 ? "bg-gray-1" : "bg-gray-50"- }+ className={rowIndex % 2 === 0 ? "bg-gray-1" : "bg-gray-50"}>{row.map((cell, cellIndex) => (<td@@ -516,7 +241,7 @@ export const SeoPageTemplate = ({{renderHTML(content.useCasesDescription)}</p></div>- <div className="grid grid-cols-1 md:grid-cols-2 gap-8">+ <div className="grid grid-cols-1 md:grid-cols-2 gap-8 px-4">{content.useCases.map((useCase, index) => (<divkey={index}@@ -625,45 +350,26 @@ export const SeoPageTemplate = ({{/* Final CTA Section */}<div- className="wrapper max-w-[1000px] mx-auto rounded-3xl overflow-hidden relative flex flex-col justify-center p-12"+ className="max-w-[1000px] mx-auto rounded-3xl overflow-hidden relative flex flex-col justify-center border border-gray-5 p-12 bg-white"style={{minHeight: "300px",- background:- "linear-gradient(135deg, #4f46e5 0%, #3b82f6 50%, #0ea5e9 100%)",+ backgroundImage: "url('/illustrations/ctabg.svg')",+ backgroundSize: "cover",+ backgroundRepeat: "no-repeat",}}>- <div- id="cloud-4"- className="absolute top-0 -right-20 opacity-30 z-0 pointer-events-none transition-transform duration-700 ease-in-out"- >- <img- className="max-w-[40vw] h-auto"- src="/illustrations/cloud-1.png"- alt="Footer Cloud One"- />- </div>- <div- id="cloud-5"- className="absolute bottom-0 left-0 opacity-30 z-0 pointer-events-none transition-transform duration-700 ease-in-out"- >- <img- className="max-w-[40vw] h-auto"- src="/illustrations/cloud-2.png"- alt="Footer Cloud Two"- />- </div><div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10"><div className="text-center max-w-[800px] mx-auto mb-8">- <h2 className="text-3xl md:text-4xl font-medium text-white mb-4 drop-shadow-md">+ <h2 className="text-3xl md:text-4xl font-medium text-gray-12 mb-4 drop-shadow-md">{content.cta.title}</h2>- <p className="text-xl text-white/90 mb-6">+ <p className="text-xl text-gray-10 mb-6">Ready to get started? Download now and see the difference.</p></div><div className="flex flex-col sm:flex-row items-center justify-center space-y-3 sm:space-y-0 sm:space-x-4"><Button- variant="white"+ variant="blue"href="/pricing"size="lg"className="w-full sm:w-auto transition-all duration-300 font-medium px-8 py-3"