Template:Gallery/Aux: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page with "<table style="width:{{#expr:{{{width|180}}}+20}}px; float:left; border-collapse:collapse; margin:3px; background-color:#f8f8f8;"><tr><td style="height:{{#expr:{{{height|180}}}...")
 
m (clarification)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<table style="width:{{#expr:{{{width|180}}}+20}}px; float:left; border-collapse:collapse; margin:3px; background-color:#f8f8f8;"><tr><td style="height:{{#expr:{{{height|180}}}+20}}px; border:1px solid #CCCCCC; padding:0px;">[[{{{1|File:Flag of None.png}}}|center|border|{{{width|180}}}x{{{height|180}}}px|alt={{{alt}}}|{{{2}}}]]</td></tr><tr style="border-right:1px solid #F0F0F0; border-bottom:1px solid #f0f0f0; border-left:1px solid #f0f0f0; vertical-align:top;"><td style="display:block; font-size:1em; height:{{#expr:0.2+1.5*{{{lines|2}}}}}em; padding:0px;"><div class="gallerytext" style="height:{{#expr:0.1+1.5*{{{lines|2}}}}}em; width:{{#expr:{{{width|180}}}+7}}px; line-height:1.3em; padding:2px 6px 1px 6px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{{2}}}&nbsp;</div></td></tr></table><noinclude>
<table style="width:{{#expr:{{{width|180}}}+20}}px; float:left; border-collapse:collapse; margin:3px; background-color:#f8f8f8;"><tr><td style="height:{{#expr:{{{height|180}}}+20}}px; border:1px solid #CCCCCC; padding:0px;">[[{{{1|File:Flag of None.png}}}|center|border|{{{width|180}}}x{{{height|180}}}px|alt={{{alt}}}|{{{2}}}]]</td></tr><tr style="border-right:1px solid #F0F0F0; border-bottom:1px solid #f0f0f0; border-left:1px solid #f0f0f0; vertical-align:top;"><td style="display:block; font-size:1em; height:{{#expr:0.2+1.5*{{{lines|2}}}}}em; padding:0px;"><div class="gallerytext" style="height:{{#expr:0.1+1.5*{{{lines|2}}}}}em; width:{{#expr:{{{width|180}}}+7}}px; line-height:1.3em; padding:2px 6px 1px 6px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{{2}}}&nbsp;</div></td></tr></table><noinclude>
{{-}}{{Informative template|1=
__NOTOC__
== Goal ==
This template is used internally by {{tl|gallery}} for each of the images in a gallery.
== Usage ==
<nowiki>{{</nowiki>'''Gallery/Aux'''<nowiki>|</nowiki>''file name''<nowiki>|</nowiki>''caption'' <nowiki>|</nowiki>''width''= <nowiki>|</nowiki>''height''= <nowiki>|</nowiki>''lines''= <nowiki>|</nowiki>''alt''=<nowiki>}}</nowiki>
Consider all parameters mandatory.
; file name:  Name of the image file excluding the '''File:''' or '''Image:''' prefix.  Defaults to '''Flag of None.png'''.
; caption:    Image caption to be shown below the image.
; width:      Maximum width of each image in pixels.  Defaults to '''180'''.
; height:    Maximum height of each image in pixels.  Defaults to '''180'''.
; lines:      Number of text lines needed for the largest caption. Blank lines are appended to smaller captions. A caption that does not fit is cut off.  Defaults to '''2'''.
; alt:        Alt text for the image.  Will be used in screen readers, for visually impaired readers etc.
== Known issues ==
For some reason it seems that while defaults are defined in the wiki text of the template they are are not used when using the template without parameters.
}}
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 15:54, 9 May 2014

{{{alt}}}
{{{2}}} 


The following template description is not displayed when the template is inserted in an article.

Goal

This template is used internally by {{gallery}} for each of the images in a gallery.

Usage

{{Gallery/Aux|file name|caption |width= |height= |lines= |alt=}}

Consider all parameters mandatory.

file name
Name of the image file excluding the File: or Image: prefix. Defaults to Flag of None.png.
caption
Image caption to be shown below the image.
width
Maximum width of each image in pixels. Defaults to 180.
height
Maximum height of each image in pixels. Defaults to 180.
lines
Number of text lines needed for the largest caption. Blank lines are appended to smaller captions. A caption that does not fit is cut off. Defaults to 2.
alt
Alt text for the image. Will be used in screen readers, for visually impaired readers etc.

Known issues

For some reason it seems that while defaults are defined in the wiki text of the template they are are not used when using the template without parameters.