Overview
Located insrc/components/HeroSection.tsx, this component creates a compelling first impression with:
- Interactive video player with play/pause controls
- Personal introduction with animated text effects
- Call-to-action buttons for presentations and resume
- Social media integration (GitHub, LinkedIn, Instagram, Email)
- Responsive design that adapts to all screen sizes
User Experience
Video Player Behavior
The hero section includes an intelligent video player that enhances engagement:- Initial State: Shows video thumbnail with a prominent play button overlay
- Playing: When clicked, video plays automatically with smooth fade-in
- After Playback: Replaces video with a static memoji image
- Re-watch: Play button reappears when user scrolls back to the section
The video player uses Intersection Observer API to detect when users return to the hero section, allowing them to replay the introduction video.
Visual Elements
Content Structure
Personal Information
The left side displays:- Badge: Animated badge with sparkle icon and welcoming message
- Name: Large gradient text displaying “André Ruperto”
- Role: Subtitle showing “Desenvolvedor & Cientista de Dados”
- Bio: Brief description of skills and expertise
Action Buttons
Three primary action buttons are provided:Apresentação
Links to a PDF presentation about André’s work and services
Importância de um Site
Educational PDF about the importance of having a professional website
Download Currículo
Direct download link for the resume (Google Drive integration)
Social Media Links
Social icons are rendered as circular buttons with hover effects:Animation System
The hero section uses staggered fade-in animations:- Badge: Appears at 0.1s delay
- Name & Title: Appears at 0.2s delay
- Description: Appears at 0.3s delay
- Buttons: Appears at 0.4s delay
- Social Links: Appears at 0.5s delay
- Video Container: Slides in from right at 0.3s delay
Background Pattern
A subtle SVG pattern creates visual interest:Responsive Design
Mobile (< 768px)
- Centered text alignment
- Full-width buttons
- Smaller video container (256px)
- Stacked layout
Tablet (768px - 1024px)
- Larger video container (320px)
- Maintained stacked layout
- Adjusted padding
Desktop (> 1024px)
- Two-column grid layout
- Left-aligned text
- Large video container (500px)
- Side-by-side content
Key Features
Intersection Observer
The component uses Intersection Observer to track visibility:State Management
Three key state variables control the video experience:hasPlayed: Tracks whether video has finished playingshowPlayButton: Controls play button visibilityvideoRef: Reference to video element for programmatic control
Assets Used
- Video:
intro-video.mp4- Introduction video - Image:
memoji-joia.png- Static image shown after video - PDFs:
André Ruperto - Apresentação.pdf,Importância de um Site.pdf
Integration
The Hero Section is typically placed at the top of the main portfolio page:The component is fully self-contained and doesn’t require any props, making it easy to integrate into any page structure.
