When to use
Use image gallery to display multiple images in a row. Each image has a text overlay that has a background color and is linked to a webpage. The font size and weight of the text overlay and the opacity of the background color can be customized.
Basic usage
Attributes
Use the following 9 attributes to customize the image gallery:
order
The order attribute determines if the images are ordered in a row or in a column. In case the attribute is empty, the default order is row.
image
The image attribute determines what images to display. Separate the URLs of the images by comma with no space in between.
alt
The alt attribute lets you define the alt text for the images included in the “image” attribute. The ALTs are separated by a comma with no space in between.
Example: [image-gallery alt="img description,img description"]
link
The link attribute lets you define what page an image links to. The URLs are separated by a comma with no space in between.
title
The title attribute defines the text overlay at the bottom of the image. The default value is “Title 1” and “Title 2“. Titles are separated by the pipe character | with no space in between.
font-size
The font-size attribute lets you set the size of the text overlay. The default value is “16px“.
font-weight
The font-weight attribute defines how bold or light the text appears. The default value is “normal“. You can set it using one of the following numeric values:
- font-weight=”100″
- font-weight=”200″
- font-weight=”300″
- font-weight=”400″ (normal)
- font-weight=”500″
- font-weight=”600″
- font-weight=”700″ (bold)
- font-weight=”800″
- font-weight=”900″
or a keyword value:
- font-weight=”normal”
- font-weight=”bold”
or a relative value:
- font-weight=”lighter”
- font-weight=”bolder”
bgcolor
The bgcolor attribute defines the background color of the text overlay. The default value is black (#000000). Use the color’s hex value in the #xxxxxx format.
bg-opacity
The bg-opacity attribute lets you set the opacity/transparency of the background color of the text overlay. The default value is 0.75. You can give a value between 0.0 and 1.0. The lower the value, the more transparent the background color is.
quantity
The quantity attribute specifies how many images in a row. The default value is 2. You can set it to display 3, 4, or 6 images in a row.
Important! This attribute cannot be used alone, if you set it to 3, 4 or 6, you’ll need to update the image, link, and title attributes as well.
Code
Rendering
You can use any combination of the above attributes. Please contact help@library.illinois.edu for questions and comments.