Template:Image: Difference between revisions

Clarke (talk | contribs)
Image template
 
Clarke (talk | contribs)
m update image to use (not yet added) Template:Documentation
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><div class="t-image {{#ifeq:{{{padding|}}}|no||t-image-padding}}" {{#if:{{{width|}}}|style="max-width:{{{width}}}%"}}>
<templatestyles src="Image/styles.css"/><div class="t-image {{#ifeq:{{{padding|}}}|no||t-image-padding}}" {{#if:{{{width|}}}|style="max-width:{{{width}}}%"}}>
[[File:{{{file|Seal of the National Archives and Records Administration.png}}}|{{{imagewidth|256}}}px|{{#ifeq:{{{border|}}}|yes|border{{!}}}}alt={{{caption|}}}|{{#if:{{{link|}}}|link={{{link|}}}}}]]{{#if: {{{caption|}}}|
[[File:{{{file|Seal of the National Archives and Records Administration.png}}}|{{{imagewidth|400}}}px|{{#ifeq:{{{border|}}}|yes|border{{!}}}}alt={{{caption|}}}|{{#if:{{{link|}}}|link={{{link|}}}}}]]{{#if: {{{caption|}}}|
<p class="t-image-caption">
<p class="t-image-caption">
{{{caption}}}
{{{caption}}}
</p>}}
</p>}}
</div></includeonly>
</div><noinclude>
 
{{documentation|content=
{{Uses TemplateStyles|Template:Image/styles.css}}
This template is used to provide images with captions as an alternative to the ugly image captions that come with MediaWiki.
This template is used to provide images with captions as an alternative to the ugly image captions that come with MediaWiki.


Syntax:
Syntax:


* '''<code>file=</code>''' Sets which file to use. Default value is [[:File:Seal of the National Archives and Records Administration.png]]
* '''<code>file=</code>''' Sets which file to use. Default value is [[:File:Seal of the National Archives and Records Administration.png|Seal of the National Archives and Records Administration.png]].
* '''<code>width=</code>''' The maximum width of the image. Note that the image gets smaller so that it is never more than a certain percentage of the browser window. Defaults to 400px.
* '''<code>width=</code>''' The maximum width of the image. Note that the image gets smaller so that it is never more than a certain percentage of the browser window. Defaults to 400px.
* <s>'''<code>percentage=</code>'''</s> '''Never used''' The percent width of the browser window the image takes up. The width proportionality is maintained until the image is at the maximum size; it does not get better. Defaults to 50%.  
* <s>'''<code>percentage=</code>'''</s> '''Never used''' The percent width of the browser window the image takes up. The width proportionality is maintained until the image is at the maximum size; it does not get better. Defaults to 50%.  
Line 18: Line 19:


}}
}}
</noinclude>