Módulo:Infobox/Campeonato de wrestling profissional

Documentação do módulo[ver] [editar] [histórico] [purgar]


Descrição

Este Módulo tem funções auxiliares para criar infocaixas.

Uso

Outra documentação:

local general = require "Módulo:Infobox/Funções"
local localdata = require( 'Módulo:Infobox/Localdata' )

function title(icon, style, subtitleparam, subtitlequery)
    return {
        type = 'title',
        value = function()
            return localdata['nome']
            or  localdata['championshipname']
        or localdata['nome do campeonato']
                or wikidata.getLabel(localdata.item) and mw.language.getContentLanguage():ucfirst( wikidata.getLabel(localdata.item) )
                or mw.title.getCurrentTitle().text
        end,
        subtitle = function() return localdata[subtitleparam] end,
        wikidatasubtitle = subtitlequery,
        icon = icon,
        style = style,
    }
end

return {
    maincolor = '#ECF4FF',
    parts = {
        title( 'desporto'),
        general.mainimage(),
        {type = 'table', title = 'Detalhes', rows = {
            {type = 'row', label = 'Campeão', value = 'campeão atual'},
            {type = 'row', label = 'Exibido', value = 'exibido em'},
            {type = 'row', label = '[[Promoção de luta profissional|Promoção]]', value = 'promoção', property = {'P31', 'P279'}},
            {type = 'row', label = 'Conquista', value = {'data', 'won', 'vitória'}},
            {type = 'row', label = 'Design anterior', plurallabel = 'Designs anteriores', value = {'design anterior', 'pastlookimages'}},
            {type = 'row', label = 'Criação', value = 'criado em', property = 'P571'},
            {type = 'row', label = 'Design anterior', value = 'desativado em'},
            {type = 'row', label = 'Desativação', value = 'desativado em', property = 'P730'},
            {type = 'row', label = 'Federação', value = 'federação', property = 'P17'},
            {type = 'row', label = 'Divisão', value = 'divisão', property = 'P641'},
            {type = 'row', label = 'Campeão atual', value = {'campeão atual', 'campeão_atual'}},
            {type = 'row', label = 'Vitória', value = 'vitória'},
            {type = 'row', label = 'Último campeão', value = {'firstchamp', 'último campeão'}},
        }},
--        {type = 'row', label = 'Outros nomes'},
	{type = 'text', value = {'nomes anteriores', 'outros nomes', 'pastnames'}},
        {type = 'table', title = 'Estatísticas', rows = {
            {type = 'row', label = 'Primeiro campeão', plurallabel = 'Primeiros campeões', value = {'firstchamp', 'primeiro campeão'}},
            {type = 'row', label = 'Mais reinados', value = {'mostreigns', 'mais reinados'}},
            {type = 'row', label = 'Maior reinado', value = {'longestreign', 'reinado mais longo'}},
            {type = 'row', label = 'Menor reinado', value = {'shortestreign', 'reinado mais curto'}},
            {type = 'row', label = 'Campeão mais velho', value = {'oldest', 'campeão mais velho'}},
            {type = 'row', label = 'Campeão mais novo', value = {'youngest', 'campeão mais novo', 'campeão mais jovem'}},
            --{type = 'row', label = 'Campeão mais novo', value = {'youngest', 'campeão mais novo'}},
            {type = 'row', label = 'Campeão mais pesado', value = {'heaviest', 'campeão mais pesado'}},
            {type = 'row', label = 'Campeão mais leve', value = {'lightest', 'campeão mais leve'}},
        }}
    }
}