docs: refactor/extract demo components to modules#225
Merged
ibrahimcesar merged 12 commits intomainfrom Nov 20, 2025
Merged
Conversation
β¦ modules This refactoring improves maintainability and organization of the demo application by: ## Component Modularization - Created `/demo/components/` folder structure with: - `Header.js` - Page header with title, description, and version info - `Footer.js` - Footer with resource links - `Navigation.js` - Quick navigation component - `/examples/` folder containing 11 separate example components - Reduced `demo/pages/index.js` from 1,249 lines to 178 lines (86% reduction) - Each example is now self-contained in its own file for easier maintenance ## CSS Module Extraction - Created dedicated CSS module files: - `Navigation.module.css` - Navigation component styles - `Footer.module.css` - Footer component styles - `EventsExample.module.css` - EventsExample component styles (40+ classes) - Removed all inline styles from: - Navigation.js (reduced from 54 to 24 lines) - Footer.js (removed all inline styles) - EventsExample.js (removed 150+ lines of inline style objects) ## Benefits - β Better code organization and separation of concerns - β Easier to locate and edit specific examples - β Cleaner git diffs for future changes - β Improved performance (styles compiled at build time) - β Consistent styling pattern across all components - β Better maintainability with scoped CSS modules ## Technical Details - All functionality preserved - no breaking changes - Proper use of CSS modules with scoped class names - Template literals for combining multiple CSS classes - Maintained all existing component features and event handlers π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added 5rem padding-bottom to .madeWidth class to improve visual spacing at the bottom of the page. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Merged latest changes from main branch, incorporating the publishConfig addition for npm package publication settings. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Install all-contributors-cli package - Add All Contributors badge to README - Create Contributors section in README - Add Nate (@natesct) as first contributor for bug report (#222) - Add npm scripts for managing contributors This enables recognizing all types of contributions including bug reports, documentation, code, and more. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create automated workflow to add contributors via GitHub UI - Support all contribution types with dropdown selection - Automatically creates PR with contributor changes - Add comprehensive CONTRIBUTORS.md guide This makes it easy to recognize all types of contributions including bug reports, documentation, code, and more. Usage: 1. Go to Actions β Add Contributor 2. Fill in username and contribution type 3. Workflow creates a PR automatically π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create script to automatically add all git contributors - Add all-contributors:add-historical npm script - Successfully added 10+ historical code contributors - Update CONTRIBUTORS.md with historical import guide Contributors added: - @ibrahimcesar (repository owner) - @tmcw, @avaleriani (auto-detected) - @lachlanjc, @perbergland, @humet - @afzalsayed96, @LichLord91, @FunctionDJ - @theodorusclarence, @elbotho Script features: - Parses git log for all committers - Extracts GitHub usernames from emails - Optional GitHub API integration for better detection - Lists contributors needing manual addition Usage: npm run contributors:add-historical π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Install Docusaurus 3.9 in demo/docs folder - Configure for react-lite-youtube-embed project - Update branding, URLs, and navigation - Disable blog, focus on documentation - Install local package for live examples - Set up for GitHub Pages deployment Next steps: - Create video-focused homepage - Add documentation pages - Migrate examples from Next.js demo To run docs locally: cd demo/docs && npm start π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace default homepage with custom video-first design - Add live LiteYouTubeEmbed demo prominently in hero section - Create "Why" section with 6 key features (Fast, Private, Tiny, etc.) - Add Quick Start section with install/usage code - Add Performance Comparison table (iframe vs lite embed) - Implement beautiful gradient hero with glassmorphism - Add video stats display (< 5KB, ~500KB saved, 0 cookies) - Fully responsive design with mobile optimizations - Dark mode support with adjusted gradients The homepage now immediately demonstrates the component with a real embedded video, making the value prop crystal clear. π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move demo/docs to top-level docs/ - Delete old demo folder (Next.js examples) - Update docusaurus.config.ts editUrl path - Update .gitignore for top-level docs This simplifies the project structure and makes documentation more prominent. To run docs: cd docs && npm start π€ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Resolved conflicts in .gitignore by merging both branches - Kept simplified README from refactor branch - Removed demo files that were refactored out - Regenerated package-lock.json from main branch - Integrated badge updates and build improvements from main
Contributor
size-limit report π¦
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New documentation