Modèle:InfoBox : Différence entre versions

De Casio Universal Wiki
Aller à : navigation, rechercher
(nom d'utilisateur retiré)
(Page créée avec « <includeonly> <div id="TemplateInfoBox" {{#if:{{{float|}}}|style="float:{{{float}}}"}}> <div {{#if:{{{TitleStyle|}}}| style="{{{TitleStyle}}}"}}>{{{title|{{PAGENAME}}}}}</... »)
 
 
(27 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 2 : Ligne 2 :
 
<div id="TemplateInfoBox" {{#if:{{{float|}}}|style="float:{{{float}}}"}}>
 
<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:{{{IDtaille|}}}| id="infoboxTable{{{IDtaille}}}"}} {{#if:{{{TableStyle|}}}| style="{{{TableStyle}}}"}}><!--
 +
-->{{#if:{{{articleDétaillé|}}}|<tr><td colspan="2">{{Article détaillé|{{{articleDétaillé}}}|margin-left=0;text-indent:15px}}</td></tr>|}}<!--
 +
-->{{#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/><!--
 
-->{{#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>|}}|}}<!--
Ligne 207 : Ligne 210 :
 
</table>
 
</table>
 
</div>
 
</div>
</includeonly><noinclude>
+
</includeonly><noinclude>L'InfoBox vous permet de créer un tableau pour afficher les informations générales du sujet d'une page.
{{InfoBox
+
 
|image=Template_InfoBox_ExampleImage.jpg
+
== InfoBox dédié ==
|caption=This is a caption
+
 
|label1=label
+
Ce type d'InfoBox est dédié à un thème. Si vous trouvez une InfoBox dédiée correspondant au thème de votre page, veuillez la privilégier plutôt que les InfoBox personnalisées. De plus, elles sont beaucoup plus simple d'utilisation.
|data1=Data
+
[[:Catégorie:InfoBox_Dédié|Liste des InfoBox Dédié]]
|label2=Date of creation
+
 
|data2=26.05.12}}
+
== InfoBox personnalisée ==
The InfoBox lets you create a table to display the general technical information about the subject of the page, as on the right.
 
  
== InfoBox Dedicated ==
+
=== Structure minimale ===
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.
 
[[:Category:InfoBox_Dedicated|list of InfoBox Dedicated]]
 
  
== Personalized InfoBox ==
+
Il n'est pas nécessaire de spécifier de paramêtres pour avoir la structure minimale, mais ça n'a pas grand intérêt puisque ça n'affichera que le titre:
=== Minimal call ===
 
----
 
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>
 +
{{InfoBox|float=none}}
 +
<br />
  
Result: {{InfoBox|float=none}}
+
=== Image ===
  
=== Image ===
+
Il est hautement recommandé de mettre une image si possible. Si elle est plus grande que 200px, elle sera réduite à cette taille. Vous êtes obligé d'ajouter une légende si vous voulez que l'image s'affiche.
----
 
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>
 
<pre>
 
{{InfoBox
 
{{InfoBox
 
|image=Template_InfoBox_ExampleImage.jpg
 
|image=Template_InfoBox_ExampleImage.jpg
|caption=The men in this picture are strange.
+
|caption=Les hommes de cette image sont bizarres.
 
}}
 
}}
 
</pre>
 
</pre>
result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=The men in this picture are strange.|float=none}}
+
{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Les hommes de cette image sont bizarres|float=none}}
 +
<br />
 +
 
 +
=== Taille de l'image ===
  
==== Resize the image ====
+
Pour modifier la taille de l'image, ajoutez les paramètres suivants.
Add the parameter "ImageSize" with this value:
+
* [Largeur] Modifie la largeur sans restreindre la hauteur.
* {width} Resizes the image to fit within the given maximum width in pixels, without restricting its height;
+
* x[Hauteur]  Modifie la hauteur sans restreindre la largeur.
* x{height} Resizes the image to fit within the given maximum height in pixels, without restricting its width;
+
* [Largeur]x[Hauteur] Force la taille de l'image.
* {width}x{height} Resizes the image to fit within the given width and height in pixels;
 
Example :
 
 
<pre>
 
<pre>
 
{{InfoBox
 
{{InfoBox
 
|image=Template_InfoBox_ExampleImage.jpg
 
|image=Template_InfoBox_ExampleImage.jpg
|caption=The men in this picture are strange.
+
|caption=Les hommes de cette image sont bizarres.
|ImageSize=10x10
+
|ImageSize=30x30
 
}}
 
}}
 
</pre>
 
</pre>
Result:{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=The men in this picture are strange.||ImageSize=10x10|float=none}}
+
{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Les hommes de cette image sont bizarres.||ImageSize=30x30|float=none}}
==== Link of the image ====
+
<br />
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"
+
=== Lien de l'image ===
 +
 
 +
Si l'image est vraiment très grande, vous pouvez importer une image de largeur de 200px et utiliser le paramètre imageLink pour l'associer à la grande image.
 +
Exemple : La grande image est "CFX-9850GB_PLUS.jpg" et la petite est "CFX-9850GB_PLUS-w200.jpg"
 
<pre>{{InfoBox
 
<pre>{{InfoBox
 
|image=CFX-9850GB_PLUS-w200.jpg
 
|image=CFX-9850GB_PLUS-w200.jpg
|caption=This is the big image in small
+
|caption=La petit image est affichée, mais lorsqu'on clique sur cette derniere, c'est le lien de la grande.
 
|ImageLink=CFX-9850GB_PLUS.jpg
 
|ImageLink=CFX-9850GB_PLUS.jpg
 
}}</pre>
 
}}</pre>
[[CFX-9850|Click here]] to see the result.
+
<br />
  
 
=== Label and data ===
 
=== 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.
+
Pour ajouter des information à l'InfoBox, vous devez ajouter les paramètres "label" et "data", ainsi que les valeurs qui leurs sont associées. Vous pouvez en mettre de 1 à 100.
 
<pre>{{InfoBox
 
<pre>{{InfoBox
 
|image=Template_InfoBox_ExampleImage.jpg
 
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard and balthazar, two characters perverse, which make the success of the series.
+
|caption=Gaspard et balthazar, deux personnages pervers qui font le succès de la série.
|label1=Name of series
+
|label1=Nom de la série
 
|data1=Very Bad Blagues
 
|data1=Very Bad Blagues
|label2=Actual seasons
+
|label2=Saison actuelle
 
|data2=2
 
|data2=2
 
}}</pre>
 
}}</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}}
+
{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard et balthazar, deux personnages pervers qui font le succès de la série.|label1=Nom de la série|data1=Very Bad Blagues|label2=Saison actuelle|data2=2|float=none}}
 +
<br />
  
 
=== Title ===
 
=== Title ===
----
+
 
By default this template takes the page title as the title, but you can change it, with the "title" parameter.
+
Par défaut, L'InfoBox prend le titre de la page, mais vous pouvez le changer en ajoutant le paramètre "title".
 
<pre>{{InfoBox
 
<pre>{{InfoBox
 
|title=Very Bad Blague
 
|title=Very Bad Blague
 
|image=Template_InfoBox_ExampleImage.jpg
 
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard and balthazar, two characters perverse, which make the success of the series.
+
|caption=Gaspard et balthazar, 2 personnages pervers qui font le succès de la série.
|label1=Actual seasons
+
|label1=Saison Actuelle
 
|data1=2
 
|data1=2
|label2=TV channel
+
|label2=Chaine TV
 
|data2=Direct 8
 
|data2=Direct 8
 
}}</pre>
 
}}</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}}
+
{{InfoBox|title=Very Bad Blague|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard et balthazar, 2 personnages pervers qui font le succès de la série.|label1=Saison Actuelle|data1=2|label2=Chaine TV|data2=Direct 8|float=none}}
 +
<br />
  
 
=== Style ===
 
=== Style ===
----
+
 
You can change the style of several part of the InfoBox if you have knowledge in CSS:
+
Vous pouvez changer le style de plusieurs partie de l'InfoBox si vous vous y connaissez en CSS:
 
<pre>{{InfoBox
 
<pre>{{InfoBox
 
|image=Template_InfoBox_ExampleImage.jpg
 
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard and balthazar
+
|caption=Gaspard et balthazar
|label1=Actual seasons
+
|label1=Saison Actuelle
 
|data1=2
 
|data1=2
|label2=TV channel
+
|label2=Chaine Tv
 
|data2=Direct 8
 
|data2=Direct 8
  
|TitleStyle=color:red;
+
|TitleStyle=color: red;
|TableStyle=border:solid orange 2px;
+
|TableStyle=border: solid black 2px;
|CaptionStyle=font-weight:bold;text-decoration:underline;
+
|CaptionStyle=font-weight: bold;
|LabelStyle1=color:blue;
+
|LabelStyle1=color: blue;
|DataStyle1=color:white;Background-color:black;
+
|DataStyle1=color: red;
|LabelStyle2=Border:dotted pink 2px;
+
|LabelStyle2=color: blue;
|DataStyle2=color:pink;
+
|DataStyle2=color: red;
}}</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;
+
</pre>
|DataStyle1=color:white;Background-color:black;|LabelStyle2=Border:dotted pink 2px; |DataStyle2=color:pink;|float=none}}
+
 
</noinclude>
+
{{InfoBox|image=Template_InfoBox_ExampleImage.jpg|caption=Gaspard et balthazar|label1=Saison Actuelle|data1=2|label2=Chaine Tv|data2=Direct 8|TitleStyle=color: red;|TableStyle=border: solid black 2px;|CaptionStyle=font-weight: bold;|LabelStyle1=color: blue;|DataStyle1=color: red;|LabelStyle2=color: blue;|DataStyle2=color: red;|float=none}}</noinclude>

Version actuelle datée du 16 mai 2014 à 07:19

L'InfoBox vous permet de créer un tableau pour afficher les informations générales du sujet d'une page.

InfoBox dédié

Ce type d'InfoBox est dédié à un thème. Si vous trouvez une InfoBox dédiée correspondant au thème de votre page, veuillez la privilégier plutôt que les InfoBox personnalisées. De plus, elles sont beaucoup plus simple d'utilisation. Liste des InfoBox Dédié

InfoBox personnalisée

Structure minimale

Il n'est pas nécessaire de spécifier de paramêtres pour avoir la structure minimale, mais ça n'a pas grand intérêt puisque ça n'affichera que le titre:

{{InfoBox}}
InfoBox


Image

Il est hautement recommandé de mettre une image si possible. Si elle est plus grande que 200px, elle sera réduite à cette taille. Vous êtes obligé d'ajouter une légende si vous voulez que l'image s'affiche.

{{InfoBox
|image=Template_InfoBox_ExampleImage.jpg
|caption=Les hommes de cette image sont bizarres.
}}
InfoBox
Template InfoBox ExampleImage.jpg
Les hommes de cette image sont bizarres


Taille de l'image

Pour modifier la taille de l'image, ajoutez les paramètres suivants.

  • [Largeur] — Modifie la largeur sans restreindre la hauteur.
  • x[Hauteur] — Modifie la hauteur sans restreindre la largeur.
  • [Largeur]x[Hauteur] — Force la taille de l'image.
{{InfoBox
|image=Template_InfoBox_ExampleImage.jpg
|caption=Les hommes de cette image sont bizarres.
|ImageSize=30x30
}}
InfoBox
Template InfoBox ExampleImage.jpg
Les hommes de cette image sont bizarres.


Lien de l'image

Si l'image est vraiment très grande, vous pouvez importer une image de largeur de 200px et utiliser le paramètre imageLink pour l'associer à la grande image. Exemple : La grande image est "CFX-9850GB_PLUS.jpg" et la petite est "CFX-9850GB_PLUS-w200.jpg"

{{InfoBox
|image=CFX-9850GB_PLUS-w200.jpg
|caption=La petit image est affichée, mais lorsqu'on clique sur cette derniere, c'est le lien de la grande.
|ImageLink=CFX-9850GB_PLUS.jpg
}}


Label and data

Pour ajouter des information à l'InfoBox, vous devez ajouter les paramètres "label" et "data", ainsi que les valeurs qui leurs sont associées. Vous pouvez en mettre de 1 à 100.

{{InfoBox
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard et balthazar, deux personnages pervers qui font le succès de la série.
|label1=Nom de la série
|data1=Very Bad Blagues
|label2=Saison actuelle
|data2=2
}}
InfoBox
Template InfoBox ExampleImage.jpg
Gaspard et balthazar, deux personnages pervers qui font le succès de la série.
Nom de la sérieVery Bad Blagues
Saison actuelle2


Title

Par défaut, L'InfoBox prend le titre de la page, mais vous pouvez le changer en ajoutant le paramètre "title".

{{InfoBox
|title=Very Bad Blague
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard et balthazar, 2 personnages pervers qui font le succès de la série.
|label1=Saison Actuelle
|data1=2
|label2=Chaine TV
|data2=Direct 8
}}
Very Bad Blague
Template InfoBox ExampleImage.jpg
Gaspard et balthazar, 2 personnages pervers qui font le succès de la série.
Saison Actuelle2
Chaine TVDirect 8


Style

Vous pouvez changer le style de plusieurs partie de l'InfoBox si vous vous y connaissez en CSS:

{{InfoBox
|image=Template_InfoBox_ExampleImage.jpg
|caption=Gaspard et balthazar
|label1=Saison Actuelle
|data1=2
|label2=Chaine Tv
|data2=Direct 8

|TitleStyle=color: red;
|TableStyle=border: solid black 2px;
|CaptionStyle=font-weight: bold;
|LabelStyle1=color: blue;
|DataStyle1=color: red;
|LabelStyle2=color: blue;
|DataStyle2=color: red;
}}


InfoBox
Template InfoBox ExampleImage.jpg
Gaspard et balthazar
Saison Actuelle2
Chaine TvDirect 8