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

De Starfield Wiki
Aucun résumé des modifications
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
local general = require("Module:Infobox/Fonctions")
local general = require("Module:Infobox/Fonctions")
-- Sujet
local ibSubject = localdata['type']
if ibSubject then
local types = {
['acteur']        ='Acteur',
['actrice']      ='Actrice',
['archiviste']    ='Archiviste',
['compositeur']  ='Compositeur',
['compositrice']  ='Compositrice',
['développeur']  ='Développeur',
['développeuse']  ='Développeuse',
['directeur']    ='Directeur',
['directrice']    ='Directrice',
['employé']      ='Employé du jeu vidéo',
['employée']      ='Employée du jeu vidéo',
['groupe']        ='Groupe musical',
['musicien']      ='Musicien',
['musicienne']    ='Musicienne',
['producteur']    ='Producteur',
['productrice']  ='Productrice',
['scénariste']    ='Scénariste',
}
ibSubject = types[ibSubject:lower()] or 'Personnalité'
else
ibSubject = 'Personnalité'
end
-- Jeux
local games = localdata['jeux']
if games then
games = require( 'Module:Abréviation' ).links({ games, ['séparateur'] = '<br/>' })
end
-- Wikipédia
local wikipedia = localdata['wikipédia']
if wikipedia then
wikipedia = '[[wikipedia:fr:' .. wikipedia .. '|' .. wikipedia .. ']]'
end
-- IMDb et MobyGames
local imdb = localdata['imdb']
local mobygames = localdata['mobygames']
if imdb or mobygames then
local pagename = require( 'Module:Outils' ).simpletitle(mw.getCurrentFrame())
if imdb then imdb = '[' .. imdb .. ' ' .. pagename .. ']' end
if mobygames then mobygames = '[' .. mobygames .. ' ' .. pagename .. ']' end
end
--------------------------------------------------------
-----          Construction de l'infobox          -----
--------------------------------------------------------


return {
return {

Dernière version du 3 décembre 2023 à 00:59

Documentation[voir] [modifier] [purger]

Ce module contient le paramétrage de l'infobox {{Infobox personnalité}}.

local general = require("Module:Infobox/Fonctions")

return {
	parts = {
		general.title(),
        general.image(),
		{
			type = "table",
			title = "Biographie",
			rows = {
				{ type = 'row', label = 'Surnom', value = 'surnom' },
				{ type = 'row', label = 'Naissance', value = 'naissance' },
				{ type = 'row', label = 'Mort', value = 'mort' }
			},
		},
		{
			type = "table",
			title = "Implication sur ''Starfield''",
			rows = {
				{ type = 'row', label = 'Jeux', value = function() return games end },
				{ type = 'row', label = 'Autres travaux', value = 'autres travaux' },
				{ type = 'row', label = 'Rôle', value = 'rôle' }
			},
		},
		{
			type = "table",
			title = "Liens externes",
			rows = {
				{ type = 'row', label = 'Site personnel', value = 'personnel', 'site' },
				{ type = 'row', label = 'Wikipédia', value = function() return wikipedia end },
				{ type = 'row', label = 'MobyGames', value = function() return mobygames end },
				{ type = 'row', label = 'IMDb', value = function() return imdb end },
				{ type = 'row', label = 'Facebook', value = 'facebook' },
				{ type = 'row', label = 'Instagram', value = 'instagram' },
				{ type = 'row', label = 'Twitter', value = 'twitter' },
				{ type = 'row', label = 'Spotify', value = 'spotify' },
				{ type = 'row', label = 'Deezer', value = 'deezer' },
				{ type = 'row', label = 'Youtube Music', value = 'youtube music', 'yt music' },
				{ type = 'row', label = 'Youtube', value = 'youtube' },
				{ type = 'row', label = 'Twitch', value = 'twitch' },
				{ type = 'row', label = 'TikTok', value = 'tiktok' },
				{ type = 'row', label = 'Reddit', value = 'reddit' },
				{ type = 'row', label = 'Tumblr', value = 'tumblr' },
				{ type = 'row', label = 'ArtStation', value = 'artstation' },
				{ type = 'row', label = 'LinkedIn', value = 'linkedin' },
				{ type = 'row', label = 'Autres liens', value = 'autres liens' }
			},
		},
	},
}