Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive main page #208

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Responsive main page #208

merged 4 commits into from
Nov 14, 2024

Conversation

cweihan01
Copy link
Contributor

@cweihan01 cweihan01 commented Nov 8, 2024

Overview

Fixes #203

Issues

Fix on left, original issue on right

  1. Unresponsive cards on main page
    main-page-comparison

  2. Unresponsive featured project on main page
    featured-project-comparison

  3. Project image covers entire view on small screens
    project-image-comparison

Changes

  • pages/index.tsx
    • Utilize column breakpoints in CSS library to handle responsiveness of "Projects", "Learning", "Events", "Contribute" cards
  • components/ProjectCard.tsx
    • Add useEffect hook to check for window size; for smaller screens, always render project card in vertical format
    • Restrict logo image within each project card to be a fraction of view height
  • styles/globals.css
    • Add necessary styles to support above changes

- responsive mobile view for 'projects', 'learning', 'events' and 'contribute' cards
- add a useEffect hook to `components/ProjectCard.tsx` to use a vertical layout for small screens
- fixes issue on main page where random project is not responsive
- Limit project image size on smaller windows by wrapping each image in a max-height container
Copy link
Contributor

@snigdha-kansal snigdha-kansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work, Wei! Thank you for doing this 🔥💯
Left couple minor comments, feel free to merge after addressing them
Thanks for keeping the changes minimal and making it easy to review :)

Shaun The Sheep

@cweihan01 cweihan01 merged commit 8437d88 into main Nov 14, 2024
6 checks passed
@cweihan01 cweihan01 deleted the responsive-main-page branch November 14, 2024 21:38
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.

Bug: Unresponsive Main Page
2 participants