Skip to content

Commit

Permalink
add about section
Browse files Browse the repository at this point in the history
  • Loading branch information
SakinduRansindu committed Nov 14, 2024
1 parent 8ca2cfe commit 7ea9721
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { MultiStepLoader } from "@/components/ui/multi-step-loader";
import { HeroHighlight, Highlight } from "@/components/ui/hero-highlight";
import { Highlighter } from "@/components/blocks/hilight";
import { HomeIcon, ClockIcon , MegaphoneIcon , PhoneArrowUpRightIcon } from "@heroicons/react/24/solid";
import { TextGenerateEffect } from "@/components/ui/text-generate-effect";


export const products = [
Expand Down Expand Up @@ -288,7 +289,8 @@ export default function Home() {
{ text: "Are You Ready?"},
{ text: "2025" },
];


const content:string = " \"Are You Ready?\" stands as a monumental initiative led by the Rotaract Club of the University of Moratuwa in partnership with the Career Guidance Unit. Our primary focus is 4th year undergraduates from our university, aiming to guide them towards a secure entry into the professional world. The scope of this endeavor knows no bounds, with over 100 companies aligning to provide opportunities for budding professionals. This project promises to be a valuable asset for those aspiring to forge strong connections with companies and their managers, even if the finish line of their degree is still on the horizon. In the initial stages, participants will gain the essential knowledge and training to confidently engage with industry experts."

return (
<RootLayout>
Expand All @@ -297,6 +299,13 @@ export default function Home() {
<MultiStepLoader loop={false} loading={isLoading} loadingStates={loaderSteps} duration={600} exitCallback={()=>setIsLoading(false)} />

<HeroParallax products={products}/>

<div className="w-1/2 px-5 py-5 pb-12 mx-auto">
<p className="text-2xl text-center font-bold dark:text-custom-color-800 text-custom-dark-color-800 p-2 py-3">
About Are You Ready?
</p>
<TextGenerateEffect words={content} />
</div>

<div id="timeline">
{
Expand Down
62 changes: 62 additions & 0 deletions src/components/ui/text-generate-effect.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"use client";
import { useEffect } from "react";
import { motion, stagger, useAnimate } from "framer-motion";
import { cn } from "@/lib/utils";

export const TextGenerateEffect = ({
words,
className,
filter = true,
duration = 0.1,
}: {
words: string;
className?: string;
filter?: boolean;
duration?: number;
}) => {
const [scope, animate] = useAnimate();
let wordsArray = words.split(" ");
useEffect(() => {
animate(
"span",
{
opacity: 1,
filter: filter ? "blur(0px)" : "none",
},
{
duration: duration ? duration : 1,
delay: stagger(0.1),
}
);
}, [scope.current]);

const renderWords = () => {
return (
<motion.div ref={scope}>
{wordsArray.map((word, idx) => {
return (
<motion.span
key={word + idx}
className="dark:text-white text-black opacity-0"
style={{
filter: filter ? "blur(10px)" : "none",
}}
>
{word}{" "}
</motion.span>
);
})}
</motion.div>
);
};

return (
<div>
<div className="mt-4">
<div className=" dark:text-custom-dark-color-400 text-custom-color-400 text-md leading-snug tracking-wide">
{renderWords()}
</div>
</div>
</div>
);
};

0 comments on commit 7ea9721

Please sign in to comment.