diff --git a/src/App.jsx b/src/App.jsx
index a471245..975fa56 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,26 +1,32 @@
// src/App.jsx
-import React from 'react';
-
+import React, { useState } from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
-
import Header from './components/Header';
import Footer from './components/Footer';
import Home from './components/Home';
import About from './components/About';
import Roadmap from './components/Roadmap';
-const App = () => (
-
-
-
-
- } />
- } />
- } />
-
-
-
-
-);
+const App = () => {
+ const [menuOpen, setMenuOpen] = useState(false);
-export default App;
+ const handleMenuToggle = (isOpen) => {
+ setMenuOpen(isOpen);
+ };
+
+ return (
+
+
+
+
+ } />
+ } />
+ } />
+
+
+
+
+ );
+};
+
+export default App;
\ No newline at end of file
diff --git a/src/components/Header.css b/src/components/Header.css
index 4f75eb2..32725b0 100644
--- a/src/components/Header.css
+++ b/src/components/Header.css
@@ -21,4 +21,30 @@
.link-underline:hover::after {
transform: scaleX(1);
transform-origin: bottom left;
+ }
+
+ /* Header.css */
+ @keyframes dropdown {
+ from {
+ opacity: 0;
+ transform: translateY(-10px);
+ }
+
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+ }
+
+ .animate-dropdown {
+ animation: dropdown 0.5s ease-in-out;
+ }
+
+ .page-content {
+ transition: margin-top 0.5s ease-in-out;
+ }
+
+ .page-content.dropdown-active {
+ margin-top: 150px;
+ /* Adjust based on the height of the dropdown menu */
}
\ No newline at end of file
diff --git a/src/components/Header.jsx b/src/components/Header.jsx
index 97edc23..fa1c240 100644
--- a/src/components/Header.jsx
+++ b/src/components/Header.jsx
@@ -1,17 +1,41 @@
+import { useState } from 'react';
import { Link } from 'react-router-dom';
import './Header.css'; // Import the custom CSS file
-const Header = () => (
-
-
- DoTechBro.org
-
-
-
-);
+const Header = ({ onMenuToggle }) => {
+ const [isOpen, setIsOpen] = useState(false);
+
+ const toggleMenu = () => {
+ setIsOpen(!isOpen);
+ onMenuToggle(!isOpen);
+ };
+
+ return (
+
+ );
+};
export default Header;
\ No newline at end of file
diff --git a/src/components/Home.css b/src/components/Home.css
new file mode 100644
index 0000000..d981a81
--- /dev/null
+++ b/src/components/Home.css
@@ -0,0 +1,23 @@
+/* Home.css */
+.page-content {
+ transition: margin-top 0.5s ease-in-out;
+}
+
+.page-content.dropdown-active {
+ margin-top: 150px;
+ /* Adjust based on the height of the dropdown menu */
+}
+
+@keyframes fadeIn {
+ from {
+ opacity: 0;
+ }
+
+ to {
+ opacity: 1;
+ }
+}
+
+.animate-fade-in {
+ animation: fadeIn 1s ease-in-out forwards;
+}
\ No newline at end of file
diff --git a/src/components/Home.jsx b/src/components/Home.jsx
index 68e175f..64e5a01 100644
--- a/src/components/Home.jsx
+++ b/src/components/Home.jsx
@@ -1,10 +1,40 @@
-import { useState } from 'react';
+import React, { useState, useEffect, useRef } from 'react';
import FeaturedRoadmaps from './FeaturedRoadmaps';
import MailingListDialog from './MailingListDialog';
import roadmaps from '../roadmaps.json';
+import './Home.css'; // Import the custom CSS file
const Home = () => {
const [dialogOpen, setDialogOpen] = useState(false);
+ const [menuOpen, setMenuOpen] = useState(false);
+ const sectionsRef = useRef([]);
+
+ useEffect(() => {
+ const observer = new IntersectionObserver(
+ (entries) => {
+ entries.forEach((entry) => {
+ if (entry.isIntersecting) {
+ entry.target.classList.add('animate-fade-in');
+ }
+ });
+ },
+ { threshold: 0.1 }
+ );
+
+ sectionsRef.current.forEach((section) => {
+ if (section) {
+ observer.observe(section);
+ }
+ });
+
+ return () => {
+ sectionsRef.current.forEach((section) => {
+ if (section) {
+ observer.unobserve(section);
+ }
+ });
+ };
+ }, []);
const handleDialogOpen = () => {
setDialogOpen(true);
@@ -14,51 +44,70 @@ const Home = () => {
setDialogOpen(false);
};
+ const handleMenuToggle = (isOpen) => {
+ setMenuOpen(isOpen);
+ };
return (
-
-
-
-
- Pivot into tech.
-
- with a head start
-
-
- Empowering minorities to overcome barriers and succeed in the tech industry with confidence.
+
+
+
(sectionsRef.current[0] = el)}
+ >
+
+
+ Pivot into tech.
+
+ with a head start
+
+
+ Empowering minorities to overcome barriers and succeed in the tech industry with confidence.
+
+
+
+
+
+
+
+
+
(sectionsRef.current[1] = el)}
+ >
+
+
+
+
(sectionsRef.current[2] = el)}
+ >
+
Testimonials
+
Coming soon...
+
+
+
(sectionsRef.current[3] = el)}
+ >
+
Join Our Community
+
+ Connect with like-minded individuals, share your journey, and get support from our community.
-
-
-
-
-
-
-
+
-
-
-
Testimonials
-
Coming soon...
-
-
-
-
Join Our Community
-
- Connect with like-minded individuals, share your journey, and get support from our community.
-
-
- Join Now
-
-
-
- )
+ );
};
export default Home;
\ No newline at end of file