साँचा:Gallery/doc

मुक्त ज्ञानकोश विकिपीडिया से
नेविगेशन पर जाएँ खोज पर जाएँ

{{

 साँचा:namespace detect

| type = notice | image = | imageright = | class = | style = margin-bottom:1.0em; | textstyle = | text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }} साँचा:lua

This template provides advanced gallery building functionality (such as scrolling captions and fine-tuned formatting control). For creating basic galleries, use the Gallery tag.

This template displays a gallery of images in an array, left-to-right in rows. Global parameters साँचा:para and साँचा:para control the size of all images in the gallery unless overridden by an image's साँचा:para parameter. The number of images per row is based upon the image width parameters and the width of the screen. The number of images per row can change when the user resizes the window.

For style guidelines about where galleries are appropriate, see §Image galleries of Wikipedia's Image use policy.

Parameters

For each image

Specify a line of the following form for each image.

|File:Filename साँचा:para |Caption

Where:

|File:Filename – the image's file name. Either File: or Image: prefix may be used
साँचा:paraalt attribute: साँचा:para for the first image, साँचा:para for the second image, etc
Alt text – the alternative text for the image, used by visually impaired or other readers who cannot see the image clearly. If omitted, the image's alt text will be blank.
|Caption – the caption under the image; see Wikipedia:Manual of Style/Captions

Optional parameters

These parameters apply to the gallery:

साँचा:para – The gallery's title
साँचा:para – The alignment of the gallery on the page, left (default), center, or right; ignored when साँचा:para is set
साँचा:para – Small, right-aligned text below the images
साँचा:paraCSS style directives for the whole gallery (see Help:Cascading Style Sheets)
साँचा:para – Sets the default state of collapsible galleries; use साँचा:para or साँचा:para; collapsible galleries occupy the full page width

These parameters apply to all of the images in the gallery:

साँचा:para – Maximum height of each image. If this parameter is not included, साँचा:para defaults to 180 pixels.
साँचा:para – Maximum width of each image, default is 180 pixels.
साँचा:para – Width of each image cell or box, default is साँचा:para). If specified, साँचा:para overrides any value specified with साँचा:para.
साँचा:para – The number of text lines needed for the largest caption (default: 2 lines).
साँचा:paraCSS style directives for the captions (see Help:Cascading Style Sheets)

The image's original ratio of width to height cannot be modified by साँचा:para or साँचा:para – a rectangular image will not be made square if साँचा:para and साँचा:para are set to the same value.

These parameters apply to each image, separately:

साँचा:para (where n is a number) – specifies the width of image n when it needs to be different from the value specified by साँचा:para

Note that making an image wider with the साँचा:para parameter does not produce a wider caption, which will still be constrained by the साँचा:para parameter.

Examples

साँचा:pre2

साँचा:pre2

Note how in the above example, the parameter साँचा:para sets the width of image 4, to allow the dollar-bill image to be wider than the other images in the gallery. However, the width of the caption remains at 120px, as set by the साँचा:para parameter.

See also