ProjectPythia/cookbook-gallery

More flexible layout of gallery cards

Opened this issue · 2 comments

The current single-column layout of the Cookbook Gallery works well on mobile devices but not so great on larger screens. I think the gallery will look better and also be easier to navigate with a multi-column view of gallery cards that automatically collapses to single-column on smaller devices. Why not see all Cookbooks together on one screen if you're working on a larger display?

For comparison, take a look at the (mostly defunct) Pangeo gallery:
http://gallery.pangeo.io

That one defaults to a three-column layout on larger windows but seamlessly transitions to two- or one-column layouts in narrower windows.

The same comment applies to our single-column Resource Gallery. Both galleries are generated by very similar code, so there's scope to solve two problems simultaneously.

Just wanted to throw in another example:
https://unidata.github.io/MetPy/latest/examples/index.html

sphinx-design has markdown and rst syntax for creating responsive grids and cards in sphinx-generated sites (eg jupyter books.) Could be a low-barrier solution for this.

MetPy uses sphinx-design for the home cards, but uses sphinx-gallery for the example gallery listed above (generated from a directory of python scripts, so somewhat different use-case.)