Template:Imagebox: Difference between revisions

From PWI Wiki
Jump to navigationJump to search
PWpedia>Sangodoc
Fixing minor problem with text to the right of images
PWpedia>Sangodoc
Changed colors to match new style
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| style="background: #3D2B1F; border: 1px solid #C8B47D; margin-left: 5px; margin-right: 5px; padding: 3px;" align="{{{balign|}}}" width="{{{bwidth|}}}"
{| style="background: #171513; border: 1px solid #6A5D44; margin-left: 5px; margin-right: 5px; padding: 3px;" align="{{{balign|}}}" width="{{{bwidth|}}}"
|- align="center"
|- align="center"
| [[Image:{{{image}}}|{{{iwidth}}}]]
| [[Image:{{{image}}}|frameless|{{{iwidth}}}]]
|- align="{{{talign|}}}"
|- align="{{{talign|}}}"
|{{{text|}}}
|{{{text|}}}
Line 10: Line 10:
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:
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 or "50%" for a half size display.  Use "100%" if you want the image to appear full size.
:'''iwidth''' : the width of the image in the box, such as "76px" for 76 pixels wide or "upright=N" for an image that is ''up to'' 220 * N pixles wide, but no wider than the original image.  Use something like "upright=100" (or some other large number) if you want the image to appear full size.
:'''balign''' : the alignment of the box, meaning "left", "right", or "center".  Default is "left".
:'''balign''' : the alignment of the box, meaning "left", "right", or "center".  Default is "left".
:'''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.
:'''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.
Line 18: Line 18:
The image and iwidth parameters are required, the rest are optional.  Do not add the quotes around the parameter values.
The image and iwidth parameters are required, the rest are optional.  Do not add the quotes around the parameter values.


{{Imagebox|image=Sparks.png|iwidth=100%|text='''A full and an empty spark.'''|balign=right|bwidth=95px}}
{{Imagebox|image=Sparks.png|iwidth=76px|text='''A full and an empty spark.'''|balign=right|bwidth=95px}}
So, for example, '''<NoWiki>{{Imagebox|image=Sparks.png|iwidth=100%|text='''A full and an empty spark.'''|balign=right|bwidth=95px}}</NoWiki>''' produces the box seen to the right:
So, for example, '''<NoWiki>{{Imagebox|image=Sparks.png|iwidth=76px|text='''A full and an empty spark.'''|balign=right|bwidth=95px}}</NoWiki>''' produces the box seen to the right:


While '''<NoWiki>{{Imagebox|image=Blazing Phoenix.JPG|iwidth=150px|text='''[[Phoenix (pet group)|A "Nix".]]'''|talign=center}}</NoWiki>''' produces the box below:
While '''<NoWiki>{{Imagebox|image=Blazing Phoenix.JPG|iwidth=upright=1|text='''[[Baby Blazing Phoenix|A "Nix".]]'''|talign=center}}</NoWiki>''' produces the box below:
{{Imagebox|image=Blazing Phoenix.JPG|iwidth=150px|text='''[[Phoenix (pet group)|A "Nix".]]'''|talign=center}}
{{Imagebox|image=Blazing Phoenix.JPG|iwidth=upright=1|text='''[[Baby Blazing Phoenix|A "Nix".]]'''|talign=center}}
</noinclude>
</noinclude>

Latest revision as of 01:00, 7 October 2012

[[Image:{{{image}}}|frameless|{{{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 or "upright=N" for an image that is up to 220 * N pixles wide, but no wider than the original image. Use something like "upright=100" (or some other large number) if you want the image to appear full size.
balign : the alignment of the box, meaning "left", "right", or "center". Default is "left".
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.
talign : the alignment of the text in the box, meaning left, right, or center. Default is "left".

The image and iwidth parameters are required, the rest are optional. Do not add the quotes around the parameter values.

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

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

While {{Imagebox|image=Blazing Phoenix.JPG|iwidth=upright=1|text='''[[Baby Blazing Phoenix|A "Nix".]]'''|talign=center}} produces the box below:

File:Blazing Phoenix.JPG
A "Nix".