Basculer le menu
Changer de menu des préférences
Basculer le menu personnel
Non connecté(e)
Votre adresse IP sera visible au public si vous faites des modifications.

« Module:Infobox/Configs/Personnage » : différence entre les versions

De Nefald
Page créée avec « local config = { titre = function(args) return args.nom or '{{PAGENAME}}' end, image = function(args) if args.image then return '300px' end return nil end, sections = { { titre = 'État civil', champs = { { cle = 'titre', label = 'Titre' }, { cle = 'surnom', label = 'Surnom' }, { cle = '... »
 
Hiob (discussion | contributions)
m icon : person
 
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 = 'person'
    },
   
     image = function(args)
     image = function(args)
         if args.image then
         if args.image then

Dernière version du 29 septembre 2025 à 17:50

La documentation pour ce module peut être créée à Module:Infobox/Configs/Personnage/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 = 'person'
    },
    
    image = function(args)
        if args.image then
            return '[[Fichier:' .. args.image .. '|300px]]'
        end
        return nil
    end,

    sections = {
        {
            titre = 'État civil',
            champs = {
                { cle = 'titre', label = 'Titre' },
                { cle = 'surnom', label = 'Surnom' },
                { cle = 'naissance', label = 'Date de naissance' },
                { cle = 'deces', label = 'Date de décès' },
                { cle = 'lieu_naissance', label = 'Lieu de naissance' },
                { cle = 'lieu_residence', label = 'Lieu de résidence' },
                { cle = 'statut', label = 'Statut' },
            }
        },
        {
            titre = 'Rôles et activités',
            champs = {
                { cle = 'activite', label = 'Activité' },
                { cle = 'organisation', label = 'Organisation' },
                { cle = 'role', label = 'Rôle' },
                { cle = 'croyances', label = 'Croyances' },
            }
        },
        {
            titre = 'Affiliations',
            champs = {
                { cle = 'famille', label = 'Famille' },
                { cle = 'conjoint', label = 'Conjoint' },
                { cle = 'parents', label = 'Parents' },
                { cle = 'enfants', label = 'Enfants' },
            }
        },
        {
            titre = 'Apparence',
            champs = {
                { cle = 'sexe', label = 'Sexe' },
                { cle = 'taille', label = 'Taille' },
                { cle = 'poids', label = 'Poids' },
                { cle = 'traits', label = 'Traits' },
            }
        }
    }
}

return config