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

Redesign media cards #656

Merged
merged 23 commits into from
Aug 2, 2024
Merged

Redesign media cards #656

merged 23 commits into from
Aug 2, 2024

Conversation

Splines
Copy link
Member

@Splines Splines commented Jul 1, 2024

🌟 Fixes/Features

With this PR, we pimp up the styling of media-related cards, e.g. those for lectures, scripts, quizzes etc.
Highlights are marked in bold.

  • Customize the media grid for the cards such that buttons don't break. Also added another 5th column for very large screens
  • Use dark blue "MaMpf color" and border to improve contrast ratio of cards
  • Use Bootstrap icons for consistency (instead of material icons)
  • Make buttons actual buttons. This has many advantages: the buttons now stand out visually, they have an automatic hover effect and the "click area" is the area of the whole button, not just the area of the little icon. Also increase accessibility by actually labeling the anchor links as role="button".
  • Decrease size of "Download mp4/pdf" buttons to make other buttons more prominent
  • Use light background gradient on cards with colors that better match our "MaMpf blue" in terms of shades
  • Add hover effect over the screenshot for the main purpose of the card, e.g. play video, open PDF, play quiz
  • Add slight shiny effect below cursor when a card is hovered. This is mostly visible on the beforementioned hover effect over the screenshot.
  • Add grid pattern as placeholder for media when no screenshot is present, e.g. for quizzes or for lectures without a screenshot
  • Add drop shadow on hover to cards
  • Crop screenshots slightly such that scrollbars are not shown in many screenshots

Additionally:

  • Also fixed badge hovers (they should not be hoverable except if they are lecture-tags)
  • Watchlist entries now use the same layout as the MaMpf cards so that we don't have duplicated code

📷 Screenshots

Before

image

After

image
image

@Splines Splines self-assigned this Jul 1, 2024
@Splines Splines changed the title Feature/cards glass Redesign media cards Jul 1, 2024
Also added a default empty screenshot
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev@bf7c6dc). Learn more about missing BASE report.

Files Patch % Lines
app/helpers/talks_helper.rb 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #656   +/-   ##
======================================
  Coverage       ?   53.09%           
======================================
  Files          ?      153           
  Lines          ?     6614           
  Branches       ?        0           
======================================
  Hits           ?     3512           
  Misses         ?     3102           
  Partials       ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Splines Splines marked this pull request as draft July 3, 2024 15:27
@Splines Splines marked this pull request as ready for review July 3, 2024 17:55
Copy link
Collaborator

@fosterfarrell9 fosterfarrell9 left a comment

Choose a reason for hiding this comment

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

LGTM! Looks very nice now. I played around with it a lot and everything works fine.

@Splines
Copy link
Member Author

Splines commented Aug 1, 2024

Thanks ;) Is there anything left to do since you posted this as a comment and not as approval?

@Splines Splines merged commit 742ee15 into dev Aug 2, 2024
5 checks passed
@Splines Splines deleted the feature/cards-glass branch August 2, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants