Template:Gallery: Difference between revisions

From xat wiki
No edit summary
No edit summary
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:


=== Attributes ===
=== Attributes ===
* 1d-10d - Image descriptions (optional).
* '''1d-10d''' - Image descriptions (optional).
* width - Width of each thumbnail in pixels (optional, defaults to 275).
* '''width''' - Width of each thumbnail in pixels (optional, defaults to 275).
* scalable - value '''no''' to prevent images from scaling.
* '''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 ===
=== Usage ===
Line 25: Line 26:
</noinclude><includeonly><div style="display:{{#ifeq:{{{hide}}}|yes|none|table}}"><!--
</noinclude><includeonly><div style="display:{{#ifeq:{{{hide}}}|yes|none|table}}"><!--


--><div style="float:left">{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{1}}}|width={{{width|275}}}|description={{{1d|}}}}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{1}}}|width={{{width|275}}}|description={{{1d|}}}}}</div><!--


--><div style="float:left">{{#if:{{{2|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{2}}}|width={{{width|275}}}|description={{{2d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{2|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{2}}}|width={{{width|275}}}|description={{{2d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{3|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{3}}}|width={{{width|275}}}|description={{{3d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{3|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{3}}}|width={{{width|275}}}|description={{{3d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{4|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{4}}}|width={{{width|275}}}|description={{{4d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{4|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{4}}}|width={{{width|275}}}|description={{{4d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{5|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{5}}}|width={{{width|275}}}|description={{{5d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{5|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{5}}}|width={{{width|275}}}|description={{{5d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{6|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{6}}}|width={{{width|275}}}|description={{{6d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{6|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{6}}}|width={{{width|275}}}|description={{{6d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{7|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{7}}}|width={{{width|275}}}|description={{{7d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{7|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{7}}}|width={{{width|275}}}|description={{{7d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{8|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{8}}}|width={{{width|275}}}|description={{{8d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{8|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{8}}}|width={{{width|275}}}|description={{{8d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{9|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{9}}}|width={{{width|275}}}|description={{{9d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{9|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{9}}}|width={{{width|275}}}|description={{{9d|}}}}}|}}</div><!--


--><div style="float:left">{{#if:{{{10|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{10}}}|width={{{width|275}}}|description={{{10d|}}}}}|}}</div><!--
--><div style="display: inline-block; padding-right:5px;">{{#if:{{{10|}}}|{{img|scalable={{#ifeq:{{{scalable}}}|no|no|}}|image={{{10}}}|width={{{width|275}}}|description={{{10d|}}}}}|}}</div><!--


--></div></includeonly>
--></div></includeonly>

Revision as of 22:16, 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
}}