-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Using book cover sizes to prevent layout shifting #10145
Open
anna-ayn
wants to merge
21
commits into
internetarchive:master
Choose a base branch
from
anna-ayn:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+102
−17
Conversation
This file contains 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
…adjust image height to covers in already-lists
…-covers-in-lists Added width and height to image elements for covers in lists
…-covers-in-lists Fix linter issues
…diciones Fixes the height of the cover in editions main page
Estandarización de tamaños de las portadas de libros en carruseles
…e-libros-en-el-explorador-de-biblioteca A new container is added and the size of the covers is standardized
…static/css/components/search-result-item.less file.
Removal of the property 'width' from the .bookcover component in the …
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.
Closes #9739
feature
Technical
width
andheight
methods to theImage
class inopenlibrary/core/models.py
to retrieve image dimensions.OLCarousel.vue
component to include acover-container
div and set default cover image dimensions. Also added responsive styles for different screen sizes.createActiveShowcaseItem
function inShowcaseItem.js
to accept adesiredHeight
parameter and set image dimensions dynamically based on the aspect ratio.book.less
andlistLists.less
styles to set fixed dimensions for cover images, ensuring consistent layout across different components.search-result-item.less
to remove the.bookcover
class and ensure consistent image sizing.index.less
to remove themax-width
constraint on images within the content body.book_cover.html
template to calculate and set the height of the cover image dynamically based on its aspect ratio.lists/home.html
template to calculate and set the height of the cover image dynamically based on its aspect ratio.Testing
Screenshot
We have make videos demonstrating the changes and comparing with the real website of OpenLibrary;
https://drive.google.com/file/d/1RrzodyWAFDAS--mk5Y222Hjk95FYgMla/view?usp=sharing
https://drive.google.com/file/d/1BF7YWPcys6Ny2EuJ9ahkiIexsC1JjmCH/view?usp=sharing
https://drive.google.com/file/d/1UU0nRT32Oa0Bu_27FD6cN8tQES-QUqpQ/view?usp=sharing
https://drive.google.com/file/d/1qe68bcZtBNh2cbOEbi93z4s2u9XHgDtD/view?usp=sharing
https://drive.google.com/file/d/1rOheT5PNJi6iveGhcGpb589YsG9uEqXb/view?usp=drive_link
Stakeholders
@cdrini