Display subGallery name on extendedGallery page if there are multiple subGalleries
jpvalery opened this issue · comments
Is your feature request related to a problem? Please describe.
I removed the title of the subGallery so it woldn't display. Indeed, most of my extendedGallery just have a single subGallery. Thus, it wouldn't make much sense to have it displayed twice.
However, now that I'm putting out more galleries with multiple subGalleries, I'd like to have the title displayed.
Describe the solution you'd like
A way to conditionally display the name of the subGalleries if they are more than 1 in the page.
If multiple subGalleries, display <name of the subGallery>, else do not display it
Additional info
Pretty sure it's src/templates/gallery.js that needs to be fine tuned (lines 22 to 34 i presume)
Any help or suggestion is welcome :)
Rough idea: would using first and last of type css selectors do the trick?
https://css-tricks.com/almanac/selectors/f/first-of-type/
https://www.w3schools.com/csSref/sel_last-of-type.asp
Or even only-of-type? https://www.w3schools.com/cssref/sel_only-of-type.asp
Tried it a bit and ran into an issue as every gallery is contain in a different div.
So only-of-type
for h2
always apply.
I need to find a way to do div:only-of-type h2 (?)
Possible with Tailwind only:
but not relevant anymore.