diff --git a/public/plebdevs-banner.jpg b/public/plebdevs-banner.jpg new file mode 100644 index 0000000..028d79c Binary files /dev/null and b/public/plebdevs-banner.jpg differ diff --git a/src/components/banner/HeroBanner.js b/src/components/banner/HeroBanner.js new file mode 100644 index 0000000..e389123 --- /dev/null +++ b/src/components/banner/HeroBanner.js @@ -0,0 +1,45 @@ +import React, { useEffect, useState } from 'react'; +import Image from 'next/image'; + +const HeroBanner = () => { + const options = ['Bitcoin', 'Lightning', 'Nostr']; + const [currentOption, setCurrentOption] = useState(0); + const [fade, setFade] = useState(true); + + useEffect(() => { + const interval = setInterval(() => { + setFade(false); + setTimeout(() => { + setCurrentOption((prevOption) => (prevOption + 1) % options.length); + setFade(true); + }, 700); // Half the interval time + }, 1500); // Change text every 2 seconds + + return () => clearInterval(interval); + }, []); + + return ( +
+ Banner +
+

Learn how to code

+

+ Build{' '} + + {options[currentOption]} + + {' '}apps +

+

Become a Bitcoin developer

+
+
+ ); +}; + +export default HeroBanner; diff --git a/src/components/courses/CoursesCarousel.js b/src/components/courses/CoursesCarousel.js index c6b5a83..b6c3245 100644 --- a/src/components/courses/CoursesCarousel.js +++ b/src/components/courses/CoursesCarousel.js @@ -8,6 +8,24 @@ import { useImageProxy } from '@/hooks/useImageProxy'; import { parseEvent } from '@/utils/nostr'; import { formatTimestampToHowLongAgo } from '@/utils/time'; +const responsiveOptions = [ + { + breakpoint: '1199px', + numVisible: 3, + numScroll: 1 + }, + { + breakpoint: '767px', + numVisible: 2, + numScroll: 1 + }, + { + breakpoint: '575px', + numVisible: 1, + numScroll: 1 + } +]; + export default function CoursesCarousel() { const courses = useSelector((state) => state.events.courses); const [processedCourses, setProcessedCourses] = useState([]); @@ -48,7 +66,7 @@ export default function CoursesCarousel() { return ( <>

courses

- + ); } diff --git a/src/components/navbar/Navbar.js b/src/components/navbar/Navbar.js index 83a946a..2fb2512 100644 --- a/src/components/navbar/Navbar.js +++ b/src/components/navbar/Navbar.js @@ -13,6 +13,8 @@ const Navbar = () => { const menu = useRef(null); + const navbarHeight = '60px'; + const menuItems = [ { label: 'Home', @@ -85,10 +87,18 @@ const Navbar = () => { ); return ( - + <> +
+ +
+ {/* Placeholder div with the same height as the Navbar */} +
+ ); }; diff --git a/src/components/sidebar/Sidebar.js b/src/components/sidebar/Sidebar.js index e45d3d0..4ffd5c2 100644 --- a/src/components/sidebar/Sidebar.js +++ b/src/components/sidebar/Sidebar.js @@ -12,7 +12,7 @@ const Sidebar = () => { }; return ( -
+
router.push('/')} className={`w-full cursor-pointer hover:bg-gray-700 rounded-lg ${isActive('/') ? 'bg-gray-700' : ''}`}>

Home

diff --git a/src/pages/_app.js b/src/pages/_app.js index 7f9f614..580aa94 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -15,12 +15,12 @@ export default function MyApp({ - +
-
+
diff --git a/src/pages/details/[slug].js b/src/pages/details/[slug].js index 37415f8..9394777 100644 --- a/src/pages/details/[slug].js +++ b/src/pages/details/[slug].js @@ -55,8 +55,8 @@ export default function Details() { }, [event]); return ( -
- router.push('/')} /> +
+ router.push('/')} />
diff --git a/src/pages/index.js b/src/pages/index.js index b665f24..ce5bdcf 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -2,6 +2,7 @@ import Head from 'next/head' import React, {useCallback, useEffect, useState} from 'react'; import CoursesCarousel from '@/components/courses/CoursesCarousel' import WorkshopsCarousel from '@/components/workshops/WorkshopsCarousel' +import HeroBanner from '@/components/banner/HeroBanner'; import { useNostr } from '@/hooks/useNostr' export default function Home() { @@ -21,6 +22,7 @@ export default function Home() {
+
diff --git a/src/pages/profile.js b/src/pages/profile.js index c20507d..f3a401b 100644 --- a/src/pages/profile.js +++ b/src/pages/profile.js @@ -59,7 +59,7 @@ const Profile = () => { return ( <> -
+
{user.avatar && (