update gallery layout and style