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

Row layout with fixed height and dynamic width #57

Closed
etchings13 opened this issue Jun 25, 2018 · 8 comments
Closed

Row layout with fixed height and dynamic width #57

etchings13 opened this issue Jun 25, 2018 · 8 comments

Comments

@etchings13
Copy link

etchings13 commented Jun 25, 2018

Fantastic plugin. I'm wondering if there's any way to include an option where each row would have a static height while the widths of the images would change dynamically? For example all images could be set at 300 pixels tall? The number of images in each row would then also be dynamic.

In fact Google Photos does something even more advanced. Within an album, each row might vary from 300-400 pixels tall (on my screen). The specific height of each row is automatically calculated to accommodate the total width of the row (multiple photos) to be 1440 pixels. But within each row, every photo is always the same height as it's neighbor which makes for a nice gallery setup. Here's an example of the CSS to implement this:
xieranmaya/blog#6

@marekdedic marekdedic changed the title Fixed Height / Dynamic Width? Row layout with fixed height and dynamic width Jun 25, 2018
@marekdedic marekdedic added this to the Speculative features milestone Jun 25, 2018
@marekdedic
Copy link
Contributor

Hi, thanks for the feedback. I've had the same idea (#53) and I am glad there is more support for this layout. The linked post is a good explanation and I will look into it more.

@etchings13
Copy link
Author

Awesome, I hadn't seen you were already looking in to this! Looking forward to it seeing it implemented.

@marekdedic
Copy link
Contributor

@marekdedic
Copy link
Contributor

I've implemented this in the "justified" branch if you want to try it before it is merged and released

@etchings13
Copy link
Author

This is exactly what I was hoping for, thank you so much! I did come across two small issues (though I'd still use it whether or not these get fixed):

  1. The "Item spacing" option doesn't seem to do anything for me, all images are always at 0 spacing.
  2. Would it be possible to have each row centered instead of left-aligned? Or maybe a dynamic item spacing similar to fully-justified text in books? Nit-picky but I thought I'd throw it out there just in case - not sure if others' preferences are the same as mine.

@marekdedic
Copy link
Contributor

marekdedic commented Jul 3, 2018

Oh, I think both of those are bugs - 1. definitely
The second one - I am not sure if I understand it correctly but the intended behaviour is that the gallery fills the whole available width. If that is not the case, than that's a bug.

I've done some work since and merged it into master, could you please try it with the updated version? If there are still problems, could you please send me an address so that I could look at it? Either here in the issue, or at genabitu@gmail.com.

Thank you for your feedback and help.

@etchings13
Copy link
Author

Working exactly as expected now. Thanks again!

@kalich5
Copy link
Member

kalich5 commented Jul 6, 2018

ok :-)

@kalich5 kalich5 closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants