Diferencia entre revisiones de «Plantilla:Image»

De La Coppermind
Ir a la navegación Ir a la búsqueda
m (added missing curly brace)
m
Línea 5: Línea 5:
 
-->|<!--
 
-->|<!--
 
ARTIST: --><div class="attribution">by <page-property key="{{{attribute|artist}}}" page="File:{{{1}}}" no-value="{{missing artist|marker=?}}" /></div><!--
 
ARTIST: --><div class="attribution">by <page-property key="{{{attribute|artist}}}" page="File:{{{1}}}" no-value="{{missing artist|marker=?}}" /></div><!--
CAPTION: --> {{{2}}} <!--
+
CAPTION: --> {{#if:{{{2}}}|{{{2}}}|}} <!--
 
-->]]</includeonly><noinclude>[[category: templates|{{PAGENAME}}]]
 
-->]]</includeonly><noinclude>[[category: templates|{{PAGENAME}}]]
   
Línea 12: Línea 12:
 
; Usage: {{t|{{lc:{{PAGENAME}}|}}|file-name.png|caption}}
 
; Usage: {{t|{{lc:{{PAGENAME}}|}}|file-name.png|caption}}
   
The file name and caption parameters are required. THere are several optional parameters:
+
The file name parameters is required. Caption is, technically optional but strongly encouraged. There are several optional parameters:
   
 
<pre>
 
<pre>
Línea 21: Línea 21:
 
}}
 
}}
 
</pre>
 
</pre>
  +
  +
When copy-pasting the template above, it might be more readable to put it all on the same line; it is split across multiple ones just for clarity.
   
 
{| class="wikitable" style="width: 100%"
 
{| class="wikitable" style="width: 100%"

Revisión del 18:36 9 jul 2020


This template should be used on pages to include a thumbnail of an image on a page.

Usage
{{image|file-name.png|caption}}

The file name parameters is required. Caption is, technically optional but strongly encouraged. There are several optional parameters:

{{image| file-name.png | caption |
|side=center|left|right
|width=100px
|attribute=artist|tracer
}}

When copy-pasting the template above, it might be more readable to put it all on the same line; it is split across multiple ones just for clarity.

Usage Examples
Parameter Description Code Example
none when only the file name and caption are passed
{{image| cosmere symbol.svg | this is the caption}}
this is the caption
side=left pushes the image over to the left, and allows the page to flow around it
{{image| cosmere symbol.svg |side=left
| this is the caption
}}
this is the caption
side=right pushes the image over to the right, and allows the page to flow around it
{{image| cosmere symbol.svg |side=right
| this is the caption
}}
this is the caption
attribute=tracer changes the attribution of the image to the "tracer" of the image instead of the original artist.
{{image| cosmere symbol.svg |attribute=tracer
| this is the caption
}}
this is the caption
width=20% changes the width of the image
{{image| cosmere symbol.svg |width=200px
| this is the caption
}}
this is the caption
width=20% changes the height of the image
{{image| Navani's Ketek glyphs.svg |height=150px
| The ketek "Alight, winds approach deadly approaching winds alight." written in glyphs and stylized to represent the meeting of the Everstorm and a highstorm.
}}
The ketek "Alight, winds approach deadly approaching winds alight." written in glyphs and stylized to represent the meeting of the Everstorm and a highstorm.
Notes
The height parameter overrides the width parameter. If exact dimensions are required pass width=WxHpx where W is the width & H is the height.

Articles using Template