Difference between revisions of "Template:ImageCaption"

From Nookipedia, the Animal Crossing wiki
(Based on the template of the same name of Zelda Wiki. Transferred here at the request of SNES.)
 
(Marking as deprecated)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly><div class="thumb {{#switch: {{{align|right}}}|right = tright|left = tleft|center = center }}">
 
<includeonly><div class="thumb {{#switch: {{{align|right}}}|right = tright|left = tleft|center = center }}">
<div class="thumbinner" style="background: none !important; border: none !important;width: {{{size|}}};">[[{{{image|File:Nookipedia.png}}}|{{{size|}}}]]
+
<div class="thumbinner" style="background: none !important; border: {{{border|none}}} !important;width: {{{size|}}};">[[{{{image|File:Nookipedia.png}}}|{{{size|}}}]]
<div class="thumbcaption" style="background: #C4E673; margin-top: 2px; border: 1px solid #E0F2B6; text-align:{{{captionalign|center}}}">{{{caption|Caption}}}</div></div></div></includeonly><noinclude>
+
{{#if:{{{nocap|}}}||<div class="thumbcaption" style="background: #C4E673; margin-top: 2px; border: 1px solid #E0F2B6; text-align:{{{captionalign|center}}}">{{{caption|Caption}}}</div>}}</div></div></includeonly><noinclude>
 
+
{{Deprecated|note=Standard MediaWiki syntax (<code><nowiki>[[File:Filename.ext|thumb|Caption.]]</nowiki></code>) should be used instead.}}
 
===Usage===
 
===Usage===
 
This template allows you to add a caption to an image without creating a frame around it. Usage:
 
This template allows you to add a caption to an image without creating a frame around it. Usage:
 
<pre>
 
<pre>
 
{{ImageCaption
 
{{ImageCaption
|image =       the image
+
|image       = the image
|size =         the width of the image (in pixels)
+
|size         = the width of the image (in pixels)
|align =       the alignment of the image (optional)
+
|align       = the alignment of the image (optional)
|caption =     the caption
+
|caption     = the caption
 
|captionalign = caption alignment relative to image (optional)
 
|captionalign = caption alignment relative to image (optional)
 +
|border      = border property (e.g. 1px solid black)
 +
|nocap        = enter any value for no caption box
 
}}
 
}}
 
</pre>
 
</pre>
Line 44: Line 46:
 
}}
 
}}
 
</pre>
 
</pre>
 +
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 01:40, January 13, 2021


Lucky NH Villager Icon.png
This template is deprecated and should no longer be used.
This template's functionality is obsolete and no longer maintained. It should be removed from pages or replaced with an alternative template.
Further details: Standard MediaWiki syntax ([[File:Filename.ext|thumb|Caption.]]) should be used instead.
Lucky NH Villager Icon.png
This template is deprecated and should no longer be used.
This template's functionality is obsolete and no longer maintained. It should be removed from pages or replaced with an alternative template.
Further details: Standard MediaWiki syntax ([[File:Filename.ext|thumb|Caption.]]) should be used instead.

Template:ImageCaption

Usage

This template allows you to add a caption to an image without creating a frame around it. Usage:

{{ImageCaption
|image        = the image
|size         = the width of the image (in pixels)
|align        = the alignment of the image (optional)
|caption      = the caption
|captionalign = caption alignment relative to image (optional)
|border       = border property (e.g. 1px solid black)
|nocap        = enter any value for no caption box
}}

Example

Nookipedia.png
Caption
{{ImageCaption
|image =        File:Nookipedia.png
|size =         109px
|align =        right
|caption =      Caption
|captionalign = center
}}

Blank Code

{{ImageCaption
|image = 
|size = 
|align = 
|caption = 
|captionalign = 
}}