More actions
m (added shorthand "images" parameter - just list the images separated by semicolons) |
m (changed to use Template:p2) |
||
Line 28: | Line 28: | ||
Shorthand using "images" parameter instead of "list" | Shorthand using "images" parameter instead of "list" | ||
* List images to have them automatically sized to the given "width" of the carousel. | * List images to have them automatically sized to the given "width" of the carousel. List each item on a separate line. | ||
* | * Split width, captions, etc. by semicolons | ||
<pre style="overflow:auto;"> | <pre style="overflow:auto;"> | ||
{{Carousel | {{Carousel | ||
|width=300 | |width=300 | ||
|images=image 1.png;image 2.png | |images= | ||
image 1.png;300px;Image caption | |||
image 2.png;This is an image caption | |||
}} | }} | ||
</pre> | </pre> | ||
Line 44: | Line 46: | ||
==Examples== | ==Examples== | ||
Using list | <table><tr> | ||
<td> | |||
Using list: | |||
<pre> | |||
{{Carousel | {{Carousel | ||
|width = 300 | |width = 300 | ||
Line 53: | Line 58: | ||
<div class="jcarousel-item">[[File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png|200x200px|center|thumb|BBCP]]</div> | <div class="jcarousel-item">[[File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png|200x200px|center|thumb|BBCP]]</div> | ||
}} | }} | ||
</pre> | |||
Using <code>images</code> parameter instead of list | </td> | ||
<td> | |||
{{Carousel | |||
|width = 300 | |||
|align = | |||
|list= | |||
<div class="jcarousel-item">[[File:BlazBlue Cross Tag Battle Ragna the Bloodedge Main.png|300x300px|center|thumb|BBTAG]]</div> | |||
<div class="jcarousel-item">[[File:BlazBlue Central Fiction Ragna the Bloodedge Main.png|150x150px|center|thumb|BBCF]]</div> | |||
{{p|[[File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png|200x200px|center|thumb|BBCP]]}} | |||
}} | |||
</td> | |||
</tr><tr> | |||
<td> | |||
Using <code>images</code> parameter instead of list: | |||
<pre> | |||
{{Carousel | |||
|width=300 | |||
|images= | |||
File:BlazBlue Cross Tag Battle Ragna the Bloodedge Main.png;300px;BBTAG | |||
File:BlazBlue Central Fiction Ragna the Bloodedge Main.png;150px;BBCF | |||
File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png;200px;BBCP | |||
}} | |||
</pre> | |||
<?td><td> | |||
{{Carousel | {{Carousel | ||
|width=300 | |width=300 | ||
|images=BlazBlue Central Fiction | |images= | ||
File:BlazBlue Cross Tag Battle Ragna the Bloodedge Main.png;300px;BBTAG | |||
File:BlazBlue Central Fiction Ragna the Bloodedge Main.png;150px;BBCF | |||
File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png;200px;BBCP | |||
}} | }} | ||
</td></tr> | |||
</table> | |||
<includeonly>[[Category:Graphic templates]]</includeonly> | <includeonly>[[Category:Graphic templates]]</includeonly> |
Revision as of 18:28, 8 October 2021
This is a documentation subpage for Template:Carousel. It contains usage information, categories, interlanguage links and other content that is not part of the original template page. |
This template is used for a slider made out of thumbnails.
A single list item also has the shortcut template Template:p.
Usage
{{Carousel |width = |align = |list= <div class="jcarousel-item">[[File:exampleimage1.jpg]]</div> <div class="jcarousel-item">[[File:exampleimage2.jpg]]</div> ... }} {{Carousel |width = |align = |list= {{p|[[File:exampleimage1.jpg|thumb|300px]]}} {{p|[[File:exampleimage2.jpg]]}} ... }}
Shorthand using "images" parameter instead of "list"
- List images to have them automatically sized to the given "width" of the carousel. List each item on a separate line.
- Split width, captions, etc. by semicolons
{{Carousel |width=300 |images= image 1.png;300px;Image caption image 2.png;This is an image caption }}
Parameter list
width
Width of the slider. e.g.450
if the series of images are 450px widealign
To have it float to the right, usefloatright
. To have it float to the left, usefloatleft
. To have it centered, usecenter
. To have it without any, usenull
.list
For every slide, start a new line and put<div class="jcarousel-item">[[File:exampleimage.jpg]]</div>
, substituting exampleimage.jpg with the image you desire.images
Shorthand using "images" instead of "list" parameter.
Examples
Using list: {{Carousel |width = 300 |align = |list= <div class="jcarousel-item">[[File:BlazBlue Cross Tag Battle Ragna the Bloodedge Main.png|300x300px|center|thumb|BBTAG]]</div> <div class="jcarousel-item">[[File:BlazBlue Central Fiction Ragna the Bloodedge Main.png|150x150px|center|thumb|BBCF]]</div> <div class="jcarousel-item">[[File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png|200x200px|center|thumb|BBCP]]</div> }} |
|
Using {{Carousel |width=300 |images= File:BlazBlue Cross Tag Battle Ragna the Bloodedge Main.png;300px;BBTAG File:BlazBlue Central Fiction Ragna the Bloodedge Main.png;150px;BBCF File:BlazBlue Chrono Phantasma Ragna the Bloodedge Main.png;200px;BBCP }}<?td> |