Skip to main content

Gallery Code

The code for rendering user galleries is very complex. Some details here in case I forget them (as has happened before...)

Element ID standards

${prefix}gallery-image-${elementName}-${userArtworkID}
  • Prefix: a prefix defined for a given gallery. The default gallery has an empty string prefix; other galleries have prefixes to allow them to be distinguished from the default gallery, such as album galleries.

  • Element name: the name of the element, such as nsfw-overlay or similar.

  • User artwork ID: the internal ID of the artwork, i.e. an integer.

Dynamic resizing

GalleryEvent prefixesPropagation

UsedStopping event propagation is enabled on some elements, to denoteprevent separate galleriesclicks on thee.g. samean page,NSFW asoverlay a prefixheading to the startartwork oflink.

each

 gallery

element's

 ID.