Template:Carousel: Difference between revisions
Template page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly><gallery mode="{{{mode|slideshow}}}" widths="{{{width|400}}}px" heights="{{{height|300}}}px"> | <includeonly><gallery mode="{{{mode|slideshow}}}" widths="{{{width|400}}}px" heights="{{{height|300}}}px"> | ||
File:{{{image1|}}} | |||
{{#if: {{{image2|}}}|File:{{{image2}}} | {{#if:{{{image2|}}}|File:{{{image2}}}}} | ||
{{#if: {{{image3|}}}|File:{{{image3}} | {{#if:{{{image3|}}}|File:{{{image3}}}}} | ||
{{#if: {{{image4|}}}|File:{{{image4}}} | {{#if:{{{image4|}}}|File:{{{image4}}}}} | ||
{{#if: {{{image5|}}}|File:{{{image5}}} | {{#if:{{{image5|}}}|File:{{{image5}}}}} | ||
{{#if: {{{image6|}}}|File:{{{image6}} | {{#if:{{{image6|}}}|File:{{{image6}}}}} | ||
{{#if: {{{image7|}}}|File:{{{image7}} | {{#if:{{{image7|}}}|File:{{{image7}}}}} | ||
{{#if: {{{image8|}}}|File:{{{image8}}} | {{#if:{{{image8|}}}|File:{{{image8}}}}} | ||
{{#if: {{{image9|}}}|File:{{{image9}}} | {{#if:{{{image9|}}}|File:{{{image9}}}}} | ||
{{#if: {{{image10|}}}|File:{{{image10}}} | {{#if:{{{image10|}}}|File:{{{image10}}}}} | ||
{{#if: {{{image11|}}}|File:{{{image11}} | {{#if:{{{image11|}}}|File:{{{image11}}}}} | ||
{{#if: {{{image12|}}}|File:{{{image12}}} | {{#if:{{{image12|}}}|File:{{{image12}}}}} | ||
</gallery>{{#if: {{{header|}}}| | </gallery>{{#if:{{{header|}}}| | ||
<p style="text-align: center; font-size: 18px; font-weight: bold; margin-top: 10px;">{{{header}}}</p>}}{{#if: {{{description|}}}| | <p style="text-align:center; font-size:18px; font-weight:bold; margin-top:10px;">{{{header}}}</p>}}{{#if:{{{description|}}}| | ||
<p style="text-align: center; font-size: 14px; color: #54595d; margin-top: 5px;">{{{description}}}</p>}}</includeonly><noinclude> | <p style="text-align:center; font-size:14px; color:#54595d; margin-top:5px;">{{{description}}}</p>}}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
== | == Usage == | ||
<pre> | <pre> | ||
{{Carousel | {{Carousel | ||
|mode = slideshow | |||
|width = 500 | |width = 500 | ||
|height = 350 | |height = 350 | ||
|image1 = Screenshot1.png | |image1 = Screenshot1.png | ||
|image2 = Screenshot2.png | |image2 = Screenshot2.png | ||
|image3 = Screenshot3.png | |image3 = Screenshot3.png | ||
|header = My Gallery | |||
|header = | |description = Some description text | ||
|description = | |||
}} | }} | ||
</pre> | </pre> | ||
== Modes == | |||
* '''slideshow''' - Slideshow with navigation arrows (default) | |||
* '''traditional''' - Thumbnail grid | |||
* '''packed''' - Justified layout | |||
* '''nolines''' - Grid without borders | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"description": " | "description": "Image carousel using MediaWiki's native gallery slideshow.", | ||
"params": { | "params": { | ||
"mode": { | |||
"label": "Mode", | |||
"description": "Display mode", | |||
"type": "string", | |||
"default": "slideshow", | |||
"suggestedvalues": ["slideshow", "traditional", "packed", "nolines"] | |||
}, | |||
"width": { | "width": { | ||
"label": "Width", | "label": "Width", | ||
"type": "number", | "type": "number", | ||
"default": "400" | "default": "400" | ||
| Line 56: | Line 55: | ||
"height": { | "height": { | ||
"label": "Height", | "label": "Height", | ||
"type": "number", | "type": "number", | ||
"default": "300" | "default": "300" | ||
}, | }, | ||
"image1": { "label": "Image 1", "type": "wiki-file-name", "required": true }, | |||
"image1": { | |||
"image2": { "label": "Image 2", "type": "wiki-file-name" }, | "image2": { "label": "Image 2", "type": "wiki-file-name" }, | ||
"image3": { "label": "Image 3", "type": "wiki-file-name" }, | "image3": { "label": "Image 3", "type": "wiki-file-name" }, | ||
"image4": { "label": "Image 4", "type": "wiki-file-name" }, | "image4": { "label": "Image 4", "type": "wiki-file-name" }, | ||
"image5": { "label": "Image 5", "type": "wiki-file-name" }, | "image5": { "label": "Image 5", "type": "wiki-file-name" }, | ||
"image6": { "label": "Image 6", "type": "wiki-file-name" }, | "image6": { "label": "Image 6", "type": "wiki-file-name" }, | ||
"image7": { "label": "Image 7", "type": "wiki-file-name" }, | "image7": { "label": "Image 7", "type": "wiki-file-name" }, | ||
"image8": { "label": "Image 8", "type": "wiki-file-name" }, | "image8": { "label": "Image 8", "type": "wiki-file-name" }, | ||
"image9": { "label": "Image 9", "type": "wiki-file-name" }, | "image9": { "label": "Image 9", "type": "wiki-file-name" }, | ||
"image10": { "label": "Image 10", "type": "wiki-file-name" }, | "image10": { "label": "Image 10", "type": "wiki-file-name" }, | ||
"image11": { "label": "Image 11", "type": "wiki-file-name" }, | "image11": { "label": "Image 11", "type": "wiki-file-name" }, | ||
"image12": { "label": "Image 12", "type": "wiki-file-name" }, | "image12": { "label": "Image 12", "type": "wiki-file-name" }, | ||
"header": { "label": "Header", "type": "string" }, | |||
"header": { | "description": { "label": "Description", "type": "string" } | ||
"description": { | |||
}, | }, | ||
"format": "block" | "format": "block" | ||
} | } | ||
Latest revision as of 23:44, 24 January 2026
Usage
edit source{{Carousel
|mode = slideshow
|width = 500
|height = 350
|image1 = Screenshot1.png
|image2 = Screenshot2.png
|image3 = Screenshot3.png
|header = My Gallery
|description = Some description text
}}
Modes
edit source- slideshow - Slideshow with navigation arrows (default)
- traditional - Thumbnail grid
- packed - Justified layout
- nolines - Grid without borders
Image carousel using MediaWiki's native gallery slideshow.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Mode | mode | Display mode
| String | optional |
| Width | width | no description
| Number | optional |
| Height | height | no description
| Number | optional |
| Image 1 | image1 | no description | File | required |
| Image 2 | image2 | no description | File | optional |
| Image 3 | image3 | no description | File | optional |
| Image 4 | image4 | no description | File | optional |
| Image 5 | image5 | no description | File | optional |
| Image 6 | image6 | no description | File | optional |
| Image 7 | image7 | no description | File | optional |
| Image 8 | image8 | no description | File | optional |
| Image 9 | image9 | no description | File | optional |
| Image 10 | image10 | no description | File | optional |
| Image 11 | image11 | no description | File | optional |
| Image 12 | image12 | no description | File | optional |
| Header | header | no description | String | optional |
| Description | description | no description | String | optional |