Digital pattern library

Gallery

The gallery pattern is backwards-compatible with previous implementations used on the University of St Andrews website – see old gallery option below, which used the jQuery theatre plugin. This support will be removed at some point, so please do not use the old gallery markup.

The gallery pattern demonstrates a method of displaying a large number of images on a page and makes use of the Lightbox JavaScript library to view the images in an immersive experience.

Options available


Code

Multiple galleries

Top and bottom row are two separate galleries. Each gallery needs to have a unique data-lightbox='[gallery name]' to group photos together.

Code

This is the deprecated gallery implementation, using the jQuery theatre plugin.

Code