Module:Infobox/Console de jeux vidéo

 Documentation[voir] [modifier] [historique] [purger]

Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Console de jeux vidéo.


local jeu = require "Module:Infobox/Fonctions"
local wd = require( 'Module:Wikidata' )
local localdata = require( 'Module:Infobox/Localdata' )

-- Fonction permettant l'affichage de la partie succession
local function buildsuccession ()
	
if (localdata["logo"] and not(localdata["taille logo"])) then
	return { type = 'table',  separator=true,
				rows = {
					{
						type = 'succession',
	                    color = transparent,
	                    value = {before = localdata["prédécesseur"], center ='[[Image:'..localdata["logo"]..'|100px|'..localdata["nom"]..']]', after = localdata["successeur"]}
					}
				}
			}
elseif (localdata["logo"] and localdata["taille logo"]) then
	return { type = 'table',  separator=true,
				rows = {
					{
						type = 'succession',
	                    color = transparent,
	                    value = {before = localdata["prédécesseur"], center ='[[Image:'..localdata["logo"]..'|'..localdata["taille logo"]..'|'..localdata["nom"]..']]', after = localdata["successeur"]}
					}
				}
			}
else return { type = 'table',  separator=true,
				rows = {
					{
						type = 'succession',
	                    color = transparent,
	                    value = {before = localdata["prédécesseur"], after = localdata["successeur"]}
					}
				}
			}
	end
end

return {
	maincolor = '#004080',
	parts = {
		jeu.title('jeuvideo',{['color'] = 'white'}),
		{
			type = 'images',
			imageparameters = {'image'},
			captionparameter = 'légende',
			sizeparameter = 'taille image',
		},
		{
			type	= 'table', separator=true,
			rows	= {
				{ type = 'row',
					label = 'Fabricant',
					value = 'fabricant',
					property = 'P176'
				},
				{ type = 'row',
					label = 'Nom de code',
					value = 'code',
					property = 'P1638'
				},
				{ type = 'row',
					label = 'Type',
					value = 'type'
				},
				{ type = 'row',
					label = 'Génération',
					value = 'génération'
				}, }, },
			{
			type	= 'table', separator=true,
			rows	= {
				{ type = 'row',
					label = 'Date de sortie',
					value = 'début',
					wikidata = {
						property = 'P577',
						showqualifiers = {'P291'}
					}
				},
				{ type = 'row',
					label = 'Fin de production',
					value = 'fin',
					wikidata = {
						property = 'P2669',
						showqualifiers = {'P291'}
					}
				},
				{ type = 'row',
					label = 'Système d\'exploitation',
					value = {'os','OS'},
					property = 'P306'
				},
				{ type = 'row',
					label = 'SoC',
					value = {'soc','SoC'}
				},
				{ type = 'row',
					label = 'Processeur',
					value = {'cpu','CPU'},
					property = 'P880'
				},
				{ type = 'row',
					label = 'Processeur graphique',
					value = {'gpu','GPU'},
					property = 'P2560'
				},
				{ type = 'row',
					label = 'Mémoire interne',
					value = 'mémoire'
				},
				{ type = 'row',
					label = 'Espace de stockage',
					value = 'stockage'
					-- property = '<!-- Wikidata:P2928 -->'
				},
				{ type = 'row',
					label = 'Média',
					value = 'média'
				},
				{ type = 'row',
					label = 'Contrôleurs',
					value = 'contrôleurs',
					property = 'P479'
				},
				{ type = 'row',
					label = 'Alimentation',
					value = 'alimentation'
				}, }, },
			{
			type	= 'table', separator=true,
			rows	= {
				{ type = 'row',
					label = 'Service en ligne',
					value = 'online',
					property = 'P2361'
				},
				{ type = 'row',
					label = 'Unités vendues',
					value = 'ventes',
					property = 'P2664'
				},
				{ type = 'row',
					label = 'Jeu le plus vendu',
					value = 'jeu phare'
				},
			},
		},
	buildsuccession ()
	},
}