pymc-examples
pymc-examples copied to clipboard
Improve visuals of the notebook gallery
The gallery is great, but there is definitely room for improvement. This is particularly noticeable since the core notebooks were added to the top of the page. The thumbnails are small and the full width of the central column of the page is not used.
I'm not sure, but can we fix this simply by editing the thumbnail size here?
https://github.com/pymc-devs/pymc-examples/blob/dce63a03b894d39a0a39a4773f9a0226078391c1/sphinxext/thumbnail_extractor.py#L26
Anyone know where the formatting code for the core notebooks is?
Example 1
Example 2
With a narrower browser window, the right bar becomes hidden (which is fine), but now we have 4 columns of notebooks rather than 3 for the regular notebooks. Not sure if this is set to fill available space.
Tagging @OriolAbril , @twiecki, @reshamas
cc: @symeneses, in case you have any ideas on sphinx.
I suspect it is a css and/or javascript issue with sphinx gallery but I have no idea for how to fix it.
Anyone know where the formatting code for the core notebooks is?
The grid and cards for core notebooks has no formatting code in our codebase. We use https://sphinx-design.readthedocs.io/en/sbt-theme/ and everything works straight out of the box
I bet it's because not getting picked up in https://github.com/pymc-devs/pymc-examples/blob/dce63a03b894d39a0a39a4773f9a0226078391c1/sphinxext/thumbnail_extractor.py#L93
How are the NBs from the pymc repo included?
They are manually (both name and image) included in https://github.com/pymc-devs/pymc-examples/blob/main/examples/gallery.rst#core-notebooks. They use a different approach to generate the grid and card view though, as they are not in this repo they can't be included via the gallery extension.
I see, but we could place a thumbnail into the thumbnail dir manually, no?
We can define an image for the card manually yes and put that image in the thumbnail dir or anywhere else
I have added some custom images in #539. They are in _thumbnails/core_notebooks
. I am not closing this issue though, I think it should be closed once someone makes those images have a more square ration so they look nicer or they are directly updated to something else that looks better and/or makes more sense