Skip to content

Commit

Permalink
Merge branch 'crescents-stack:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
musiur authored Sep 18, 2024
2 parents 6b19d01 + e8e4267 commit 86b4491
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 162 deletions.
2 changes: 0 additions & 2 deletions src/app/services/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ const Services = async ({ params }: { params: { slug: string } }) => {
<UserEmpathyBanner data={userEmpathy} />
{reviews?.length ? <Testimonials data={reviews} /> : null}
<CoreBenefits data={coreBenefits} />
{/* <FeatureWithBar />
<FeatureWithGrid /> */}
<EndingFunnel data={endingFunnel} />
<Faq data={faq} />
</div>
Expand Down
20 changes: 12 additions & 8 deletions src/app/services/_utils/core-benefits.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ANIM__FadeInOutOnScroll from "@/components/anims/fadein.anim";
import ThreeDStar from "@/components/assets/three-d-star";
import { FeatureWithGrid } from "@/components/magicui/feature-with-grid";
import Tagline from "@/components/molecule/tagline";
import { ReactElement } from "react";

Expand All @@ -23,7 +24,7 @@ const CoreBenefits = ({
const { tagline, title, body } = data;
const { para, benefits } = body;
return (
<div className="py-[64px]">
<div className="py-[64px] space-y-8">
<ANIM__FadeInOutOnScroll className="container flex flex-col items-center justify-center gap-[32px]">
<Tagline text={tagline} />
<h2 className="h2 text-primary text-center [&>span]:text-secondary [&>span]:px-3">
Expand All @@ -33,7 +34,15 @@ const CoreBenefits = ({
{para}
</p>
</ANIM__FadeInOutOnScroll>
<ANIM__FadeInOutOnScroll className="container pt-[48px] grid grid-cols-1 sm:grid-cols-2 gap-10">
<FeatureWithGrid />
</div>
);
};

export default CoreBenefits;


{/* <ANIM__FadeInOutOnScroll className="container pt-[48px] grid grid-cols-1 sm:grid-cols-2 gap-10">
{benefits.map(
(item: {
id: number;
Expand All @@ -53,9 +62,4 @@ const CoreBenefits = ({
);
}
)}
</ANIM__FadeInOutOnScroll>
</div>
);
};

export default CoreBenefits;
</ANIM__FadeInOutOnScroll> */}
32 changes: 4 additions & 28 deletions src/app/services/_utils/what-and-why-section.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ANIM__FadeInOutOnScroll from "@/components/anims/fadein.anim";
import ThreeDStar from "@/components/assets/three-d-star";
import { FeatureWithBar } from "@/components/magicui/feature-with-bar";
import Tagline from "@/components/molecule/tagline";
import { ReactElement } from "react";

Expand All @@ -24,7 +24,7 @@ const WhatAndWhySection = ({
const { para, benefits } = body;

return (
<div className="py-16 bg-muted">
<div className="py-16 space-y-8">
<ANIM__FadeInOutOnScroll className="container flex flex-col items-center justify-center gap-[32px]">
<Tagline text={tagline} />
<h2 className="h2 text-primary text-center [&>span]:text-secondary [&>span]:px-3">
Expand All @@ -34,34 +34,10 @@ const WhatAndWhySection = ({
{para}
</p>
</ANIM__FadeInOutOnScroll>
<div className="container pt-[48px] space-y-10">
<div className="grid grid-cols-1 sm:grid-cols-2 gap-6 lg:grid-cols-3">
{benefits.map(
(item: {
id: number;
icon: ReactElement;
title: ReactElement;
paragraph: ReactElement;
}) => {
const { id, paragraph, icon } = item;
return (
<ANIM__FadeInOutOnScroll
key={id}
className="p-4 rounded-2xl border-2 border-white hover:border-secondary hover:scale-105 bg-white transition ease-in-out duration-500 hover:shadow-2xl"
>
<div className="space-y-[12px] p-2">
{<ThreeDStar />}
<h3 className="font-semibold">{item.title}</h3>
<p>{paragraph}</p>
</div>
</ANIM__FadeInOutOnScroll>
);
}
)}
</div>
</div>
<FeatureWithBar features={benefits} />
</div>
);
};

export default WhatAndWhySection;

98 changes: 56 additions & 42 deletions src/components/magicui/feature-with-bar.tsx
Original file line number Diff line number Diff line change
@@ -1,103 +1,117 @@
import { cn } from "@/lib/utils";
import { Cloud, DollarSign, Heart, HelpCircle, LineChart, Route, Square, Terminal } from "lucide-react";
import { ReactElement } from "react";

type Type__Feature = {
title: ReactElement;
paragraph: ReactElement;
icon: ReactElement;
id: number;
}


export function FeatureWithBar({features = defaultData}: {features?: typeof defaultData}) {
export function FeatureWithBar({features = defaultData}: {features?: Type__Feature[]}) {

return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 relative z-10 container section">
{features.map((feature, index) => (
<Feature key={feature.title} {...feature} index={index} />
))}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 relative z-10 container">
{features.map((feature) => {
const { id } = feature;
return (
<Feature key={id} {...feature} id={id} />
)
})}
</div>
);
}

const Feature = ({
title,
description,
paragraph,
icon,
index,
}: {
title: string;
description: string;
icon: React.ReactNode;
index: number;
}) => {
id,
}: Type__Feature) => {
return (
<div
className={cn(
"flex flex-col lg:border-r py-10 relative group/feature dark:border-neutral-800",
(index === 0 || index === 4) && "lg:border-l dark:border-neutral-800",
index < 4 && "lg:border-b dark:border-neutral-800"
(id === 0 || id === 4) && "lg:border-l dark:border-neutral-800",
id < 4 && "lg:border-b dark:border-neutral-800"
)}
>
{index < 4 && (
{id < 4 && (
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-t from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
)}
{index >= 4 && (
{id >= 4 && (
<div className="opacity-0 group-hover/feature:opacity-100 transition duration-200 absolute inset-0 h-full w-full bg-gradient-to-b from-neutral-100 dark:from-neutral-800 to-transparent pointer-events-none" />
)}
<div className="mb-4 relative z-10 px-10 text-neutral-600 dark:text-neutral-400">
<div className="mb-4 relative z-10 px-10 [&>svg]:h-8 [&>svg]:w-8 [&>svg]:stroke-[1.2px]">
{icon}
</div>
<div className="text-lg font-bold mb-2 relative z-10 px-10">
<div className="text-lg font-medium mb-2 relative z-10 px-10">
<div className="absolute left-0 inset-y-0 h-6 group-hover/feature:h-8 w-1 rounded-tr-full rounded-br-full bg-neutral-300 dark:bg-neutral-700 group-hover/feature:bg-blue-500 transition-all duration-200 origin-center" />
<span className="group-hover/feature:translate-x-2 transition duration-200 inline-block">
{title}
</span>
</div>
<p className="text-sm relative z-10 px-10">
{description}
{paragraph}
</p>
</div>
);
};

const defaultData = [
const defaultData: Type__Feature[] = [
{
title: "Built for developers",
description:
"Built for engineers, developers, dreamers, thinkers and doers.",
id: 1,
title: <>Built for developers</>,
paragraph:
<>Built for engineers, developers, dreamers, thinkers and doers.</>,
icon: <Terminal />,
},
{
title: "Ease of use",
description:
"It's as easy as using an Apple, and as expensive as buying one.",
id: 2,
title: <>Ease of use</>,
paragraph:
<>It&apos;s as easy as using an Apple, and as expensive as buying one.</>,
icon: <LineChart />,
},
{
title: "Pricing like no other",
description:
"Our prices are best in the market. No cap, no lock, no credit card required.",
id: 3,
title: <>Pricing like no other</>,
paragraph:
<>Our prices are best in the market. No cap, no lock, no credit card required.</>,
icon: <DollarSign />,
},
{
title: "100% Uptime guarantee",
description: "We just cannot be taken down by anyone.",
id: 4,
title: <>100% Uptime guarantee</>,
paragraph: <>We just cannot be taken down by anyone.</>,
icon: <Cloud />,
},
{
title: "Multi-tenant Architecture",
description: "You can simply share passwords instead of buying new seats",
id: 5,
title: <>Multi-tenant Architecture</>,
paragraph: <>You can simply share passwords instead of buying new seats</>,
icon: <Route />,
},
{
title: "24/7 Customer Support",
description:
"We are available a 100% of the time. Atleast our AI Agents are.",
id: 6,
title: <>24/7 Customer Support</>,
paragraph:
<>We are available a 100% of the time. Atleast our AI Agents are.</>,
icon: <HelpCircle />,
},
{
title: "Money back guarantee",
description:
"If you donot like EveryAI, we will convince you to like us.",
id: 7,
title: <>Money back guarantee</>,
paragraph:
<>If you donot like EveryAI, we will convince you to like us.</>,
icon: <Square />,
},
{
title: "And everything else",
description: "I just ran out of copy ideas. Accept my sincere apologies",
id: 8,
title: <>And everything else</>,
paragraph: <>I just ran out of copy ideas. Accept my sincere apologies</>,
icon: <Heart />,
},
];
44 changes: 16 additions & 28 deletions src/components/magicui/feature-with-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
import React from "react";
import { useId } from "react";

export function FeatureWithGrid({features = defaultData}: {features?: typeof defaultData}) {
export function FeatureWithGrid({ features = defaultData }: { features?: typeof defaultData }) {
return (
<div className="section">
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-10 md:gap-2 container">
{features.map((feature) => (
<div
key={feature.title}
className="relative bg-gradient-to-b dark:from-neutral-900 from-neutral-100 dark:to-neutral-950 to-white p-6 rounded-3xl overflow-hidden"
>
<Grid size={20} />
<p className="text-base font-bold text-neutral-800 dark:text-white relative z-20">
{feature.title}
</p>
<p className="text-neutral-600 dark:text-neutral-400 mt-4 text-base font-normal relative z-20">
{feature.description}
</p>
</div>
))}
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-10 md:gap-2 container">
{features.map((feature) => (
<div
key={feature.title}
className="relative bg-gradient-to-b dark:from-neutral-900 to-white p-6 rounded-xl overflow-hidden border"
>
<Grid size={20} />
<p className="font-medium pb-20">
{feature.title}
</p>
<p>
{feature.description}
</p>
</div>
))}
</div>
);
}
Expand Down Expand Up @@ -128,14 +126,4 @@ const defaultData = [
description:
"Monitor social media conversations and trends to stay informed about what your audience is saying and respond in real-time.",
},
{
title: "Customizable Templates",
description:
"Create stunning social media posts with our customizable templates, designed to fit your brand's unique style and voice.",
},
{
title: "Collaboration Tools",
description:
"Work seamlessly with your team using our collaboration tools, allowing you to assign tasks, share drafts, and provide feedback in real-time.",
},
];
Loading

0 comments on commit 86b4491

Please sign in to comment.