Template:Gallery: Difference between revisions
From xat wiki
No edit summary |
(Test custom widths) |
||
Line 26: | Line 26: | ||
</noinclude><includeonly><div style="display:{{#ifeq:{{{hide}}}|yes|none|table}}"><!-- | </noinclude><includeonly><div style="display:{{#ifeq:{{{hide}}}|yes|none|table}}"><!-- | ||
--><div style="display: inline-block">{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{1}}}|width={{{width|275}}}|description={{{1d|}}}}}</div><!-- | --><div style="display: inline-block">{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{1}}}|width={{#if:{{{width1|}}}|{{{width1}}}|{{{width|275}}}}}|description={{{1d|}}}}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{2|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{2}}}|width={{{width|275}}}|description={{{2d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{2|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{2}}}|width={{#if:{{{width2|}}}|{{{width2}}}|{{{width|275}}}}}|description={{{2d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{3|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{3}}}|width={{{width|275}}}|description={{{3d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{3|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{3}}}|width={{#if:{{{width3|}}}|{{{width3}}}|{{{width|275}}}}}|description={{{3d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{4|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{4}}}|width={{{width|275}}}|description={{{4d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{4|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{4}}}|width={{#if:{{{width4|}}}|{{{width4}}}|{{{width|275}}}}}|description={{{4d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{5|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{5}}}|width={{{width|275}}}|description={{{5d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{5|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{5}}}|width={{#if:{{{width5|}}}|{{{width5}}}|{{{width|275}}}}}|description={{{5d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{6|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{6}}}|width={{{width|275}}}|description={{{6d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{6|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{6}}}|width={{#if:{{{width6|}}}|{{{width6}}}|{{{width|275}}}}}|description={{{6d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{7|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{7}}}|width={{{width|275}}}|description={{{7d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{7|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{7}}}|width={{#if:{{{width7|}}}|{{{width7}}}|{{{width|275}}}}}|description={{{7d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{8|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{8}}}|width={{{width|275}}}|description={{{8d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{8|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{8}}}|width={{#if:{{{width8|}}}|{{{width8}}}|{{{width|275}}}}}|description={{{8d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{9|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{9}}}|width={{{width|275}}}|description={{{9d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{9|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{9}}}|width={{#if:{{{width9|}}}|{{{width9}}}|{{{width|275}}}}}|description={{{9d|}}}}}|}}</div><!-- | ||
--><div style="display: inline-block">{{#if:{{{10|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{10}}}|width={{{width|275}}}|description={{{10d|}}}}}|}}</div><!-- | --><div style="display: inline-block">{{#if:{{{10|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{10}}}|width={{#if:{{{width10|}}}|{{{width10}}}|{{{width|275}}}}}|description={{{10d|}}}}}|}}</div><!-- | ||
--></div></includeonly> | --></div></includeonly> |
Revision as of 22:03, 9 January 2019
Display a gallery of up to 10 images.
Attributes
- 1d-10d - Image descriptions (optional).
- width - Width of each thumbnail in pixels (optional, defaults to 275).
- scalable - value no to prevent images from scaling.
- hide - value yes to hide the gallery (i.e. to have the code as a placeholder until images become available).
Usage
{{Gallery|width=#
|image_link|1d=First image description.
|second_image_link|2d=Second image description.
}}
Example
{{Gallery|width=100
|http://i.imgur.com/abcd.png|1d=First image description.
|http://i.imgur.com/abcd.png|2d=Second image description.
}}
Minimalist example
{{Gallery
|http://i.imgur.com/abcd.png
|http://i.imgur.com/abcd.png
}}