« Module:Infobox/Configs/Geopolitique » : différence entre les versions
De Nefald
Autres actions
Aucun résumé des modifications |
m icon : landmark-dome |
||
(Une version intermédiaire par un autre utilisateur non affichée) | |||
Ligne 3 : | Ligne 3 : | ||
return args.nom or '{{PAGENAME}}' | return args.nom or '{{PAGENAME}}' | ||
end, | end, | ||
-- Icône avec type et nom | |||
icone = { | |||
type = 'fas', -- ou 'fab', 'far', 'fal', 'fad' | |||
nom = 'landmark-dome' | |||
}, | |||
image = function(args) | image = function(args) | ||
if args.image then | if args.image then | ||
Ligne 28 : | Ligne 34 : | ||
}, | }, | ||
['serment'] = { | ['serment'] = { | ||
display = 'Serment', | display = 'Serment', | ||
category = 'Serments' | category = 'Serments' |
Dernière version du 29 septembre 2025 à 18:00
La documentation pour ce module peut être créée à Module:Infobox/Configs/Geopolitique/doc
local config = {
titre = function(args)
return args.nom or '{{PAGENAME}}'
end,
-- Icône avec type et nom
icone = {
type = 'fas', -- ou 'fab', 'far', 'fal', 'fad'
nom = 'landmark-dome'
},
image = function(args)
if args.image then
return '[[Fichier:' .. args.image .. '|300px]]'
end
return nil
end,
typeField = {
required = false, -- Optionnel pour les localités
allowedValues = {
['guerre'] = {
display = 'Guerre',
category = 'Guerres'
},
['traité'] = {
display = 'Traité',
category = 'Traités'
},
['alliance'] = {
display = 'Alliance',
category = 'Alliances'
},
['serment'] = {
display = 'Serment',
category = 'Serments'
}
},
errorMessage = 'Type non reconnu. Types autorisés : Traité, Alliance, Serment,Guerre'
},
sections = {
{
titre = 'Informations générales',
champs = {
{ cle = 'type', label = 'Type' },
{ cle = 'date', label = 'Date' },
{ cle = 'parties', label = 'Parties' },
{ cle = 'lieux', label = 'Lieux' },
}
}
}
}
return config