Modul:InfoboxKozterulet

A lap korábbi változatát látod, amilyen Jzoltan (vitalap | szerkesztései) 2024. december 27., 17:11-kor történt szerkesztése után volt. (Új oldal, tartalma: „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-…”)
(eltér) ← Régebbi változat | Aktuális változat (eltér) | Újabb változat→ (eltér)

A modult a Modul:InfoboxKozterulet/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.nevado ~= nil and args.nevado ~= '' then infobox:addRow('Névadó', args.nevado) end
if args.elhelyezkedese ~= nil and args.elhelyezkedese ~= '' then infobox:addWikitext( args.elhelyezkedese ) end
return infobox

end
 
return p