Module:HeroData: Difference between revisions

Sur (talk | contribs)
m postfixes now grey
Sur (talk | contribs)
m statboxes in div style
Line 193: Line 193:
postfix = ""
postfix = ""
else
else
-- light grey for postfixes
postfix = '<span style="color: #666666;">' .. lang_module._get_string(postfix) .. "</span>"
postfix = '<span style="color: #666666;">' .. lang_module._get_string(postfix) .. "</span>"
end
end
Line 245: Line 246:
-- Use expandTemplate to evaluate the Infobox_hero template
-- Use expandTemplate to evaluate the Infobox_hero template
     local template_title = mw.title.new("Template:Infobox_stat") --name of the template
     local template_title = mw.title.new("Template:Infobox_stat") --name of the template
     local template_calls = "" --all template calls concatenated
     local template_calls = '<div style="display: flex; flex-direction: column;">' --all template calls concatenated
     local template_call --current template call
     local template_call --current template call
local template_args = {} --current template arguments
local template_args = {} --current template arguments
Line 294: Line 295:
postfix = ""
postfix = ""
else
else
-- light grey for postfixes
postfix = '<span style="color: #666666;">' .. lang_module._get_string(postfix) .. "</span>"
postfix = '<span style="color: #666666;">' .. lang_module._get_string(postfix) .. "</span>"
end
end
Line 330: Line 332:
-- Add call to the set of calls
-- Add call to the set of calls
template_calls = template_calls .. "\n" .. template_call
template_calls = template_calls .. "\n" .. template_call
-- Add lots of spacing after the Weapon and Vitality categories
if (category == "Weapon" or category == "Vitality") then
template_calls = template_calls .. "\n\n\n\n\n\n\n\n\n"
end
end
end
return template_calls
return template_calls .. "</div>"
end
end


return p
return p