پودمان:Wikidata for infobox/occupations/politician
ظاهر
--
-- Author: Alireza (User:علیرضا)
-- Distributed under the terms of the CC-BY-SA 4.0
--
----
--
-- The style for the infobox which is used in politician people articles.
--
local getVal = require("Module:Wikidata for infobox").getPropertyValue
local list = require("Module:List").makeList
local listify = require("Module:Listify").input
local wikidata = require("Module:Wikidata").formatStatements
local entity = mw.wikibase.getEntityObject()
return {
["headerstyle"] = "background-color: lavender;",
["image"] = {
["image"] = getVal("P18"),
["suppressplaceholder"] = "yes",
["sizedefault"] = "frameless",
["alt"] = "%s",
["title"] = "%s"
},
["caption"] = "%s",
-- Empty header(s) have no labels but a title.
["empty header"] = getVal("P39"),
["Incumbent"] = {
["Assumed office"] = {
["style"] = "text-align: center;",
["data"] = ""
},
["Vice President"] = "",
["Preceded by"] = ""
},
["Personal details"] = {
["Born"] = list("unbulleted",{getVal("P1477"),getVal("P569")}),
["Political party"] = "[["..getVal("P102").."|%s]]",
["Spouse(s)"] = "",
["Children"] = listify({args={"،",getVal("P40"),"unbulleted",true}}),
["Residence"] = "",
["Education"] = wikidata({args={n=2,property="P69"}}),
["Alma mater"] = listify({args={"،",getVal("P40"),"unbulleted",true}}),
["Religion"] = "[["..getVal("P140").."|%s]]",
["Signature"] = {
["image"] = getVal("P109"),
["title"] = string.format("%s's signature",entity:getLabel()),
["alt"] = "%s",
["sizedefault"] = "frameless",
["size"] = "128x80px"
},
["Website"] = getVal("P856")
}
}