|
|
| 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/Image
| |
| | Image 1 = Image1.jpg
| |
| | Titre image 1 = Première image
| |
| | Image caption 1 = Description 1
| |
| | Image 2 = Image2.jpg
| |
| | Titre image 2 = Deuxième image
| |
| | Image caption 2 = Description 2
| |
| | Image 3 = Image3.jpg
| |
| | Titre image 3 = Troisième image
| |
| | Image caption 3 = Description 3
| |
| }}
| |
| {{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]]
| |