Skip to content

Commit

Permalink
logo
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogita Jha committed Sep 22, 2024
1 parent e24a0a8 commit d99c780
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 41 deletions.
Binary file added client/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 10 additions & 41 deletions client/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,15 @@ import { motion } from "framer-motion";

const Home: React.FC = () => {
useEffect(() => {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');

if (!ctx) {
console.error('2D context not supported or canvas initialization failed.');
return;
}

canvas.width = 200;
canvas.height = 20;
ctx.font = '12px Arial';

const text = "Data Science Community Recruitments";
let textX = canvas.width;

const animate = () => {
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'white';
ctx.fillText(text, textX, 15);

textX--;
if (textX < -ctx.measureText(text).width) {
textX = canvas.width;
}

const link = document.querySelector("link[rel*='icon']") as HTMLLinkElement | null;
if (link) {
link.href = canvas.toDataURL();
}

requestAnimationFrame(animate);
};

animate();
const link = document.querySelector("link[rel*='icon']") as HTMLLinkElement || document.createElement('link');
link.rel = 'icon';
link.href = '/logo.png';
document.head.appendChild(link);
}, []);

return (
<div className="min-h-screen bg-gradient-to-b from-[#1E0D2D] to-[#0D0513] text-white font-sans">
<title>
Data Science Community Recruitments
</title>
<title>Data Science Community Recruitments</title>
<Header />
<main className="container mx-auto px-4 py-8 flex flex-col">
<motion.h1
Expand All @@ -64,21 +32,22 @@ const Home: React.FC = () => {
}}
className="text-3xl sm:text-5xl lg:text-6xl font-bold mb-8 text-center"
>
Data Science Community Recruitments
</motion.h1>
<section id="home" className="flex-grow">
<Introduction />
</section>
<History />
<section id="domain">
<div className="mt-36">
<Domain/>
<Domain />
</div>
</section>
<Hero/>
<Hero />
</main>
<Footer/>
<Footer />
</div>
);
};

export default Home;
export default Home;

0 comments on commit d99c780

Please sign in to comment.