Modul:InfoboxSzobor
A modult a Modul:InfoboxSzobor/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.telepules ~= nil and args.telepules ~= '' then infobox:addRow('Település', args.telepules) end
if args.cim ~= nil and args.cim ~= '' then infobox:addRow('Cím', args.cim) end
if args.alkoto ~= nil and args.alkoto ~= '' then infobox:addRow('Alkotó', args.alkoto) end
if args.alkotok ~= nil and args.alkotok ~= '' then infobox:addRow('Alkotók', args.alkotok) end
if args.anyaga ~= nil and args.anyaga ~= '' then infobox:addRow('Anyaga', args.anyaga) end
if args.felavatasdatuma ~= nil and args.felavatasdatuma ~= '' then infobox:addRow('Felavatás dátuma', args.felavatasdatuma) end
if args.lebontasdatuma ~= nil and args.lebontasdatuma ~= '' then infobox:addRow('Lebontás dátuma', args.lebontasdatuma) end
if args.elhelyezkedese ~= nil and args.elhelyezkedese ~= '' then infobox:addWikitext( args.elhelyezkedese ) end
return infobox
end
return p
