Plots2: Fix Aspect Ratio for thumbnail grid Images

Created on 5 Jan 2019  路  5Comments  路  Source: publiclab/plots2

Builds on #4198. There are a few things that PR missed. (The grid on /micro still has the aspect ratio issue) The grid on /micro is generated with this template:
https://github.com/publiclab/plots2/blob/master/app/views/grids/_thumbnail.html.erb
(Thanks to @jywarren, who located it :D)

If there are any other places on the site were you find the images look a bit squashed or cut off, please link to that here. Thanks!

design enhancement fto-candidate good first issue help wanted

All 5 comments

For an example of how we manage to make all images have the same aspect ratio, see this page: https://publiclab.org/research

And the code that drives it here:

https://github.com/publiclab/plots2/blob/03812548111b0831e82052cd559aeea9a380098a/app/views/dashboard/_node_default.html.erb#L6-L10

See how the images are all the same ratio:

image

Compare this to the grid at https://publiclab.org/micro, which uses the above thumbnail grids code:

image

Thanks @dinaelhanan !!!

4350 is related too

Hey! I would like to work on this!

Hey @harsh1599, please go ahead! Thanks!

Was this page helpful?
0 / 5 - 0 ratings