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

Allow changing post card-Image aspect ratio #802

Closed
m29h opened this issue Apr 29, 2024 · 3 comments · Fixed by #809
Closed

Allow changing post card-Image aspect ratio #802

m29h opened this issue Apr 29, 2024 · 3 comments · Fixed by #809
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@m29h
Copy link

m29h commented Apr 29, 2024

Currently post/card-img aspect ratio seems to be determined by fixed height of 160pixels and variable width 100%

Practically this gives an aspect ratio that is quite wide. I would prefer being able to adjust this aspect ratio by increasing image height. Can the height be put into user configurable parameter maybe? Also the resizing height of thumbnail image (currently hardwired to 360px should change accordingly)
Thank you

@razonyang razonyang added enhancement New feature or request good first issue Good for newcomers labels Apr 30, 2024
@razonyang
Copy link
Member

It's good to have, may happen in this week.

@razonyang
Copy link
Member

Available since github.com/hbstack/blog@v0.31.0, see #809 to detailed usage.

@razonyang
Copy link
Member

razonyang commented May 1, 2024

Please keep in mind that, for the sake of alignment and responsiveness, most of the time, the display image is incomplete.
So change the height may not very helpful.

peek_1.mp4

But you can either change the height as 100% or add custom style to show full image all the time, but it may not look good if list_cols_md and list_cols_lg are large than 1.

// params.yaml
hb:
  blog:
    post_thumbnail_height: '100%'

Or

.hb-blog-post-card-img {
  object-fit: contain;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants