Aller au contenu

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

De Wikiquestia
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 6 : Ligne 6 :


== 🔧 Syntaxe ==
== 🔧 Syntaxe ==
<pre>
<syntaxhighlight>
{{Infobox V3/Début
{{Infobox V3/Début
  | text = change_nom_entête
  | text = change_nom_entête
Ligne 15 : Ligne 15 :
  | Nom forme longue = Vversion_longue_nom
  | Nom forme longue = Vversion_longue_nom
}}
}}
</pre>
</syntaxhighlight>


== 🧪 Exemples ==
== 🧪 Exemples ==
Ligne 22 : Ligne 22 :
{{Infobox V3/Début}}
{{Infobox V3/Début}}
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>{{Infobox V3/Début}}</pre>
<syntaxhighlight>{{Infobox V3/Début}}</syntaxhighlight>
{{clr}}
{{clr}}
</div>
</div>
Ligne 30 : Ligne 30 :
| Charte = empire }}
| Charte = empire }}
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>{{Infobox V3/Début
<syntaxhighlight>
| Charte = empire }}</pre>
{{Infobox V3/Début
| Charte = empire  
}}
</syntaxhighlight>
{{clr}}
{{clr}}
</div>
</div>
Ligne 40 : Ligne 43 :
| Theme = biographie }}
| Theme = biographie }}
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>{{Infobox V3/Début
}}
</syntaxhighlight>
{{Infobox V3/Début
| Charte = biographie
| Charte = biographie
| Theme = biographie}}</pre>
| Theme = biographie
}}
</syntaxhighlight>
{{clr}}
{{clr}}
</div>
</div>
Ligne 55 : Ligne 62 :
}}
}}
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>{{Infobox V3/Début
<syntaxhighlight>
{{Infobox V3/Début
  | Charte = empire
  | Charte = empire
  | Theme = empire
  | Theme = empire
Ligne 61 : Ligne 69 :
  | Transcription phonétique = Transcription phonétique
  | Transcription phonétique = Transcription phonétique
  | Nom forme longue = Version longue du nom
  | Nom forme longue = Version longue du nom
}}</pre>
}}
</syntaxhighlight>
{{clr}}
{{clr}}
</div>
</div>
Ligne 70 : Ligne 79 :
| Charte = darkgods }}
| Charte = darkgods }}
{{Infobox V3/Fin Documentation}}
{{Infobox V3/Fin Documentation}}
<pre>{{Infobox V3/Début  
<syntaxhighlight>{{Infobox V3/Début  
| text = Informations générales
| text = Informations générales
| Charte = darkgods }}</pre>
| Charte = darkgods
}}
</syntaxhighlight>
{{clr}}
{{clr}}
</div>
</div>

Version du 27 mai 2025 à 20:33

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

📘 Présentation

Ce modèle affiche un en-tête stylisé pour une infobox V3, avec une couleur de fond définie automatiquement via une charte visuelle Lua.

🔧 Syntaxe

{{Infobox V3/Début
 | text = change_nom_entête
 | Charte = nom_de_la_charte
 | Theme = nom_du_theme
 | Langue maternelle = nom_langue_maternelle
 | Transcription phonétique = transcription_phonétique
 | Nom forme longue = Vversion_longue_nom
}}

🧪 Exemples

Code minimal (charte par défaut, texte par défaut)

Infobox V3/Début/Documentation
{{Infobox V3/Début}}

Code avec charte personnalisée

Infobox V3/Début/Documentation
{{Infobox V3/Début
| Charte = empire 
}}

Code avec charte et thème personnalisés

Infobox V3/Début/Documentation

}} </syntaxhighlight>

Infobox V3/Début/Documentation

</syntaxhighlight>

Code avec charte personnalisée

Infobox V3/Début/Documentation
Transcription phonétique
Version longue du nom
{{Infobox V3/Début
 | Charte = empire
 | Theme = empire
 | Langue maternelle = Langue maternelle
 | Transcription phonétique = Transcription phonétique
 | Nom forme longue = Version longue du nom
}}

Code avec charte personnalisée

Infobox V3/Début/Documentation
{{Infobox V3/Début 
| text = Informations générales
| Charte = darkgods
}}

🧩 Paramètres

Paramètre Description Exemple
Theme Nom du Theme affiché dans le bandeau de l’infobox Biographie
Charte Nom de la charte visuelle à utiliser pour définir la couleur Empire
Nom maternelle Nom tel qu’écrit dans la langue d’origine 𐌇𐌀𐌓
Transcription phonétique Transcription du nom en alphabet phonétique international (API) "/χaʁ/"
Nom forme longue Nom officiel en version longue Royaume de Valdoria

🎨 Gestion des couleurs

La couleur de fond de l’en-tête est automatiquement déterminée par le Module:Charte, selon le nom de la charte et le type d’élément (`type=titre`).

Exemple de structure dans le module :

return {
  royaume = {
    titre = "#995333",
    hr    = "#d8c9b8"
  }
}

🧰 Utilisation technique

Le modèle appelle :

{{#invoke:Charte|couleur|charte={{{Charte|defaut}}}|type=titre}}