« Module:Infobox/Core » : différence entre les versions
De Nefald
Autres actions
Ajout fontawesome Balises : Modification par mobile Modification par le web mobile |
Aucun résumé des modifications Balises : Modification par mobile Modification par le web mobile |
||
| Ligne 31 : | Ligne 31 : | ||
local titleDiv = mw.html.create('div') | local titleDiv = mw.html.create('div') | ||
:addClass('infobox-title') | |||
-- Construire le contenu du titre avec l'icône | |||
local titreContent = '' | |||
if config.icone then | |||
local iconeType = config.icone.type or 'fas' | |||
local iconeNom = config.icone.nom | |||
titreContent = '{{#' .. iconeType .. ':' .. iconeNom .. '}} ' | |||
end | |||
titreContent = titreContent .. args.nom | |||
-- Preprocesser le contenu pour interpréter l'icône | |||
if frame then | |||
titreContent = frame:preprocess(titreContent) | |||
end | |||
titleDiv:wikitext(titreContent) | |||
header:node(titleDiv) | |||
if args.soustitre and args.soustitre ~= '' then | if args.soustitre and args.soustitre ~= '' then | ||