Aller au contenu

« Modèle:Infobox V3/Image/Documentation » : différence entre les versions

De Wikiquestia
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 10 : Ligne 10 :
== 🔧 Syntaxe ==
== 🔧 Syntaxe ==
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
{{Infobox V3/Portrait
{{Infobox V3/Image
  |Portrait 1=Nom_fichier1.jpg
  | Image 1 = Image1.jpg
  |Titre portrait 1=Titre de la première image
  | Titre image 1 = Première image
  |Portrait caption 1=Légende de la première image
  | Image caption 1 = Description 1
  |Portrait 2=Nom_fichier2.jpg
  | Image 2 = Image2.jpg
  |Titre portrait 2=Titre de la deuxième image
  | Titre image 2 = Deuxième image
  |Portrait caption 2=Légende de la deuxième image
  | Image caption 2 = Description 2
| Image 3 = Image3.jpg
| Titre image 3 = Troisième image
| Image caption 3 = Description 3
}}
}}
</syntaxhighlight>
</syntaxhighlight>
Ligne 30 : Ligne 33 :
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>
<pre>
{{Infobox V3/Portrait
{{Infobox V3/Image
  |Titre portrait 1=Portrait officiel
| Image 1 = Image1.jpg
  |Portrait 1=Portrait Blad Melkitim.png
  | Titre image 1 = Première image
  |Portrait caption 1=
  | 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
}}
}}
</pre>
</pre>
Ligne 40 : Ligne 49 :
=== Deux portraits ===
=== Deux portraits ===
{{Infobox V3/Début}}
{{Infobox V3/Début}}
{{Infobox V3/Portrait
{{Infobox V3/Image
  |Portrait 1=Ejheril Reïls portrait.png
  | Image 1 = Image1.jpg
  |Titre portrait 1=Portrait officiel
  | Titre image 1 = Première image
  |Portrait caption 1=
  | Image caption 1 = Description 1
  |Portrait 2=Ejheril Reïls portrait jeune.png
  | Image 2 = Image2.jpg
  |Titre portrait 2=Portrait officiel
  | Titre image 2 = Deuxième image
  |Portrait caption 2=
  | Image caption 2 = Description 2
| Image 3 = Image3.jpg
| Titre image 3 = Troisième image
| Image caption 3 = Description 3
}}
}}
{{Infobox V3/Fin}}
{{Infobox V3/Fin}}
<pre>
<pre>
{{Infobox V3/Portrait
{{Infobox V3/Image
  |Portrait 1=Ejheril Reïls portrait.png
  | Image 1 = Image1.jpg
  |Titre portrait 1=Portrait officiel
  | Titre image 1 = Première image
  |Portrait caption 1=
  | Image caption 1 = Description 1
  |Portrait 2=Ejheril Reïls portrait jeune.png
  | Image 2 = Image2.jpg
  |Titre portrait 2=Portrait officiel
  | Titre image 2 = Deuxième image
  |Portrait caption 2=
  | Image caption 2 = Description 2
| Image 3 = Image3.jpg
| Titre image 3 = Troisième image
| Image caption 3 = Description 3
}}
}}
</pre>
</pre>

Version du 28 mai 2025 à 18:41

Note : Ceci est une page de documentation pour un modèle.

📘 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/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
}}

🧪 Exemples

Un seul portrait

Portrait officiel

Blad Melkitim
{{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
}}

Deux portraits

Infobox V3/Image/Documentation

{{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
}}

🧩 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 2 est fourni, les deux portraits sont affichés dans des onglets <tabber>.
  • Si seul Portrait 1 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 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;
}

Voir aussi