Refactor GalleryController to use the same grid for category and home page display