Template:Imagebox: Difference between revisions

From PWI Wiki
Jump to navigationJump to search
PWpedia>Sangodoc
Created template for images (still testing)
 
PWpedia>Sangodoc
Further testing
Line 1: Line 1:
{| style="background: #3D2B1F; border: 1px solid #C8B47D; margin-left: 5px; padding: 3px;" align="{{{align|}}}" width="{{{bwidth|}}}"
{| style="background: #3D2B1F; border: 1px solid #C8B47D; margin-left: 5px; padding: 3px;" align="{{{align|}}}" width="{{{bwidth|}}}"
|- align="center"
|- align="center"
| [[Image:{{{image}}}|{{{iwidth|}}}]]
| [[Image:{{{image|}}}{{{|iwidth|}}}]]
|-
|-
|{{{text|}}}
|{{{text|}}}
Line 7: Line 7:
<noinclude>This is an '''image box''' for the purpose of displaying images in a box with some text beneath them in a standard way that matches the style of this wiki.  The parameters are:
<noinclude>This is an '''image box''' for the purpose of displaying images in a box with some text beneath them in a standard way that matches the style of this wiki.  The parameters are:
:'''image''' : the image name, like "xyz.jpg".
:'''image''' : the image name, like "xyz.jpg".
:'''iwidth''' : the width of the image in the box, such as "76px" for 76 pixels wide.  If no width is specified, the image will appear full size.
:'''align''' : the alignment of the box, meaning left, right, or center.
:'''align''' : the alignment of the box, meaning left, right, or center.
:'''bwidth''' : the width of the box, such as "95px" for 95 pixels wide.  If no width is specified, it will be sized to the image or the text, whichever is wider.
:'''bwidth''' : the width of the box, such as "95px".  If no width is specified, it will be sized to either the image or the text, whichever is wider.
:'''iwidth''' : the width of the image in the box, such as "76px".  If no width is specified, the image will appear full size.
:'''text''' : the text to put below the image.
:'''text''' : the text to put below the image.


So, for example, '''<NoWiki>{{Imagebox|image=Sparks.png|text='''A full and an empty spark.'''|align=right|bwidth=95px}}</NoWiki>''' produces the box seen to the right:
All of those parameters are optional.
{{Imagebox
 
| image=Sparks.png
So, for example, '''<NoWiki>{{Imagebox|image=Sparks.png |text='''A full and an empty spark.'''|align=right|bwidth=95px}}</NoWiki>''' produces the box seen to the right:
| text='''A full and an empty spark.'''
{{Imagebox|image=Sparks.png|text='''A full and an empty spark.'''|align=right|bwidth=95px}}
| align=right
| iwidth=76px
| bwidth=95px}}




</noinclude>
</noinclude>

Revision as of 22:59, 26 April 2010

File:Iwidth

This is an image box for the purpose of displaying images in a box with some text beneath them in a standard way that matches the style of this wiki. The parameters are:

image : the image name, like "xyz.jpg".
iwidth : the width of the image in the box, such as "76px" for 76 pixels wide. If no width is specified, the image will appear full size.
align : the alignment of the box, meaning left, right, or center.
bwidth : the width of the box, such as "95px". If no width is specified, it will be sized to either the image or the text, whichever is wider.
text : the text to put below the image.

All of those parameters are optional.

So, for example, {{Imagebox|image=Sparks.png |text='''A full and an empty spark.'''|align=right|bwidth=95px}} produces the box seen to the right:

File:Sparks.pngiwidth
A full and an empty spark.