Difference between revisions of "Template:InfoBox"
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | <div id="TemplateInfoBox"> | + | <div id="TemplateInfoBox" {{#if:{{{float|}}}|style="float:{{{float}}}"}}> |
<div {{#if:{{{TitleStyle|}}}| style="{{{TitleStyle}}}"}}>{{{title|{{PAGENAME}}}}}</div> | <div {{#if:{{{TitleStyle|}}}| style="{{{TitleStyle}}}"}}>{{{title|{{PAGENAME}}}}}</div> | ||
<table {{#if:{{{TableStyle|}}}| style="{{{TableStyle}}}"}}><!-- | <table {{#if:{{{TableStyle|}}}| style="{{{TableStyle}}}"}}><!-- | ||
− | -->{{#if:{{{image|}}}|{{#if:{{{caption|}}}|<tr><td id="TemplateInfoBoxImage" colspan="2">[[file:{{{image}}}|{{{ImageSize}}}px|{{#if:{{{ImageLink|}}}|link={{{ImageLink}}}}}]]<br/><!-- | + | -->{{#if:{{{image2|}}}|<tr><td id="TemplateInfoBoxImage2" colspan="2">[[file:{{{image2}}}|{{{ImageSize2}}}px|{{#if:{{{ImageLink2|}}}|link=file:{{{ImageLink2}}}}}]]<br/><!-- |
+ | --><span {{#if:{{{CaptionStyle2|}}}| style="{{{CaptionStyle2}}}"}}>{{{caption2}}}</span></td></tr>|}}<!-- | ||
+ | -->{{#if:{{{image|}}}|{{#if:{{{caption|}}}|<tr><td id="TemplateInfoBoxImage" colspan="2">[[file:{{{image}}}|{{{ImageSize}}}px|{{#if:{{{ImageLink|}}}|link=file:{{{ImageLink}}}}}]]<br/><!-- | ||
--><span {{#if:{{{CaptionStyle|}}}| style="{{{CaptionStyle}}}"}}>{{{caption}}}</span></td></tr>|}}|}}<!-- | --><span {{#if:{{{CaptionStyle|}}}| style="{{{CaptionStyle}}}"}}>{{{caption}}}</span></td></tr>|}}|}}<!-- | ||
-->{{#if:{{{label1|}}}|{{#if:{{{data1|}}}|<tr><td class="TemplateInfoBoxLabel" {{#if:{{{LabelStyle1|}}}| style="{{{LabelStyle1}}}"}}>{{{label1}}}</td><!-- | -->{{#if:{{{label1|}}}|{{#if:{{{data1|}}}|<tr><td class="TemplateInfoBoxLabel" {{#if:{{{LabelStyle1|}}}| style="{{{LabelStyle1}}}"}}>{{{label1}}}</td><!-- | ||
Line 223: | Line 225: | ||
== Personalized InfoBox == | == Personalized InfoBox == | ||
=== Minimal call === | === Minimal call === | ||
+ | ---- | ||
You do not need to specify parameters, but it has no interest because only the title and an early picture appears : | You do not need to specify parameters, but it has no interest because only the title and an early picture appears : | ||
<pre>{{InfoBox}}</pre> | <pre>{{InfoBox}}</pre> | ||
− | Result: < | + | |
+ | Result: {{InfoBox|float=none}} | ||
+ | |||
+ | === Image === | ||
+ | ---- | ||
+ | It is highly recommended if possible to add an image. If it is more than 200px wide, it will be reduced to this size. You must add a caption. | ||
+ | <pre> | ||
+ | {{InfoBox | ||
+ | |image=Template_InfoBox_ExampleImage.jpg | ||
+ | |caption=The men in this picture are strange. | ||
+ | }} | ||
+ | </pre> | ||
+ | result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=The men in this picture are strange.|float=none}} | ||
+ | |||
+ | ==== Resize the image ==== | ||
+ | Add the parameter "ImageSize" with this value: | ||
+ | * {width} — Resizes the image to fit within the given maximum width in pixels, without restricting its height; | ||
+ | * x{height} — Resizes the image to fit within the given maximum height in pixels, without restricting its width; | ||
+ | * {width}x{height} — Resizes the image to fit within the given width and height in pixels; | ||
+ | Example : | ||
+ | <pre> | ||
+ | {{InfoBox | ||
+ | |image=Template_InfoBox_ExampleImage.jpg | ||
+ | |caption=The men in this picture are strange. | ||
+ | |ImageSize=10x10 | ||
+ | }} | ||
+ | </pre> | ||
+ | Result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=The men in this picture are strange.||ImageSize=10x10|float=none}} | ||
+ | ==== Link of the image ==== | ||
+ | If the image you give is really big, you can upload the same image with a width of 200px and use the link parameter to associate the big picture. | ||
+ | Example : The big image est "CFX-9850GB_PLUS.jpg" and the same small image is "CFX-9850GB_PLUS-w200.jpg" | ||
+ | <pre>{{InfoBox | ||
+ | |image=CFX-9850GB_PLUS-w200.jpg | ||
+ | |caption=This is the big image in small | ||
+ | |ImageLink=CFX-9850GB_PLUS.jpg | ||
+ | }}</pre> | ||
+ | [[CFX-9850|Click here]] to see the result. | ||
+ | |||
+ | === Label and data === | ||
+ | ---- | ||
+ | To add information about the InfoBox, you must use the parameters "label" and "data". Then add the numbers behind these two parameters to associate. It can reach about 100. | ||
+ | <pre>{{InfoBox | ||
+ | |image=Template_InfoBox_ExampleImage.jpg | ||
+ | |caption=Gaspard and balthazar, two characters perverse, which make the success of the series. | ||
+ | |label1=Name of series | ||
+ | |data1=Very Bad Blagues | ||
+ | |label2=Actual seasons | ||
+ | |data2=2 | ||
+ | }}</pre> | ||
+ | Result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard and balthazar, two characters perverse, which make the success of the series.|label1=Name of series|data1=Very Bad Blagues|label2=Actual seasons|data2=2|float=none}} | ||
+ | |||
+ | === Title === | ||
+ | ---- | ||
+ | By default this template takes the page title as the title, but you can change it, with the "title" parameter. | ||
+ | <pre>{{InfoBox | ||
+ | |title=Very Bad Blague | ||
+ | |image=Template_InfoBox_ExampleImage.jpg | ||
+ | |caption=Gaspard and balthazar, two characters perverse, which make the success of the series. | ||
+ | |label1=Actual seasons | ||
+ | |data1=2 | ||
+ | |label2=TV channel | ||
+ | |data2=Direct 8 | ||
+ | }}</pre> | ||
+ | Result:{{InfoBox|title=Very Bad Blague|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard and balthazar, two characters perverse, which make the success of the series.|label1=Actual seasons|data1=2|label2=TV channel|data2=Direct 8|float=none}} | ||
+ | |||
+ | === Style === | ||
+ | ---- | ||
+ | You can change the style of several part of the InfoBox if you have knowledge in CSS: | ||
+ | <pre>{{InfoBox | ||
+ | |image=Template_InfoBox_ExampleImage.jpg | ||
+ | |caption=Gaspard and balthazar | ||
+ | |label1=Actual seasons | ||
+ | |data1=2 | ||
+ | |label2=TV channel | ||
+ | |data2=Direct 8 | ||
+ | |||
+ | |TitleStyle=color:red; | ||
+ | |TableStyle=border:solid orange 2px; | ||
+ | |CaptionStyle=font-weight:bold;text-decoration:underline; | ||
+ | |LabelStyle1=color:blue; | ||
+ | |DataStyle1=color:white;Background-color:black; | ||
+ | |LabelStyle2=Border:dotted pink 2px; | ||
+ | |DataStyle2=color:pink; | ||
+ | }}</pre> | ||
+ | Result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard and balthazar|label1=Actual seasons|data1=2|label2=TV channel|data2=Direct 8|TitleStyle=color:red;|TableStyle=border:solid orange 2px;|CaptionStyle=font-weight:bold;text-decoration:underline;|LabelStyle1=color:blue; | ||
+ | |DataStyle1=color:white;Background-color:black;|LabelStyle2=Border:dotted pink 2px; |DataStyle2=color:pink;|float=none}} | ||
</noinclude> | </noinclude> |
Latest revision as of 15:34, June 21, 2012
The InfoBox lets you create a table to display the general technical information about the subject of the page, as on the right.
Contents
InfoBox Dedicated
This type of InfsoBox is dedicated to a theme. If you find the name of your page in these subjects prefer this type of InfsoBo rather than personalized. list of InfoBox Dedicated
Personalized InfoBox
Minimal call
You do not need to specify parameters, but it has no interest because only the title and an early picture appears :
{{InfoBox}}
Result:
Image
It is highly recommended if possible to add an image. If it is more than 200px wide, it will be reduced to this size. You must add a caption.
{{InfoBox |image=Template_InfoBox_ExampleImage.jpg |caption=The men in this picture are strange. }}
result:
Resize the image
Add the parameter "ImageSize" with this value:
- {width} — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
- x{height} — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
- {width}x{height} — Resizes the image to fit within the given width and height in pixels;
Example :
{{InfoBox |image=Template_InfoBox_ExampleImage.jpg |caption=The men in this picture are strange. |ImageSize=10x10 }}
Result:
Link of the image
If the image you give is really big, you can upload the same image with a width of 200px and use the link parameter to associate the big picture. Example : The big image est "CFX-9850GB_PLUS.jpg" and the same small image is "CFX-9850GB_PLUS-w200.jpg"
{{InfoBox |image=CFX-9850GB_PLUS-w200.jpg |caption=This is the big image in small |ImageLink=CFX-9850GB_PLUS.jpg }}
Click here to see the result.
Label and data
To add information about the InfoBox, you must use the parameters "label" and "data". Then add the numbers behind these two parameters to associate. It can reach about 100.
{{InfoBox |image=Template_InfoBox_ExampleImage.jpg |caption=Gaspard and balthazar, two characters perverse, which make the success of the series. |label1=Name of series |data1=Very Bad Blagues |label2=Actual seasons |data2=2 }}
Result:
Gaspard and balthazar, two characters perverse, which make the success of the series. | |
Name of series | Very Bad Blagues |
Actual seasons | 2 |
Title
By default this template takes the page title as the title, but you can change it, with the "title" parameter.
{{InfoBox |title=Very Bad Blague |image=Template_InfoBox_ExampleImage.jpg |caption=Gaspard and balthazar, two characters perverse, which make the success of the series. |label1=Actual seasons |data1=2 |label2=TV channel |data2=Direct 8 }}
Result:
Gaspard and balthazar, two characters perverse, which make the success of the series. | |
Actual seasons | 2 |
TV channel | Direct 8 |
Style
You can change the style of several part of the InfoBox if you have knowledge in CSS:
{{InfoBox |image=Template_InfoBox_ExampleImage.jpg |caption=Gaspard and balthazar |label1=Actual seasons |data1=2 |label2=TV channel |data2=Direct 8 |TitleStyle=color:red; |TableStyle=border:solid orange 2px; |CaptionStyle=font-weight:bold;text-decoration:underline; |LabelStyle1=color:blue; |DataStyle1=color:white;Background-color:black; |LabelStyle2=Border:dotted pink 2px; |DataStyle2=color:pink; }}
Result: