import React, { useLayoutEffect, useRef } from 'react'; import { Sidebar } from './components/Sidebar'; import { GUIDE_CONTENT } from './constants'; import { ContentRenderer } from './components/ContentRenderer'; import { GitBranch, ArrowDown, Leaf } from 'lucide-react'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; gsap.registerPlugin(ScrollTrigger); const App: React.FC = () => { const mainRef = useRef(null); const heroRef = useRef(null); const titleRef = useRef(null); const subtitleRef = useRef(null); useLayoutEffect(() => { const ctx = gsap.context(() => { const mm = gsap.matchMedia(); // Desktop Animations mm.add("(min-width: 768px)", () => { // Hero Animation const tl = gsap.timeline(); tl.fromTo(titleRef.current, { y: 50, opacity: 0, rotate: 2 }, { y: 0, opacity: 1, rotate: 0, duration: 1, ease: "power3.out" } ) .fromTo(subtitleRef.current, { y: 20, opacity: 0 }, { y: 0, opacity: 1, duration: 0.8, ease: "power2.out" }, "-=0.5" ); // Section Entry Animations const sections = gsap.utils.toArray('.guide-section'); sections.forEach(section => { gsap.fromTo(section, { opacity: 0, y: 50 }, { opacity: 1, y: 0, duration: 0.8, ease: "power2.out", scrollTrigger: { trigger: section, start: "top 80%", toggleActions: "play none none reverse" } } ); }); }); // Mobile Animations (Simplified) mm.add("(max-width: 767px)", () => { gsap.set([titleRef.current, subtitleRef.current], { opacity: 1, y: 0, rotate: 0 }); const sections = gsap.utils.toArray('.guide-section'); sections.forEach(section => { gsap.fromTo(section, { opacity: 0 }, { opacity: 1, duration: 0.5, ease: "power1.out", scrollTrigger: { trigger: section, start: "top 90%", toggleActions: "play none none reverse" } } ); }); }); }, mainRef); return () => ctx.revert(); }, []); return (
{/* Hero Section */}
{/* Subtle blurred blobs */}
Interactive Guide

Git Guide
for Sylvi 🌿

Welcome! This guide will walk you through version control from the ground up. Think of it as a time machine for your code—save snapshots, experiment freely, and never lose your work again.

Scroll to start learning
{/* Content Sections */}
{GUIDE_CONTENT.map((section, index) => (
{index + 1}

{section.title.split('. ')[1]}

{section.blocks.map((block, i) => ( ))}
{index < GUIDE_CONTENT.length - 1 && (
)}
))} {/* Footer */}
); }; export default App;