Template:Gallery

From FlightGear wiki
Revision as of 12:56, 20 June 2014 by Johan G (talk | contribs) (Doc style)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 
The following template description is not displayed when the template is inserted in an article.

This template shows a gallery with up to 100 images in an array. The number of images per row is based upon the width specified and the width of the screen.

Usage

For the overall gallery

{{gallery
| title  = 
| width  = 
| height = 
| lines  = 
| align  = 
| footer = 

| image line
 ...
| image line
}}

These parameters are optional.

title
Title of the gallery
width
Maximum width of each image in pixels. Defaults to 180.
height
Maximum height of each image in pixels. Defaults to 180.
lines
Number of text lines needed for the largest caption. Blank lines are appended to smaller captions. A caption that does not fit is cut off. Defaults to 2.
align
The horizontal alignment of the gallery. Valid values are left, center and right. Defaults to center.
footer
Small right-aligned text below the images.
image line
See #For each image below. There can currently be up to 100 such lines. If no image line is present the gallery will default to a one single image with a question mark.

For each image

Specify a line in the following form for each image.

| file name | alt(n)=alt text | caption
file name
Name of the image file excluding the File: or Image: prefix.
alt(n)
Where n should be 1 for the first image, 2 for the second image etc.
alt text
Alt text for the image. Will be used in screen readers, for visually impaired readers etc.
caption
Image caption to be shown below the image.

Example

{{gallery
| title  = Lighter than air
| width  = 160
| height = 110
| lines  = 2
| align  = center
| footer = In-sim screenshots of lighter-than-air aircraft in FlightGear.

| Zeppelin_NT.jpg | [[Zeppelin NT]]
| ZF_Navy_free_balloon.jpg | This is a [[ZF Navy free balloon]] as used for initial lighter-than-air training during the 1920s to 1940s.
| Submarine_Scout.jpg | [[Submarine Scout]]
| Zeppelin_LZ_121_Nordstern.jpg | [[Zeppelin LZ 121 Nordstern]]
}}
Lighter than air
This is a ZF Navy free balloon as used for initial lighter-than-air training during the 1920s to 1940s.  
In-sim screenshots of lighter-than-air aircraft in FlightGear.