Pure javascript based image grid module. see demo here.
So this Idea is also covered in other language and framework but I wanted to make it in a pure JS based scipt. I was so Excited to do this because this is the first time I could ever relate my application level problem to some mathematics problem, also first time when I used pure mathematical solution for my practical problem.
You can use this module implmentation when
- You want to display many picures on one web page.
- You think a square grid is a crap and
- You want the grid to leave no white spaces like other similar JS offer.
- You want to maintain aspect ratio.
- When you change your browser's dimension, it should automatically re-do rendering, again in a best way.
Module still lacks in few points and I'm aware of these points already:
- if Image is so small it'll streach image and that makes the grid look like a creepy pirate flag.
- Actions before images are loaded
- self display when everything is loaded
a few stills: