Module:Infobox person: Difference between revisions
From Paracosm
More actions
mNo edit summary |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 19:13, 13 June 2026
Documentation for this module may be created at Module:Infobox person/doc
require('strict')
local p = {}
local infobox = require('Module:InfoboxLua')
local function join_br(a, b, c)
local parts = {}
if a ~= nil then table.insert(parts, a) end
if b ~= nil then table.insert(parts, b) end
if c ~= nil then table.insert(parts, c) end
return table.concat(parts, "<br>")
end
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame)
return infobox.render({
title = args.name or mw.title.getCurrentTitle().subpageText,
subtitle = args.role,
image = args.image,
sections = {
{
items = {
{ label = "Pronunciation", content = args.pronunciation },
{ label = "Born", content = join_br(args.birth_name, args.birth_date, args.birth_place) },
{ label = "Disappeared", content = join_br(args.disappeared_date, args.disappeared_place) },
{ label = "Status", content = args.disappeared_status },
{ label = "Died", content = join_br(args.death_date, args.death_place) },
{ label = "Cause of death", content = args.death_cause },
{ label = "Body discovered", content = args.body_discovered },
{ label = "Resting place", content = args.resting_place },
{ label = "Monuments", content = args.monuments },
{ label = "Other name", content = args.other_names },
{ label = "Siglum", content = args.siglum },
{ label = "Citizenship", content = args.citizenship },
{ label = "Education", content = args.education },
{ label = "Occupation", content = args.occupation },
{ label = "Years active", content = args.years_active },
{ label = "Era", content = args.era },
{ label = "Employer", content = args.employer },
{ label = "Organization", content = args.organization },
{ label = "Agent", content = args.agent },
{ label = "Known for", content = args.known_for },
{ label = "Notable work", content = args.notable_works },
{ label = "Style", content = args.style },
{ label = "Television", content = args.television },
{ label = "Height", content = args.height },
{ label = "Title", content = args.title },
{ label = "Term", content = args.term },
{ label = "Predecessor", content = args.predecessor },
{ label = "Successor", content = args.successor },
{ label = "Political party", content = args.political_party },
{ label = "Other political affiliations", content = args.other_party },
{ label = "Movement", content = args.movement },
{ label = "Opponent", content = args.opponents },
{ label = "Criminal charges", content = args.criminal_charges },
{ label = "Criminal penalty", content = args.criminal_penalty },
{ label = "Criminal status", content = args.criminal_status },
{ label = "Spouse", content = args.spouse },
{ label = "Children", content = args.children },
{ label = "Parent", content = args.parents },
{ label = "Relatives", content = args.relatives },
{ label = "Family", content = args.family },
{ label = "Call sign", content = args.callsign },
{ label = "Awards", content = args.awards },
}
},
}
})
end
return p