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

De Starfield Wiki
Page créée avec « 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é']... »
 
Aucun résumé des modifications
 
(2 versions intermédiaires par le même utilisateur non affichées)
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 {
parts = {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = ibSubject }},
general.title(),
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
        general.image(),
{ type = 'table', title = 'Biographie', rows = {
{
{ type = 'row', label = 'Surnom', value = 'surnom' },
type = "table",
{ type = 'row', label = 'Naissance', value = 'naissance' },
title = "Biographie",
{ type = 'row', label = 'Mort', value = 'mort' }
rows = {
}},
{ type = 'row', label = 'Surnom', value = 'surnom' },
{ type = 'table', title = "Implication sur ''Starfield''", rows = {
{ type = 'row', label = 'Naissance', value = 'naissance' },
{ type = 'row', label = 'Jeux', value = function() return games end },
{ type = 'row', label = 'Mort', value = 'mort' }
{ type = 'row', label = 'Autres travaux', value = 'autres travaux' },
},
{ type = 'row', label = 'Rôle', value = 'rôle' }
},
}},
{
{ type = 'table', title = 'Liens externes', rows = {
type = "table",
{ type = 'row', label = 'Site personnel', value = 'personnel', 'site' },
title = "Implication sur ''Starfield''",
{ type = 'row', label = 'Wikipédia', value = function() return wikipedia end },
rows = {
{ type = 'row', label = 'MobyGames', value = function() return mobygames end },
{ type = 'row', label = 'Jeux', value = function() return games end },
{ type = 'row', label = 'IMDb', value = function() return imdb end },
{ type = 'row', label = 'Autres travaux', value = 'autres travaux' },
{ type = 'row', label = 'Facebook', value = 'facebook' },
{ type = 'row', label = 'Rôle', value = 'rôle' }
{ 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 = "table",
{ type = 'row', label = 'Youtube Music', value = 'youtube music', 'yt music' },
title = "Liens externes",
{ type = 'row', label = 'Youtube', value = 'youtube' },
rows = {
{ type = 'row', label = 'Twitch', value = 'twitch' },
{ type = 'row', label = 'Site personnel', value = 'personnel', 'site' },
{ type = 'row', label = 'TikTok', value = 'tiktok' },
{ type = 'row', label = 'Wikipédia', value = function() return wikipedia end },
{ type = 'row', label = 'Reddit', value = 'reddit' },
{ type = 'row', label = 'MobyGames', value = function() return mobygames end },
{ type = 'row', label = 'Tumblr', value = 'tumblr' },
{ type = 'row', label = 'IMDb', value = function() return imdb end },
{ type = 'row', label = 'ArtStation', value = 'artstation' },
{ type = 'row', label = 'Facebook', value = 'facebook' },
{ type = 'row', label = 'LinkedIn', value = 'linkedin' },
{ type = 'row', label = 'Instagram', value = 'instagram' },
{ type = 'row', label = 'Autres liens', value = 'autres liens' }
{ type = 'row', label = 'Twitter', value = 'twitter' },
}},
{ type = 'row', label = 'Spotify', value = 'spotify' },
{ type = 'text', value = 'pied' }
{ 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' }
},
},
},
}
}

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' }
			},
		},
	},
}