Gallery: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
</gallery> | </gallery> | ||
=From [https://www.mediawiki.org/wiki/Help:Images#Rendering_a_gallery_of_images MediaWiki]= | |||
==== Mode parameter ==== | |||
Starting in 1.22 a mode parameter is available, taking options as follows: | |||
*<code>traditional</code> is the original gallery type used by MediaWiki. | |||
*<code>nolines</code> is similar to traditional, but with no border lines. | |||
*<code>packed</code> causes images to have the same height but different widths, with little space between the images. The rows in this responsive mode organize themselves according to the width of the screen. | |||
*<code>packed-overlay</code> shows the caption overlaid on the image, in a semi-transparent white box. | |||
*<code>packed-hover</code> is similar to packed-overlay, but with the caption and box only showing up on hover. | |||
*<code>slideshow</code> creates a slideshow of the images. | |||
====Optional gallery attributes==== | |||
The gallery tag itself takes several additional parameters, specified as attribute name-value pairs: | |||
<pre> | |||
<gallery {parameters}> | |||
{images} | |||
</gallery> | |||
</pre> | |||
*<code>caption="{caption}"</code>: (caption text between double quotes for more than a word) sets a caption centered atop the gallery. Only plain text may be used in the caption; formatting, templates and the like will not work. | |||
*<code>widths={width}px</code>: sets the (max) widths of the images; the default value is 120px. Note the plural: widths. | |||
*<code>heights={heights}px</code>: sets the (max) heights of the images; the default value is 120px. | |||
*<code>perrow={integer}</code>: sets the number of images per row. 0 means automatically adjust based on width of screen. | |||
*<code>showfilename={anything}</code>: Show the filenames of the images in the individual captions for each image (1.17+). | |||
*<code>mode={traditional|nolines|packed|packed-hover|packed-overlay|slideshow}</code>: See section above (1.22+; 1.28+ for "slideshow"). | |||
*<code>showthumbnails</code>: For "slideshow" mode only, display the strip with image thumbnails below the slideshow by default (1.29+). |
Revision as of 21:45, 25 December 2019
Gallery template:
Filename - FreeCAD -File:D3Dfinalassemblyv1902.fcstd
From MediaWiki
Mode parameter
Starting in 1.22 a mode parameter is available, taking options as follows:
traditional
is the original gallery type used by MediaWiki.nolines
is similar to traditional, but with no border lines.packed
causes images to have the same height but different widths, with little space between the images. The rows in this responsive mode organize themselves according to the width of the screen.packed-overlay
shows the caption overlaid on the image, in a semi-transparent white box.packed-hover
is similar to packed-overlay, but with the caption and box only showing up on hover.slideshow
creates a slideshow of the images.
Optional gallery attributes
The gallery tag itself takes several additional parameters, specified as attribute name-value pairs:
<gallery {parameters}> {images} </gallery>
caption="{caption}"
: (caption text between double quotes for more than a word) sets a caption centered atop the gallery. Only plain text may be used in the caption; formatting, templates and the like will not work.widths={width}px
: sets the (max) widths of the images; the default value is 120px. Note the plural: widths.heights={heights}px
: sets the (max) heights of the images; the default value is 120px.perrow={integer}
: sets the number of images per row. 0 means automatically adjust based on width of screen.showfilename={anything}
: Show the filenames of the images in the individual captions for each image (1.17+).mode={traditional|nolines|packed|packed-hover|packed-overlay|slideshow}
: See section above (1.22+; 1.28+ for "slideshow").showthumbnails
: For "slideshow" mode only, display the strip with image thumbnails below the slideshow by default (1.29+).