local p = {}
function p.main(frame)
local args = frame:getParent().args
local result = {}
local style = args.style or ""
local rotate = args.rotate or "0deg"
local color = args.color or ""
local i = 1
while args[i] ~= nil do
if args[i] == "" then
table.insert(result, "<br />")
else
local wordStyle = "display:inline-block;"
local wordRotate = args["ro" .. i] or rotate
wordStyle = wordStyle .. "transform:rotate(" .. wordRotate .. ");"
if style ~= "" then
wordStyle = wordStyle .. style .. ";"
end
if color ~= "" then
wordStyle = wordStyle .. "color:" .. color .. ";"
end
if args["st" .. i] then
wordStyle = wordStyle .. args["st" .. i]
end
table.insert(result, '<span style="' .. wordStyle .. '">' .. args[i] .. '</span>')
end
i = i + 1
end
return table.concat(result)
end
return p