« Modèle:Infobox V3/Image/Documentation » : différence entre les versions
Apparence
Page blanchie Balise : Blanchiment |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
<noinclude><div class=documentation style="background-color: #e6f4ea;> | |||
{{Sous-page de documentation}}</noinclude> | |||
== 📘 Description == | |||
Ce modèle affiche un ou deux portraits dans une infobox, avec un titre et une légende facultatifs. | |||
Il s’adapte automatiquement : | |||
* à '''une seule image''', qu’il affiche en grand (250px), | |||
* ou à '''deux images''', qu’il présente dans un onglet interactif avec le modèle <code><tabber></code>. | |||
== 🔧 Syntaxe == | |||
<syntaxhighlight lang="text"> | |||
{{Infobox V3/Portrait | |||
|Portrait 1=Nom_fichier1.jpg | |||
|Titre portrait 1=Titre de la première image | |||
|Portrait caption 1=Légende de la première image | |||
|Portrait 2=Nom_fichier2.jpg | |||
|Titre portrait 2=Titre de la deuxième image | |||
|Portrait caption 2=Légende de la deuxième image | |||
}} | |||
</syntaxhighlight> | |||
== 🧪 Exemples == | |||
=== Un seul portrait === | |||
{{Infobox V3/Début Documentation}} | |||
{{Infobox V3/Portrait | |||
|Titre portrait 1=Portrait officiel | |||
|Portrait 1=Portrait Blad Melkitim.png | |||
|Portrait caption 1= Blad Melkitim | |||
}} | |||
{{Infobox V3/Fin Documentation}} | |||
<pre> | |||
{{Infobox V3/Portrait | |||
|Titre portrait 1=Portrait officiel | |||
|Portrait 1=Portrait Blad Melkitim.png | |||
|Portrait caption 1= | |||
}} | |||
</pre> | |||
{{clr}} | |||
=== Deux portraits === | |||
{{Infobox V3/Début}} | |||
{{Infobox V3/Portrait | |||
|Portrait 1=Ejheril Reïls portrait.png | |||
|Titre portrait 1=Portrait officiel | |||
|Portrait caption 1= | |||
|Portrait 2=Ejheril Reïls portrait jeune.png | |||
|Titre portrait 2=Portrait officiel | |||
|Portrait caption 2= | |||
}} | |||
{{Infobox V3/Fin}} | |||
<pre> | |||
{{Infobox V3/Portrait | |||
|Portrait 1=Ejheril Reïls portrait.png | |||
|Titre portrait 1=Portrait officiel | |||
|Portrait caption 1= | |||
|Portrait 2=Ejheril Reïls portrait jeune.png | |||
|Titre portrait 2=Portrait officiel | |||
|Portrait caption 2= | |||
}} | |||
</pre> | |||
{{clr}} | |||
== 🧩 Paramètres == | |||
{| class="wikitable" | |||
! Paramètre !! Description !! Obligatoire | |||
|- | |||
| <code>Portrait 1</code> || Nom du fichier image principal || Oui ✅ | |||
|- | |||
| <code>Titre portrait 1</code> || Titre au-dessus de la première image || Non | |||
|- | |||
| <code>Portrait caption 1</code> || Légende sous la première image || Non | |||
|- | |||
| <code>Portrait 2</code> || Nom du second fichier image || Non | |||
|- | |||
| <code>Titre portrait 2</code> || Titre au-dessus de la deuxième image || Non | |||
|- | |||
| <code>Portrait caption 2</code> || Légende sous la deuxième image || Non | |||
|} | |||
== Comportement == | |||
* Si <code>Portrait 2</code> est fourni, les deux portraits sont affichés dans des onglets <code><tabber></code>. | |||
* Si seul <code>Portrait 1</code> est présent, il est affiché centré avec son titre et sa légende (si fournis). | |||
* Si aucun portrait n’est renseigné, rien ne s’affiche. | |||
== 🧰 CSS recommandé == | |||
Ajoute ces règles à ta page <code>MediaWiki:Common.css</code> si ce n’est pas encore fait : | |||
<syntaxhighlight lang="css"> | |||
.infobox-center { | |||
text-align: center; | |||
margin: 0 auto; | |||
} | |||
.infobox-LO { | |||
padding: 0.5em; | |||
} | |||
.infobox-caption { | |||
font-size: 90%; | |||
font-style: italic; | |||
margin-top: 0.3em; | |||
} | |||
</syntaxhighlight> | |||
== Voir aussi == | |||
* [[Modèle:Infobox V3/Début]] | |||
* [[Modèle:Infobox V3/Fin]] | |||
* [[Modèle:Infobox V3/Tableau Ligne mixte]] | |||
[[Catégorie:Modèle d’infobox]] | |||
[[Catégorie:Infobox V3]] | |||
[[Catégorie:Modèle avec image]] | |||
Version du 28 mai 2025 à 18:40
📘 Description
Ce modèle affiche un ou deux portraits dans une infobox, avec un titre et une légende facultatifs. Il s’adapte automatiquement :
- à une seule image, qu’il affiche en grand (250px),
- ou à deux images, qu’il présente dans un onglet interactif avec le modèle
<tabber>.
🔧 Syntaxe
{{Infobox V3/Portrait
|Portrait 1=Nom_fichier1.jpg
|Titre portrait 1=Titre de la première image
|Portrait caption 1=Légende de la première image
|Portrait 2=Nom_fichier2.jpg
|Titre portrait 2=Titre de la deuxième image
|Portrait caption 2=Légende de la deuxième image
}}
🧪 Exemples
Un seul portrait
{{Infobox V3/Portrait
|Titre portrait 1=Portrait officiel
|Portrait 1=Portrait Blad Melkitim.png
|Portrait caption 1=
}}
Deux portraits
Infobox V3/Image/Documentation
{{Infobox V3/Portrait
|Portrait 1=Ejheril Reïls portrait.png
|Titre portrait 1=Portrait officiel
|Portrait caption 1=
|Portrait 2=Ejheril Reïls portrait jeune.png
|Titre portrait 2=Portrait officiel
|Portrait caption 2=
}}
🧩 Paramètres
| Paramètre | Description | Obligatoire |
|---|---|---|
Portrait 1 |
Nom du fichier image principal | Oui ✅ |
Titre portrait 1 |
Titre au-dessus de la première image | Non |
Portrait caption 1 |
Légende sous la première image | Non |
Portrait 2 |
Nom du second fichier image | Non |
Titre portrait 2 |
Titre au-dessus de la deuxième image | Non |
Portrait caption 2 |
Légende sous la deuxième image | Non |
Comportement
- Si
Portrait 2est fourni, les deux portraits sont affichés dans des onglets<tabber>. - Si seul
Portrait 1est présent, il est affiché centré avec son titre et sa légende (si fournis). - Si aucun portrait n’est renseigné, rien ne s’affiche.
🧰 CSS recommandé
Ajoute ces règles à ta page MediaWiki:Common.css si ce n’est pas encore fait :
.infobox-center {
text-align: center;
margin: 0 auto;
}
.infobox-LO {
padding: 0.5em;
}
.infobox-caption {
font-size: 90%;
font-style: italic;
margin-top: 0.3em;
}


