Repository navigation
feat: Add project preview thumbnails to project cards - #8483
nishtha-agarwal-211 wants to merge 22 commits into
Conversation
|
@nishtha-agarwal-211 is attempting to deploy a commit to the Dhairya Gothi 's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Projects are not showing |
…rate new previews
# Conflicts: # projects.json
|
Hey @dhairyagothi , Can you please review this pr when you have time! |
- Re-add project dhairyagothi#245 (Flashcard Quiz) to projects.json with previewImage - Restore skeleton shimmer loader CSS classes used by renderSkeletons() in index.js
|
Deployment failed with the following error: |
|
Hi @dhairyagothi ! Hope you're doing well. Just following up on this PR. It is up-to-date with main and ready for review whenever you get a chance. Thank you for your time and support! |
Description
Resolves #7956
This PR introduces visual screenshot previews (thumbnails) to all project cards on the homepage grid. Previously, the grid only displayed text metadata (title, description, tags), which made browsing less engaging. Adding visual thumbnails provides immediate visual context for each project, making the browsing experience significantly more premium, dynamic, and intuitive.
Key Changes
1. Centralized Preview Generation (
scripts/generate-previews.js)800x500(retaining the standard 16:10 / 1.6 aspect ratio for thumbnails) to ensure text and components are clearly readable.public/previews/directory (e.g.public/previews/<project_folder_name>.png) instead of scattering them in individual project directories.previews,images, andnode_modulesfrom screenshot generation.2. Auto-Mapped Metadata & Validation Fixes (
projects.json)previewImageproperty.3. Dynamic Card Rendering (
index.js)previewImagefield relative to the current URL base, maintaining compatibility for both the main homepage and the/contributors/directories.onerror="this.parentNode.style.display='none';"fallback so that cards gracefully revert to their clean text-only layout if their screenshot is missing.4. Styled Container & Smooth Hover Animation (
style.css).card-preview-image-containerand its inner image to enforce rounded corners, border accents, and a dark background mask.scale(1.05)) with ease transitions to make cards feel highly responsive and interactive.