Skip to content

Add Positron to homepage hero#2048

Open
gregswinehart wants to merge 4 commits into
mainfrom
gs/homepage-hero
Open

Add Positron to homepage hero#2048
gregswinehart wants to merge 4 commits into
mainfrom
gs/homepage-hero

Conversation

@gregswinehart
Copy link
Copy Markdown
Collaborator

Summary

Modernizes the homepage hero animation by replacing MP4 videos with Lottie JSON animations, providing better editability, smaller file sizes, and improved loop transitions.

Before

Screenshot 2026-06-02 at 12 30 28 PM Screenshot 2026-06-02 at 12 29 55 PM

After

Screenshot 2026-06-02 at 12 30 14 PM Screenshot 2026-06-02 at 12 30 18 PM

Changes

Animation System

  • Replace MP4 video animations with Lottie JSON format for both light and dark modes
  • Add graceful fade-out at end of animation loop (layers fade sequentially for smooth transition)
  • Fine-tune animation properties:
  • Layer 3 (foreground document): scales to 70%, positioned at x:148, fades to 65% opacity
  • Staggered fade-out timing: layer 3 fades frames 1440-1490, layers 1-2 fade frames 1459-1509
  • Update dark mode hero banner background color to #1C2F3D

Lottie Implementation

  • Self-host lottie-web library (v5.12.2) instead of CDN for reliability and offline support
  • Add Subresource Integrity (SRI) hash for security verification
  • Load script once with defer attribute for optimal performance
  • Wrap animation initialization in DOMContentLoaded for proper timing

File Organization

  • images/hero-dark/ - Dark mode animation JSON + image assets (img_0.png, img_1.png, img_2.png)
  • images/hero-light/ - Light mode animation JSON + image assets (same structure)
  • js/lottie.min.js - Self-hosted animation library
  • Remove old MP4 files: hero_animation.mp4, hero_animation_dark.mp4

🤖 Generated with Claude Code

gregswinehart and others added 4 commits June 2, 2026 12:11
Download and self-host lottie-web 5.12.2 to eliminate external CDN
dependency and improve reliability for offline/restricted networks.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ents

- Load lottie.min.js once instead of twice (removed duplicate from light-content)
- Add defer attribute for non-blocking page load
- Add SRI integrity hash for security verification
- Wrap loadAnimation calls in DOMContentLoaded for deferred script compatibility
- Switch from CDN to self-hosted library

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gregswinehart gregswinehart requested a review from cscheid June 2, 2026 16:31
@gregswinehart
Copy link
Copy Markdown
Collaborator Author

@cscheid are you ok with bringing in lottie.min.js locally to do these animations?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

📝 Preview Deployment

🔍 Full site preview: https://deploy-preview-2048.quarto.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant