Aller au contenu

Module:Infobox/Composé chimique

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 6 décembre 2018 à 05:46 et modifiée en dernier par Snipre (discuter | contributions). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.

 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 Composé chimique.


local wikidata = require "Module:Wikidata"

local styleH = {['background'] = '#EEEEEE', ['text-indent'] = '3px', ['text-align'] = 'left', ['font-weight'] = 'normal', ['width'] = '45%', ['padding'] = '2px 7px'}
local styleH1 = {['background'] = '#EEEEEE',  ['text-align'] = 'center', ['font-weight'] = 'normal'}

return {
	style = {['float'] = 'right', ['width'] = '300', ['border'] = '1px solid #AAA', ['clear'] = 'right', ['margin'] = '0 0 0.5em 1em', ['word-wrap'] = 'break-word', ['padding'] = '5px'},
--	class = 'drugInfoBox_infobox_v2', -- n'a pas l'air de fonctionner correctement
    parts = {
        {
			type = 'title',
			value = 'nom',
			style = {['background'] = '#ffdead', ['width'] = '100%', ['font-size'] = '130%', ['line-height'] = '50px', ['height'] = '50px', ['vertical-align'] = 'bottom', ['text-align'] = 'center', ['font-weight'] = 'bold', ['border'] = '2px solid #FFFFFF'},
        },
        {
			type = 'images',
			imageparameters = {'images'},
			captionparameter = 'legende'
        },
        {
			type = 'table',
			title = {
				value = 'Identification',
				style = {['background'] = '#ffdead', ['border'] = '2px solid #FFFFFF', ['font-weight'] = 'bold'}
				},
			style = {['width'] = '100%', ['font-size'] ='95%'},
			rows = {
				{type = 'mixed', label = '[[Dénomination commune internationale|DCI]]', value = 'DCI', styleHeader = styleH},
				{type = 'mixed', label = '[[Nomenclature IUPAC|Nom IUPAC]]', value = 'nomIUPAC', styleHeader = styleH},
				{type = 'mixed', label = '[[Numéro CAS|N° CAS]]', value = 'CAS', property = 'p231', styleHeader = styleH},
				{type = 'mixed', label = '[[Numéro EINECS|N° EINECS]]', value = 'EINECS', property = 'p232', styleHeader = styleH},
				{type = 'mixed', label = '[[Numéro RTECS|N° RTECS]]', value = 'RTECS', property = 'p657', styleHeader = styleH},
				{type = 'mixed', label = '[[Classification anatomique, thérapeutique et chimique|Code ATC]]', value = 'ATC', property = 'p267', styleHeader = styleH},
				{type = 'mixed', label = 'DrugBank', value = 'DrugBank', property = 'p715', styleHeader = styleH},
				{type = 'mixed', label = '[[PubChem]]', value = 'PubChem', class = 'external text', property = 'p662', weblink = 'http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=', styleHeader = styleH},
				{type = 'mixed', label = 'ChEBI', value = 'chEBI', property = 'p683', weblink = 'http://www.ebi.ac.uk/chebi/searchId.do?chebiId=', styleHeader = styleH},
				{type = 'mixed', label = '[[Additif alimentaire|N° E]]', value = 'NrE', property = 'p628', styleHeader = styleH},
				{type = 'mixed', label = '[[Generally recognized as safe|FEMA]]', value = 'FEMA', styleHeader = styleH},
				{type = 'mixed', label = '[[Simplified Molecular Input Line Entry Specification|SMILES]]', value = 'SMILES', property = 'p233', hidden = 1, styleHeader = styleH},
				{type = 'mixed', label = 'InChI', value = 'StdInChI', property = 'p234', hidden = 1, styleHeader = styleH},
				{type = 'mixed', label = 'InChIKey', value = 'StdInChIKey', property = 'p235', hidden = 1, styleHeader = styleH},
				{type = 'mixed', label = 'Apparence', value = 'apparence', styleHeader = styleH}
                }
            },
}
}