Modul:InfoboxEpitettertek

A lap korábbi változatát látod, amilyen Jzoltan (vitalap | szerkesztései) 2024. február 28., 16:23-kor történt szerkesztése után volt. (Elhelyezkedése sor hozzáadása)
(eltér) ← Régebbi változat | Aktuális változat (eltér) | Újabb változat→ (eltér)

A modult a Modul:InfoboxEpitettertek/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.epult ~= nil and args.epult ~= '' then infobox:addRow('Épült', args.epult) end
if args.epitesistilus ~= nil and args.epitesistilus ~= '' then infobox:addRow('Építési stílus', args.epitesistilus) end
if args.tervezo ~= nil and args.tervezo ~= '' then infobox:addRow('Tervező', args.tervezo) end
if args.tervezok ~= nil and args.tervezok ~= '' then infobox:addRow('Tervezők', args.tervezok) end
if args.epitesz ~= nil and args.epitesz ~= '' then infobox:addRow('Építész', args.epitesz) end
if args.epiteszek ~= nil and args.epiteszek ~= '' then infobox:addRow('Építészek', args.epiteszek) 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