Modul:InfoboxTelepules
A modult a Modul:InfoboxTelepules/doc lapon tudod dokumentálni
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local headerStyle
if args.headerstyle and args.headerstyle ~= '' then
headerStyle = string.format('background-color:%s;', args.headerstyle)
else
headerStyle = 'background-color:grey;'
end
local infobox = capiunto.create( {
top = args.nev,
topStyle = 'background:#476a4a; color: #fff; font-size: 135%; height: 40px; vertical-align: middle; font-weight: bolder; line-height: 1.2em;' ,
} )
if args.kep ~= nil and args.kep ~= '' then infobox:addImage( args.kep, args.kepalairas ) end
if args.elsoemlites ~= nil and args.elsoemlites ~= '' then infobox:addRow('Első említés éve', args.elsoemlites) end
if args.alapitas ~= nil and args.alapitas ~= '' then infobox:addRow('Alapítás éve', args.alapitas) end
if args.ujratelepites ~= nil and args.ujratelepites ~= '' then infobox:addRow('Újratelepítés éve', args.ujratelepites) end
if args.rang ~= nil and args.rang ~= '' then infobox:addRow('Rang', args.rang) end
if args.jaras ~= nil and args.jaras ~= '' then infobox:addRow('Járás', args.jaras) end
if args.iranyitoszam ~= nil and args.iranyitoszam ~= '' then infobox:addRow('Irányítószám', args.iranyitoszam) end
if args.lakonepesseg ~= nil and args.lakonepesseg ~= '' then infobox:addRow('Lakónépesség', args.lakonepesseg) end
if args.elhelyezkedese ~= nil and args.elhelyezkedese ~= '' then infobox:addWikitext( args.elhelyezkedese ) end
return infobox
end
return p
